现场工程师SUN设备维护手册更新日期:2002 年 6 月18 日版本:2.0目录技术部分1系统维护 (1)1.1 系统日常维护操作 (1)1.2 操作命令示例 (3)2常用SUN企业级服务器介绍 (12)2.1 E250服务器 (12)2.2 E450服务器 (12)2.3 E3000/E3500服务器 (13)2.4 E4000/E4500服务器 (13)2.5 E5000/E5500服务器 (13)2.6 E6000/E6500服务器 (14)3SUN系统管理员常用概念/命令 (15)3.1 SUN服务器体系结构 (15)3.2 系统自检(POST)/O PENBOOT(P ROM)/IDPROM/VNRAM常用命令 (19)3.3 S OLARIS 操作系统的安装: (22)3.4 应用软件常用安装/删除命令(ADD/DELETE SOFTWARE) (23)3.5 补丁管理命令P ATCH (24)3.6 操作系统启动过程及运行级别 (24)3.7 操作系统启动/关闭时运行的脚本命令 (26)3.8 硬盘分区及格式化(DISK PARTITION AND FORMAT ) (27)3.9 S OLARIS 文件系统管理(UNIX FILE SYSTEM ) (28)3.10 系统备份/恢复(BACKUP AND RESTORE ) (29)3.11 网络管理(NETWORK) (31)3.12 路由服务器: (34)3.13 域名服务器(DNS) (34)3.14 NIS服务器 (35)3.15 NFS文件系统(NFS FILE SYSTEM ) (37)3.16 并行打印机/显示器管理(P ARALLEL P ORT P RINTER ) (38)3.17 用户管理USER ACCOUNT (39)3.18 系统资源限制(如:同时打开文件数、文件大小、CPU利用限制...) (41)3.19 系统性能监控和管理 (41)3.20 常用UNIX命令集锦(C OMMONLY USED UNIX COMMANDS ) (41)4数据保护 (43)4.1 常用概念 (43)4.1.1存储(Storage): (43)4.1.2备份(Backup): (43)4.1.3恢复(Restore): (43)4.1.4归档(Archive): (44)4.2 存储介质操作 (45)4.2.1介质环境适应(Media Acclimation) (45)4.2.2介质操作环境(Operating Environment) (45)4.2.3介质存储环境(Storage Environment) (45)4.3 注意事项: (45)4.3.1要求作到 (45)4.3.2要求避免 (46)5机房场地规划要求 (47)5.1 环境部分 (47)5.2 电力部分 (47)5.3 空调照明消防部分 (49)5.4 存储要求 (49)技术部分1系统维护1.1系统日常维护操作机器S/N 日期:20 年月日步骤检测内容命令功能是否正常1 状态灯观察系统面板状态灯,是否有橙色维修报警灯亮?是□否□2 确定系统基本信息# uname –a Displays system information 是□否□3 # last Tells who was or still is on thesystem 是□否□4 系统低层信息诊断# /usr/sbin/prtconf –vp Show system configuration details 是□否□5 # psrinfo | wc –l Display number of processors是否有CPU处于离线(offline)状态?CPU是否与实际相符? 是□否□6 # prtconf | grep "Memory size" Display Memory SizeMEM是否与实际相符? 是□否□7 # /usr/platform/sun4u/sbin/prtdiag -v |more prtdiag displays systemconfiguration and diagnosticinformation on sun4u and sun4dsystems. The diagnosticinformation lists any failed FieldReplaceable Units (FRUs) in thesystem.是否有警告/错误? 是□否□8 系统日志分析# vi /var/adm/messages Check error/WARNING messages是否有警告/错误? 是□否□9 文件系统/磁盘分析# df –k Check number of free disk blocksand files是否有文件系统使用率大于90%?是否所有文件系统都已安装(mount)?是□否□10 # swap –s Print summary information abouttotal swap spaceusage and availability交换区是否用完? 是□否□11 # format disk partitioning and maintenanceutility硬盘数是否与实际相符? 是□否□12 # prtvtoc /dev/rdsk/c?t?d?s2 Disk geometry and partitioning info 是□否□13 # vxdisk list List detailed disk information onthe specified disks.是否有vm disk* 处于error状态? 是□否□14 # vxdg list List the content of disk group是否有磁盘组(disk group)不见? 是□否□15 # vxprint -ht display records from the VolumeManager configuration and status 是□否□16 # luxadm probe Finds and displays informationabout all attached A5x00subsystems, including the logicalpathname, the WWNs, andenclosure names. Thissubcommand warns the user if itfinds different SENAs with thesame enclosure names. 是□否□17 #mt –f /dev/rmt/0 Check the tape driver status 是□否□18 网络分析# ifconfig -a configure network interfaceparameters displays the currentconfiguration 是□否□19 # /etc/opt/SUNWconn/bin/nettr -stats 0device=qfe Checked Trunking interface To getbasic performance data是□否□20 # ndd /dev/ip \? Shows IP variables in the kernel 是□否□21 # netstat -i 5 5 在errs 栏是否有明显大量错误?在colls 栏是否有明显大量冲突? 是□否□22 # netstat -a Displays number active establishedconnections to the localhost是否有异常的端口状态? 是□否□23 # netstat –r Show network route table 是□否□24 # traceroute <ipaddress> Follow the route to the ip address 是□否□25 性能分析# /usr/ucb/ps -aux | more Displays CPU % usage for eachprocess in ascending order 是□否□26 # sar –u 5 20 Report CPUUtilization, %usr, %sys, %wio, %idle; portion of time running in usermode, running in system mode, idlewith some process waiting forblock I/O, and otherwise idle. 是□否□27 # iostat -xn 20 5 Command to display drivesstatistics系统是否I/O繁忙(%b>30)? 是□否□28 # vmstat 10 Displays summary of what thesystem is doing every 10 seconds系统是否内存不够(sr栏>200)?系统是否CPU资源不够(id<10)? 是□否□1.2操作命令示例edis# netstat -i 5input hme0 output input (Total) outputpackets errs packets errs colls packets errs packets errs colls 38646105 20969 9013311 0 0 56861879 20969 27229085 0 0 23 0 1 0 0 75 0 53 0 025 0 2 0 0 25 0 2 0 030 0 3 0 0 68 0 41 0 037 0 44 0 0 80 0 87 0 022 0 2 0 0 34 0 14 0 019 0 2 0 0 50 0 33 0 029 0 3 0 0 75 0 49 0 017 0 2 0 0 50 0 35 0 013 0 2 0 0 23 0 12 0 029 0 2 0 0 29 0 2 0 036 0 2 0 0 36 0 2 0 0 edis# netstat -a |moreUDPLocal Address Remote Address State-------------------- -------------------- -------*.sunrpc Idle*.* Unbound*.32771 Idle*.name Idle*.biff Idle*.talk Idle*.time Idle*.echo Idle*.discard Idle*.daytime Idle*.chargen Idle*.32775 Idle*.32776 Idle*.32777 Idle*.32778 Idle*.32779 Idle*.32780 Idle*.32781 Idle*.32784 Idle*.lockd Idle*.syslog Idle*.32791 Idle*.177 Idle*.32792 Idle*.32793 Idle*.161 Idle*.32797 Idle*.32798 Idle*.32796 Idle*.* Unbound*.6500 Idle*.camudp Idle*.162 Idle*.33050 Idle*.33051 Idle*.6665 Idle*.* UnboundTCPLocal Address Remote Address Swind Send-Q Rwind Recv-Q State -------------------- -------------------- ----- ------ ----- ------ ------- *.* *.* 0 0 0 0 IDLE*.sunrpc *.* 0 0 0 0 LISTEN *.* *.* 0 0 0 0 IDLE*.ftp *.* 0 0 0 0 LISTEN *.telnet *.* 0 0 0 0 LISTEN *.shell *.* 0 0 0 0 LISTEN *.login *.* 0 0 0 0 LISTEN *.exec *.* 0 0 0 0 LISTEN *.uucp *.* 0 0 0 0 LISTEN *.finger *.* 0 0 0 0 LISTEN *.time *.* 0 0 0 0 LISTEN *.echo *.* 0 0 0 0 LISTEN *.discard *.* 0 0 0 0 LISTEN *.daytime *.* 0 0 0 0 LISTEN *.chargen *.* 0 0 0 0 LISTEN *.32771 *.* 0 0 0 0 LISTEN *.32772 *.* 0 0 0 0 LISTEN *.fs *.* 0 0 0 0 LISTEN *.32773 *.* 0 0 0 0 LISTEN *.printer *.* 0 0 0 0 LISTEN *.dtspc *.* 0 0 0 0 LISTEN *.xaudio *.* 0 0 0 0 LISTEN *.32774 *.* 0 0 0 0 LISTEN *.32775 *.* 0 0 0 0 LISTEN *.32776 *.* 0 0 0 0 LISTEN *.bpcd *.* 0 0 0 0 LISTEN *.vopied *.* 0 0 0 0 LISTEN *.bpjava-msvc *.* 0 0 0 0 LISTEN *.32777 *.* 0 0 0 0 LISTEN *.lockd *.* 0 0 0 0 LISTEN*.smtp *.* 0 0 0 0 LISTEN*.32778 *.* 0 0 0 0 LISTEN*.32779 *.* 0 0 0 0 LISTEN*.32780 *.* 0 0 0 0 LISTEN*.* *.* 0 0 0 0 IDLE*.* *.* 0 0 0 0 IDLE*.* *.* 0 0 0 0 IDLE*.32781 *.* 0 0 0 0 LISTEN*.32782 *.* 0 0 0 0 LISTEN*.32783 *.* 0 0 0 0 LISTEN*.* *.* 0 0 0 0 IDLE*.32784 *.* 0 0 0 0 LISTEN*.32785 *.* 0 0 0 0 LISTEN*.32786 *.* 0 0 0 0 LISTEN*.32787 *.* 0 0 0 0 LISTEN*.32788 *.* 0 0 0 0 LISTEN*.32789 *.* 0 0 0 0 LISTEN*.32790 *.* 0 0 0 0 LISTEN*.32791 *.* 0 0 0 0 LISTEN*.32792 *.* 0 0 0 0 LISTEN*.* *.* 0 0 0 0 IDLE*.* *.* 0 0 0 0 IDLE*.1521 *.* 0 0 0 0 LISTEN edis.2649 *.* 0 0 0 0 LISTEN edis.2651 *.* 0 0 0 0 LISTEN edis.32898 edis.2649 32768 0 32768 0 ESTABLISHED edis.2649 edis.32898 32768 0 32768 0 ESTABLISHED *.32899 *.* 0 0 0 0 LISTEN edis.32900 edis.2649 32768 0 32768 0 ESTABLISHEDedis# ifconfig -alo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232inet 127.0.0.1 netmask ff000000hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500inet 10.243.1.95 netmask ffffff00 broadcast 10.243.1.255ether 8:0:20:ad:d6:47edis# ping gdmal001 is aliveedis# formatSearching for disks...doneAVAILABLE DISK SELECTIONS:0. c1t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>/sbus@3,0/QLGC,isp@0,10000/sd@0,01. c1t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>/sbus@3,0/QLGC,isp@0,10000/sd@1,02. c1t8d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>/sbus@3,0/QLGC,isp@0,10000/sd@8,03. c1t9d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>/sbus@3,0/QLGC,isp@0,10000/sd@9,0Specify disk (enter its number):edis# df -kFilesystem kbytes used avail capacity Mounted on/dev/dsk/c1t0d0s0 1018191 81032 876068 9% //dev/dsk/c1t0d0s4 2056211 511060 1483465 26% /usr/proc 0 0 0 0% /procfd 0 0 0 0% /dev/fd/dev/dsk/c1t0d0s5 1018191 204755 752345 22% /var/dev/dsk/c1t0d0s6 8068221 4316583 3670956 55% /export/dev/dsk/c1t0d0s3 1018191 216595 740505 23% /opt/dev/md/dsk/d0 51728612 21259039 29952287 42% /oracleswap 7391456 18608 7372848 1% /tmpedis# swap -lswapfile dev swaplo blocks free/dev/dsk/c1t0d0s1 32,1 16 4099424 4099408/dev/dsk/c1t0d0s7 32,7 16 4194272 4194272gdwww001# vxdisk listDEVICE TYPE DISK GROUP STATUSc0t0d0s2 sliced - - errorc0t0d0s7 simple c0t0d0s7 rootdg onlinec1t32d0s2 sliced - - errorc1t35d0s2 sliced oracle02 oracledg onlinec1t38d0s2 sliced oracle01 oracledg onlinec1t50d0s2 sliced oracle03 oracledg onlinec1t51d0s2 sliced oracle04 oracledg onlinegdwww001# vxdg listNAME STATE IDrootdg enabled 938671525.1025.gdqry001oracledg enabled 938675696.1064.gdqry001gdwww001# vxprint -htDisk group: rootdgDG NAME NCONFIG NLOG MINORS GROUP-IDDM NAME DEVICE TYPE PRIVLEN PUBLEN STATEV NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEXPL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODEdg rootdg default default 0 938671525.1025.gdqry001dm c0t0d0s7 c0t0d0s7 simple 1024 9748 -Disk group: oracledgDG NAME NCONFIG NLOG MINORS GROUP-IDDM NAME DEVICE TYPE PRIVLEN PUBLEN STATEV NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEXPL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODEdg oracledg default default 82000 938675696.1064.gdqry001dm oracle01 c1t38d0s2 sliced 4711 35363560 -dm oracle02 c1t35d0s2 sliced 4711 35363560 -dm oracle03 c1t50d0s2 sliced 4711 35363560 -dm oracle04 c1t51d0s2 sliced 4711 35363560 -v vol01 fsgen ENABLED ACTIVE 35363560 SELECT -pl vol01-02 vol01 ENABLED ACTIVE 35363560 CONCAT - RW sd oracle02-01 vol01-02 oracle02 0 35363560 0 c1t35d0 ENA pl vol01-01 vol01 ENABLED ACTIVE 35363560 CONCAT - RW sd oracle01-01 vol01-01 oracle01 0 35363560 0 c1t38d0 ENAv vol02 fsgen ENABLED ACTIVE 35363560 SELECT -pl vol02-01 vol02 ENABLED ACTIVE 35363560 CONCAT - RW sd oracle03-01 vol02-01 oracle03 0 35363560 0 c1t50d0 ENA pl vol02-02 vol02 ENABLED ACTIVE 35363560 CONCAT - RW sd oracle04-01 vol02-02 oracle04 0 35363560 0 c1t51d0 ENAedis# psrinfo -vStatus of processor 0 as of: 06/14/02 14:51:51Processor has been on-line since 04/26/02 15:08:40.The sparc processor operates at 400 MHz,and has a sparc floating point processor.Status of processor 1 as of: 06/14/02 14:51:51Processor has been on-line since 04/26/02 15:08:43.The sparc processor operates at 400 MHz,and has a sparc floating point processor.Status of processor 4 as of: 06/14/02 14:51:51Processor has been on-line since 04/26/02 15:08:43.The sparc processor operates at 400 MHz,and has a sparc floating point processor.Status of processor 5 as of: 06/14/02 14:51:51Processor has been on-line since 04/26/02 15:08:43.The sparc processor operates at 400 MHz,and has a sparc floating point processor.edis# /usr/platform/sun4u/sbin/prtdiag -v |moreSystem Configuration: Sun Microsystems sun4u 8-slot Sun Enterprise E4500/E5500 System clock frequency: 100 MHzMemory size: 4096Mb========================= CPUs =========================Run Ecache CPU CPUBrd CPU Module MHz MB Impl. Mask--- --- ------- ----- ------ ------ ----0 0 0 400 8.0 US-II 10.00 1 1 400 8.0 US-II 10.02 4 0 400 8.0 US-II 10.02 5 1 400 8.0 US-II 10.0========================= Memory =========================Intrlv. Intrlv.Brd Bank MB Status Condition Speed Factor With--- ----- ---- ------- ---------- ----- ------- -------0 0 1024 Active OK 60ns 4-way A0 1 1024 Active OK 60ns 4-way A2 0 1024 Active OK 60ns 4-way A2 1 1024 Active OK 60ns 4-way A========================= IO Cards =========================Bus FreqBrd Type MHz Slot Name Model--- ---- ---- ---- -------------------------------- ---------------------- 1 SBus 25 0 QLGC,isp/sd (block) QLGC,ISP1000U 1 SBus 25 3 SUNW,hme 1 SBus 25 3 SUNW,fas/sd (block) 1 SBus 25 13 SUNW,socal/sf (scsi-3) 501-3060 1 UPA 100 2 FFB, Double Buffered SUNW,501-4790No failures found in System===========================No System Faults found=============================================== Environmental Status ========================= Keyswitch position is in Secure ModeSystem Power Status: RedundantSystem LED Status: GREEN YELLOW GREENNormal ON OFF BLINKINGFans:-----Unit Status---- ------Rack OKKey OKAC OKSystem Temperatures (Celsius):------------------------------Brd State Current Min Max Trend--- ------- ------- --- --- -----0 OK 32 26 37 stable1 OK 37 36 41 stable2 OK 33 29 38 stableCLK OK 28 25 30 stablePower Supplies:---------------Supply Status--------- ------0 OK1 OK2 OK3 OKPPS OKSystem 3.3v OKSystem 5.0v OKPeripheral 5.0v OKPeripheral 12v OKAuxilary 5.0v OKPeripheral 5.0v precharge OKPeripheral 12v precharge OKSystem 3.3v precharge OKSystem 5.0v precharge OKAC Power OK========================= HW Revisions =========================ASIC Revisions:---------------Brd FHC AC SBus0 SBus1 PCI0 PCI1 FEPS Board Type Attributes--- --- -- ----- ----- ---- ---- ---- ---------- ----------0 1 5 CPU 100MHz Capable1 1 5 1 22 UPA-SBus-SOC+ 100MHz Capable2 1 5 CPU 100MHz CapableBoard 1 FFB Hardware Configuration:-----------------------------------Board rev: 2FBC version: 0x3241906dDAC: Brooktree 9070, version 13DRAM: Mitsubishi 130b, version 2System Board PROM revisions:----------------------------Board 0: OBP 3.2.28 2000/12/20 12:24 POST 3.9.28 2000/12/20 12:29 Board 1: FCODE 1.8.28 2000/12/20 12:22 iPOST 3.4.28 2000/12/20 12:28 Board 2: OBP 3.2.28 2000/12/20 12:24 POST 3.9.28 2000/12/20 12:29edis# vmstat 5 5procs memory page disk faults cpur b w swap free re mf pi po fr de sr m0 s0 s1 s7 in sy cs us sy id 0 0 0 7968 1688 0 16 0 4 4 0 0 1 1 1 0 621 685 290 0 1 99 0 0 0 7383872 74640 0 1 0 0 0 0 0 2 3 2 0 617 662 255 0 1 98 0 0 0 7383872 74640 0 0 0 0 0 0 0 1 0 1 0 616 528 321 0 1 99 0 0 0 7383664 74512 0 291 0 0 0 0 0 1 2 1 0 621 3459 379 3 2 94 0 0 0 7383872 74640 0 0 0 0 0 0 0 1 0 1 0 615 533 336 0 1 99edis# iostat -xn 20 5extended device statisticsr/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device0.0 1.2 0.0 14.0 0.0 0.0 0.0 16.7 0 1 d00.0 0.8 0.0 6.3 0.0 0.1 4.1 63.2 0 0 c1t0d00.0 1.2 0.0 11.6 0.0 0.0 0.0 16.7 0 1 c1t1d00.0 0.0 0.0 1.3 0.0 0.0 0.6 17.9 0 0 c1t8d00.0 0.0 0.0 1.1 0.0 0.0 0.0 11.2 0 0 c1t9d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 edis:vold(pid249) extended device statisticsr/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device0.0 1.1 0.0 8.4 0.0 0.0 0.0 19.0 0 1 d00.0 0.1 0.0 0.4 0.0 0.0 0.0 8.7 0 0 c1t0d00.0 1.1 0.0 8.4 0.0 0.0 0.0 19.0 0 1 c1t1d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t8d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t9d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 edis:vold(pid249) extended device statisticsr/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device0.0 1.1 0.0 8.8 0.0 0.0 0.0 15.9 0 1 d00.0 1.0 0.0 7.8 0.0 0.1 0.0 58.4 0 1 c1t0d00.0 1.1 0.0 8.8 0.0 0.0 0.0 15.8 0 1 c1t1d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t8d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t9d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 edis:vold(pid249) extended device statisticsr/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device0.0 1.0 0.0 8.4 0.0 0.0 0.0 18.6 0 1 d00.0 0.0 0.0 0.1 0.0 0.0 0.0 13.1 0 0 c1t0d00.0 1.0 0.0 8.4 0.0 0.0 0.0 18.6 0 1 c1t1d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t8d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t9d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 edis:vold(pid249) extended device statisticsr/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device0.0 1.1 0.0 8.8 0.0 0.0 0.0 15.9 0 1 d00.0 0.5 0.0 3.5 0.0 0.0 0.0 24.3 0 0 c1t0d00.0 1.1 0.0 8.8 0.0 0.0 0.0 15.9 0 1 c1t1d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t8d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t9d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 edis:vold(pid249)% mt status/dev/rmt/0n: no tape loaded or drive offline% mt -f /dev/rmt/0n statusHP DDS-3 4MM DAT tape drive:sense key(0x6)= Unit Attention residual= 0 retries= 0file no= 0 block no= 0garden:/home/dyin 3 %2常用Sun企业级服务器介绍Sun企业级服务器的RAS特性(Reliablility,Availability,Serviceability):UltraSPARC微处理器“马力”强劲;Gigaplane系统互联,速度保证;可靠技术,易于更换出错部件。