分类:
2011-03-20 17:11:41
原文地址: Solaris的硬件相关命令 一 作者:liyf0371
l 背景信息:
在日常case处理中经常要问及一些新机器的这样那样的硬件问题,简单总结一下,希望对大家有些帮助
l 操作步骤
Solaris的硬件相关命令
1.查看当前处理器的类型和速度(主频)
# psrinfo –v
Status of processor 1 as of:
Processor has been on-line since 11/24/01 10:18:20.
The sparcv9 processor operates at 432 MHz,
and has a sparcv9 floating point processor.
Status of processor 3 as of: 11/24/01 10:34:41
Processor has been on-line since 11/24/01 10:18:22.
The sparcv9 processor operates at 432 MHz,
and has a sparcv9 floating point processor.
2.打印当前的OBP版本号
# prtconf –V
OBP
# /usr/platform/sun4u/sbin/prtdiag –v | grep OBP
OBP 3.20.0
ok. .version
Release 3.20 Version 0 created
OBP 3.20.0
POST 6.1.0
OBDIAG 4.5.1
3.查看硬盘物理信息(vendor, RPM, Capacity)
# iostat –E
sd0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE Product: ST34371W SUN
Size: 4.29GB <4292075520 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd2 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU Product: MAJ
Size: 36.42GB <36418595328 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd3 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: FUJITSU Product: MAJ
Size: 36.42GB <36418595328 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd21 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: TOSHIBA Product: DVD-ROM SD-M1401 Revision: 1007 Serial No: 06/22/00
Size: 18446744073.71GB <-1 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
4.查看及启动系统的32位或64位内核模式
64位模式
# isalist –v
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
# isainfo –v
64-bit sparcv9 applications
32-bit sparc applications
# isainfo –b
64
启动64位内核模式
ok. boot kernel/sparcv9/unix
32位模式
# isalist –v
sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc
# isainfo –v
32-bit sparc applications
# isainfo –b
32
启动32位模式
ok. boot kernel/unix
5.查看当前的OpenWindows版本
# showrev –w
OpenWindows version:
X11 Version 6.4.1 5 November 2001
6.查看当前CDE的版本
# /usr/ccs/bin/what /usr/dt/bin/dtmail
/usr/dt/bin/dtmail:
CDE Version 1.4.6_06
CDEVersion1.4.6_06
7.查看系统配置
# /usr/platform/sun4u/sbin/prtdiag –v
System Configuration: Sun Microsystems sun4u Sun Enterprise 450 (2 X UltraSPAR
C-II 432MHz)
System clock frequency: 86 MHz
Memory size: 1024 Megabytes
========================= CPUs =========================
Run Ecache CPU CPU
Brd CPU Module MHz MB Impl. Mask
--More--
--- --- ------- ----- ------ ------ ----
SYS 1 1 432 4.0 US-II 10.0
SYS 3 3 432 4.0 US-II 10.0
========================= Memory =========================
Interlv. Socket Size
Bank Group Name (MB) Status
---- ----- ------ ---- ------
0 none 1901 256 OK
0 none 1902 256 OK
0 none 1903 256 OK
0 none 1904 256 OK
0 none 1701 256 OK
0 none 1702 256 OK
========================= IO Cards =========================
No failures found in System
===========================
========================= Environmental Status =========================
System Temperatures (Celsius):
------------------------------
AMBIENT 20
CPU 1 40
CPU 3 40
=================================
Front Status Panel:
-------------------
Keyswitch position is in On mode.
System LED Status: POWER GENERAL ERROR ACTIVITY
[ ON] [OFF] [ ON]
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: [EMPTY]
=================================
Fans:
-----
Fan Bank Speed Status
-------- ----- ------
CPU 49 OK
PWR 31 OK
Power Supplies:
---------------
Supply Rating Temp Status
------ ------ ---- ------
0 550 W 33 OK
1 550 W 33 OK
========================= HW Revisions =========================
ASIC Revisions:
---------------
STP2223BGA: Rev 4
STP2223BGA: Rev 4
STP2223BGA: Rev 4
STP2003QFP: Rev 1
STP2205BGA: Rev 1
System PROM revisions:
----------------------
OBP 3.20.0
8.查看当前系统中已经应用的补丁
# showrev –p
Patch: 109618-01 Obsoletes: Requires: Incompatibles: Packages: SUNWeuxwe, SUN
Weuezt, SUNWeudlg, SUNWeudda
Patch: 109889-01 Obsoletes: 109353-04 Requires: Incompatibles: Packages: SUNWk
vmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlx
Patch: 110369-05 Obsoletes: 110709-02 Requires: Incompatibles: Packages: SUNWk
vmx, SUNWcarx, SUNWcsr
Patch: 110370-03 Obsoletes: 111643-01 Requires: Incompatibles: Packages: SUNWk
vmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlx
Patch: 110373-04 Obsoletes: 111508-01 Requires: Incompatibles: Packages: SUNWk
vmx, SUNWcarx, SUNWcsr
Patch: 110374-08 Obsoletes: 110136-02, 110516-02 Requires: Incompatibles: Pack
ages: SUNWkvmx, SUNWcarx, SUNWcar, SUNWcsr, SUNWmdbx
…..
9.显示当前的运行级别
# who –rH
NAME LINE TIME IDLE PID COMMENTS
. run-level 3 Nov 24 10:18 3 0 S
(二)Data命令参数介绍(王超)
l 背景信息:
date命令可以用来显示和设置系统的日期和时间。其后可以带表示显示数据格式的参数,这些参数可以让你灵活的显示当前的时间格式:
l 操作步骤
%a:星期中每日名字的缩写
%A:星期中每日名字的全拼
%b:月份名的缩写
%B:月份名的全拼
%c:针对具体国家的日期和时间格式
%d:月中的某天,取值为01-31
%D:以格式%m%d%y表示的日期
%e:月中的某天,取值为1-31
%h:月份名的缩写(%b的别名)
%H:小时,取值为00-23
%I:小时,取值为01-12
%j:一年中的某天,取值为001-366
%m:一年中的某月,取值为01-12
%M:分钟,取值为00-59
%n:插入一个换行符
%p:包含午前或午后指示符的字符串(默认值为AM或PM)
%r:时间,格式为%I:%M:%S:%p
%R:时间,格式为%H:%M
%S:秒,取值为00-59
%t:插入一个制表符
%T:时间,格式为%H:%M:%S
%U:一年中的某星期(星期天为每星期的第一天),取值为00-53
%w:一年中的某天,星期天用0表示
%W:一年中的某星期(星期一为每星期的第一天),取值为00-53
%x:针对具体国家的日期格式
%X:针对具体国家的时间格式
%y:一个世纪中的某年,取值为0-99
%Y:年,其格式为ccyy(4个数字)
%Z:时区名
for example: #date '+DATE/%m/%d/%y%nTIME:%H:%M:%S'
显示为:DATE:
TIME:09:32:02