免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1653 | 回复: 0
打印 上一主题 下一主题

solaris内置诊断工具汇总 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-16 22:08 |只看该作者 |倒序浏览

hostid 输出当前主机的唯一识别码,用 sysdef -h 也输出同样的结果。
prtconf 输出系统配置信息
prtconf [ -F | -V | -x | -vpPD ]
用 prtconf -x 命令检测系统硬件是否支持 64位,如果不支持则有错误代码。
反之没有任何输出。
包含内存配置,系统外设配置:
#prtconf -v
部分输出如下:
System Configuration:  Sun Microsystems  sun4u
Memory size: 1024 Megabytes
System Peripherals (Software Nodes):
SUNW,Ultra-4
    System properties:
        name='relative-addressing' type=int items=1
            value=00000001
...

modinfo 显示内核中加载的模块
    /usr/sbin/modinfo [-c] [-w] [-i module-id]
#modinfo
Id Loadaddr   Size Info Rev Module Name
  6  1172000   42db   1   1  specfs (filesystem for specfs)
  8  11779c8   38c4   1   1  TS (time sharing sched class)
  9  117ab28    8dc   -   1  TS_DPTBL (Time sharing dispatch table)
10  117abb8  2b641   2   1  ufs (filesystem for ufs)
11  11a4079    1c7   -   1  fssnap_if (File System Snapshot Interface)
12  11a4199   1b0a   1   1  rootnex (sun4u root nexus 1.94)
13  11a5896    210  57   1  options (options driver)
15  11a5f72   181a  12   1  sad (STREAMS Administrative Driver ')
16  11a74ec    64b   2   1  pseudo (nexus driver for 'pseudo')
17  11a79c5  20eb3  32   1  sd (SCSI Disk Driver 1.397)
18  11c6af0   8609   -   1  scsi (SCSI Bus Utility Routines)
22  11ec632  1002b  50   1  glm (GLM SCSI HBA Driver 1.180.)
23  11fa5dd   df3b 111   1  pcipsy (PCI Bus nexus driver 1.210)
25  1210b85   15b7   -   1  dada ( ATA Bus Utility Routines)
27  121264b    73a   -   1  todmostek (tod module for Mostek M48T59 1.)
28  11cc29d  1a762   5   1  procfs (filesystem for proc)
29  11e5f03   6965 131   1  envctrl (I2C ENVCTRL_driver: 1.55 01/04/)
30  12075f8   15cb 126   1  ebus (ebus nexus driver 1.44)
32  12210e8  1213d   6   1  sockfs (filesystem for sockfs)
34  1211da4    6ae  11   1  clone (Clone Pseudodriver 'clone')
35  1232d75  6ac0e   0   1  ip (IP Streams module)
35  1232d75  6ac0e   3   1  ip (IP Streams device 1.44)
36  12121fa    34f   1   1  ip6 (IP Streams module)
36  12121fa    34f 143   1  ip6 (IP Streams device 1.7)
37  1296f3b  26609   2   1  tcp (TCP Streams module)
37  1296f3b  26609  42   1  tcp (TCP Streams device 1.46)
38  1209a19   107d   -   1  md5 (MD5 Message-Digest Algorithm)
39  121238e    365   3   1  tcp6 (TCP Streams module)
39  121238e    365 146   1  tcp6 (TCP Streams device 1.6)
40  1212cfd   9cff   4   1  udp (UDP Streams module)
40  1212cfd   9cff  41   1  udp (UDP Streams device 1.39)
41  11ebbf0    365   5   1  udp6 (UDP Streams module)
41  11ebbf0    365 145   1  udp6 (UDP Streams device 1.6)
42  12b6358   81f3   6   1  icmp (ICMP Streams module)
42  12b6358   81f3   5   1  icmp (ICMP Streams device 1.39)
43  11ebd95    351   7   1  icmp6 (ICMP Streams module)
43  11ebd95    351 144   1  icmp6 (ICMP Streams device 1.7)
44  120a9e1   69db   8   1  arp (ARP Streams module)
44  120a9e1   69db  44   1  arp (ARP Streams driver 1.38)
45  121ae7c   45ca   9   1  timod (transport interface str mod)
47  121fd7b    c53  16   1  conskbd (Console kbd Multiplexer driver )
48  12bcafb   1eca  15   1  wc (Workstation multiplexer Driver )
49  12bdda5   4824  37   1  su (su driver 1.53)
51  12c3eb6   4056  10   1  kb (streams module for keyboard)
52  12c6cbc   18c0  11   1  ms (streams module for mouse)
53  11ebf2b    a37  17   1  consms (Mouse Driver for Sun 'consms' 5)
54  12c8378   a826  68   1  gfxp (TSI tspci driver 1.18)
55  12d0e36    d77  14   1  iwscn (Workstation Redirection driver )
60  1302759   4a4e   1   1  elfexec (exec module for elf)
60  1302759   4a4e   0   1  elfexec (32-bit exec module for elf)
67  1307995   3459   3   1  fifofs (filesystem for fifo)
71  131106e   4884   -   1  mpxio (Multipath Interface Library v1.)
75  12f33c2   f14a  12   1  ldterm (terminal line discipline)
76  12d19f5   246d  13   1  ttcompat (alt ioctl calls)
77  1349d2b   8c6b  29   1  zs (Z8530 serial driver V4.127)
78  130ab46   15d0  26   1  ptsl (tty pseudo driver slave 'ptsl' )
79  130be66   1e77  25   1  ptc (tty pseudo driver control 'ptc')
81  12d3e95   ac42  20   1  se (Siemens SAB 82532 ESCC2 1.122)
82  130db2d   1cac  14   1  rts (Routing Socket Streams module)
82  130db2d   1cac  43   1  rts (Routing Socket Streams device 1)
86  13809d7   4be3 105   1  tl (TPI Local Transport Driver - tl)
87  13851d2   48ab  17   1  keysock (PF_KEY Socket Streams module)
87  13851d2   48ab 139   1  keysock (PF_KEY Socket Streams device 1.)
88  1388bf5   31ef 195   1  spdsock (PF_POLICY Socket Streams device)
89  130f071   1672  97   1  sysmsg (System message redirection (fan)
90  12103b4    82c   0   1  cn (Console redirection driver 5.57)
91  1177525    4b5   2   1  intpexec (exec mod for interp)
92  12d3c99    2cb  42   1  pipe (pipe(2) syscall)
92  12d3c99    2cb  42   1  pipe (32-bit pipe(2) syscall)
93  130ff53   10b5  13   1  mm (memory driver 1.67)
94  138b954   e769   7   1  hme (10/100Mb Ethernet Driver v1.160)
95  1397e01   1669  15   1  mntfs (mount information file system)
96  121f7fc    5e4  19   1  dump (crash dump driver 1.5)
97  13991e6   733f   -   1  ufs_log (Logging UFS Module)
98  1301c19    fd0  12   1  fdfs (filesystem for fd)
99  139fc3d   4647 201   1  doorfs (doors)
99  139fc3d   4647 201   1  doorfs (32-bit door syscalls)
100  13a3f71   15a8   4   1  namefs (filesystem for namefs)
101  13a527b  15e62  11   1  tmpfs (filesystem for tmpfs)
102  12e0c8c   1054  90   1  kstat (kernel statistics driver 1.18)
103  13ab94d    9ff  21   1  log (streams log driver)
104  1176053   1bba 190   1  random (random number device v1.8)
105  12c2249   1b66   -   1  sha1 (SHA1 Message-Digest Algorithm)
106  13070a4    903  22   1  sy (Indirect driver for tty 'sy' 1.)
107  1220632    ce4  23   1  ptm (Master streams driver 'ptm' 1.4)
108  13aaa71    d36  24   1  pts (Slave Stream Pseudo Terminal dr)
109  121e3ee   15a7  18   1  ptem (pty hardware emulator)
110  12de47f   293d  52   1  shmsys (System V shared memory)
110  12de47f   293d  52   1  shmsys (32-bit System V shared memory)
111  13ab54d    3dc   -   1  ipc (common ipc code)
112  12087ab    838  72   1  ksyms (kernel symbols driver 1.25)
113  12e1b68   193c  19   1  telmod (telnet module)
114  12e331d   1a5f   4   1  logindmux (logindmux driver 1.23)
115  12e4a5c   10b7 207   1  pset (processor sets)
115  12e4a5c   10b7 207   1  pset (32-bit pset(2) syscall)
116  12e5a54   3a01  88   1  devinfo (DEVINFO Driver 1.44)
117  12e929d   1ee9  38   1  openeepr (OPENPROM/NVRAM Driver v1.9)
kstat - 显示内核统计信息
     kstat [-lpq] [-T  u  |  d  ]  [-c  class]  [-m  module]  [-i
     instance] [-n name] [-s statistic] [interval  [count]]
     kstat    [-lpq]    [-T     u    |    d    ]    [-c    class]
     [module:instance:name:statistic...] [interval  [count]]
# kstat hme:0:hme0:ipackets  检测 hme0 网卡上的数据包
module: hme                             instance: 0
name:   hme0                            class:    net
        ipackets                        123816829
#kstat hme:0:hme0:ifspeed    检测网卡速度
module: hme                             instance: 0
name:   hme0                            class:    net
        ifspeed                         100000000
prtdiag - 显示系统诊断信息
     /usr/platform/platform-name/sbin/prtdiag [-v] [-l]
     prtdiag 显示 sun4u 系统上的系统配置和诊断信息
# prtdiag -v 可以显示电源,CPU 的风扇,温度,还可以显示前面板上指示灯状态。 
输出:
系统配置:  Sun Microsystems  sun4u Sun Enterprise 450 (2 X UltraSPARC-II 400MHz)
系统时钟频率:100 MHz
内存大小:1024 兆字节
========================= CPUs =========================
                    Run   Ecache   CPU    CPU
Brd  CPU   Module   MHz     MB    Impl.   Mask
---  ---  -------  -----  ------  ------  ----
SYS     1     1      400     4.0   US-II    10.0
SYS     3     3      400     4.0   US-II    10.0
========================= 内存 =========================
Memory Interleave Factor = 2-way
       Interlv.  Socket   Size
Bank    Group     Name    (MB)  Status
----    -----    ------   ----  ------
  0        0       1901   128      OK
  0        0       1902   128      OK
  0        0       1903   128      OK
  0        0       1904   128      OK
  0        0       1801   128      OK
  0        0       1802   128      OK
  0        0       1803   128      OK
  0        0       1804   128      OK
  1        0       1801   128      OK
  1        0       1802   128      OK
  1        0       1803   128      OK
  1        0       1804   128      OK
========================= IO 卡 =========================
     Bus   Freq
Brd  Type  MHz   Slot  Name                              Model
---  ----  ----  ----  --------------------------------  ----------------------
SYS   PCI    33     9   TSI,gfxp                          GFXP
系统中未发现故障
===========================
========================= 环境状态 =========================
System Temperatures (Celsius):
  ------------------------------
AMBIENT    17
CPU 1      40
CPU 3      40
=================================
Front Status Panel:
-------------------
Keyswitch position is in On mode.
System LED Status:    POWER     GENERAL ERROR      ACTIVITY
                      [ ON]         [OFF]           [OFF]
                    DISK ERROR  THERMAL ERROR  POWER SUPPLY ERROR
                      [OFF]         [OFF]           [OFF]
Disk LED Status:        OK = GREEN      ERROR = YELLOW
                DISK  2:    [OK]        DISK  3:    [OK]
                DISK  0:    [OK]        DISK  1:    [OK]
=================================
Fans:
-----
Fan Bank   Speed    Status
--------   -----    ------
CPU          49       OK
PWR          31       OK
Power Supplies:
---------------
Supply     Rating    Temp    Status
------     ------    ----    ------
  0         550 W     29       OK
  1         550 W     29       OK
========================= HW 修订 =========================
ASIC Revisions:
---------------
STP2223BGA: Rev 4
STP2223BGA: Rev 4
STP2223BGA: Rev 4
STP2003QFP: Rev 1
STP2205BGA: Rev 1
系统 PROM 修订:
----------------------
           
           
psrinfo - 显示处理器信息
     psrinfo [-v] [processor_id...]
     psrinfo -s processor_id
     
#psrinfo -v
处理器 1 的状态如同: 02/18/2006 19:24:02
  处理器已 行 (自 11/26/2005 09:26:38 开始)。
  sparcv9 处理器以 400 MHz 运行,
  而且有 sparcv9 浮点数处理器
处理器 3 的状态如同: 02/18/2006 19:24:02
  处理器已 行 (自 11/26/2005 09:26:39 开始)。
  sparcv9 处理器以 400 MHz 运行,
  而且有 sparcv9 浮点数处理器
eeprom - 显示和加载 EEPROM
  SPARC
     /usr/platform/ platform-name /sbin/eeprom [-] [-f device]  [
     parameter  [=value]]
  IA
     /usr/platform/ platform-name  /sbin/eeprom  [-]  [-f device]
     [-I] [mmu-modlist] [ parameter [ =value]]
# eeprom -v
tpe-link-test?=true
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
.reboot-flag=false
.reboot-posc=0
.reboot-posl=33
.reboot-cmd=boot
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
sysdef - 输出系统定义信息
     /usr/sbin/sysdef [-n namelist]
     /usr/sbin/sysdef [-h] [-d] [-D]

prtvtoc - 显示磁盘分区信息
     prtvtoc [-fhs] [-t vfstab] [-m mnttab] device
     
# prtvtoc  /dev/dsk/c0t0d0s0
* /dev/dsk/c0t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*     133 sectors/track
*      27 tracks/cylinder
*    3591 sectors/cylinder
*    4926 cylinders
*    4924 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    3099033   7138908  10237940   /
       1      3    01          0   1052163   1052162
       2      5    00          0  17682084  17682083
       6      0    00    1052163   2046870   3099032   /tmp
       7      4    00   10237941   7444143  17682083   /usr
devinfo - 输出设备指定信息
     /usr/sbin/devinfo -i device
     /usr/sbin/devinfo -p device
# devinfo -p /dev/rdsk/c0t0d0s0
/dev/rdsk/c0t0d0s0      20      0       3099033 7138908 0       2
showrev - 显示机器,软件版本以及补丁版本信息
     /usr/bin/showrev [-a]  [-p  |  -p  -R  root_path]   [-w]  [-
     c command] [-s hostname]
     除了显示众所周知的补丁信息以外,其实 showrev 能够显示可执行文件的状态
     
# showrev -c php
PATH is: ......
PWD is: ......
LD_LIBRARY_PATH is: ......
File: /usr/local/bin/php
========================
File type: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
Command version: as: Sun WorkShop 6 update 2 Compiler Common 6.2 Solaris_9_CBE 2001/04/02
......
# showrev -c kstat
File: /usr/bin/kstat
====================
File type: executable /usr/perl5/bin/perl script
Command version: kstat.pl       1.3     01/11/09 SMI
File mode: r-xr-xr-x
User owning file: root
Group owning file: bin
Sum: 16958
________________________________________________________________________
File: /bin/kstat
================
File type: executable /usr/perl5/bin/perl script
Command version: kstat.pl       1.3     01/11/09 SMI
File mode: r-xr-xr-x
User owning file: root
Group owning file: bin
Sum: 16958


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/25705/showart_402000.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP