664524485现场工程师SUN设备现场维护手册.doc
现场工程师SUN设备维护手册版本:2.0目 录技术部分1系统维护11.1系统日常维护操作11.2操作命令示例32常用SUN企业级服务器介绍122.1E250服务器122.2E450服务器122.3E3000/E3500服务器132.4E4000/E4500服务器132.5E5000/E5500服务器132.6E6000/E6500服务器143SUN系统管理员常用概念/命令153.1SUN 服务器体系结构153.2系统自检(POST)/Openboot(Prom)/IDPROM/VNRAM 常用命令193.3Solaris 操作系统的安装:223.4应用软件常用安装/删除命令(add/delete software)233.5补丁管理命令Patch243.6操作系统启动过程及运行级别243.7操作系统启动/关闭时运行的脚本命令263.8硬盘分区及格式化(disk partition and format )273.9Solaris 文件系统管理(unix file system )283.10系统备份/恢复(backup and restore )293.11网络管理(network)313.12路由服务器:343.13域名服务器(dns)343.14NIS 服务器353.15NFS 文件系统(nfs file system )373.16并行打印机/显示器管理(Parallel Port Printer )383.17用户管理user account393.18系统资源限制(如:同时打开文件数、文件大小、CPU利用限制.)413.19系统性能监控和管理413.20常用UNIX命令集锦(Commonly used UNIX commands )414数据保护434.1常用概念434.1.1存储(Storage):434.1.2备份(Backup):434.1.3恢复(Restore):434.1.4归档(Archive):444.2存储介质操作454.2.1介质环境适应(Media Acclimation)454.2.2介质操作环境(Operating Environment)454.2.3介质存储环境(Storage Environment)454.3注意事项:454.3.1要求作到454.3.2要求避免 465机房场地规划要求475.1环境部分475.2电力部分475.3空调 照明 消防部分495.4存储要求49技术部分1 系统维护1.1 系统日常维护操作机器S/N 日期:20 年 月 日步骤检测内容命令功能是否正常1状态灯观察系统面板状态灯,是否有橙色维修报警灯亮?是 否 2确定系统基本信息# uname aDisplays system information是 否 3# lastTells who was or still is on the system 是 否 4系统低层信息诊断# /usr/sbin/prtconf vpShow system configuration details 是 否 5# psrinfo | wc lDisplay number of processors是否有CPU处于离线(offline)状态? CPU是否与实际相符? 是 否 6# prtconf | grep "Memory size"Display Memory SizeMEM是否与实际相符?是 否 7# /usr/platform/sun4u/sbin/prtdiag -v |moreprtdiag displays system configuration and diagnostic information on sun4u and sun4d systems. The diagnostic information lists any failed Field Replaceable Units (FRUs) in the system.是否有警告/错误?是 否 8系统日志分析# vi /var/adm/messages Check error/WARNING messages是否有警告/错误?是 否 9文件系统/磁盘分析# df kCheck number of free disk blocks and files是否有文件系统使用率大于90%?是否所有文件系统都已安装(mount)?是 否 10# swap sPrint summary information about total swap spaceusage and availability交换区是否用完?是 否 11# format disk partitioning and maintenance utility硬盘数是否与实际相符?是 否 12# prtvtoc /dev/rdsk/c?t?d?s2Disk geometry and partitioning info是 否 13# vxdisk listList detailed disk information on the specified disks.是否有 vm disk* 处于error状态?是 否 14# vxdg listList the content of disk group是否有磁盘组(disk group)不见?是 否 15# vxprint -htdisplay records from the Volume Manager configuration and status是 否 16# luxadm probeFinds and displays information about all attached A5x00 subsystems, including the logical pathname, the WWNs, and enclosure names. This subcommand warns the user if it finds different SENAs with the same enclosure names.是 否 17#mt f /dev/rmt/0Check the tape driver status是 否 18网络分析# ifconfig -aconfigure network interface parameters displays the current configuration是 否 19# /etc/opt/SUNWconn/bin/nettr -stats 0 device=qfeChecked Trunking interface To get basic 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 established connections to the localhost是否有异常的端口状态?是 否 23# netstat rShow network route table 是 否 24# traceroute <ipaddress>Follow the route to the ip address 是 否 25性能分析# /usr/ucb/ps -aux | moreDisplays CPU % usage for each process in ascending order 是 否 26# sar u 5 20Report CPU Utilization, %usr, %sys, %wio, %idle; portion of time running in user mode, running in system mode, idle with some process waiting for block I/O, and otherwise idle.是 否 27# iostat -xn 20 5Command to display drives statistics 系统是否I/O繁忙(%b>30)?是 否 28# vmstat 10Displays summary of what the system is doing every 10 seconds系统是否内存不够(sr栏>200)? 系统是否CPU资源不够(id<10)?是 否 1.2 操作命令示例edis# netstat -i 5 input 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 0 25 0 2 0 0 25 0 2 0 0 30 0 3 0 0 68 0 41 0 0 37 0 44 0 0 80 0 87 0 0 22 0 2 0 0 34 0 14 0 0 19 0 2 0 0 50 0 33 0 0 29 0 3 0 0 75 0 49 0 0 17 0 2 0 0 50 0 35 0 0 13 0 2 0 0 23 0 12 0 0 29 0 2 0 0 29 0 2 0 0 36 0 2 0 0 36 0 2 0 0 edis# netstat -a |more UDP Local 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 *.* UnboundTCP Local 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 LISTENedis.2649 *.* 0 0 0 0 LISTENedis.2651 *.* 0 0 0 0 LISTENedis.32898 edis.2649 32768 0 32768 0 ESTABLISHEDedis.2649 edis.32898 32768 0 32768 0 ESTABLISHED *.32899 *.* 0 0 0 0 LISTENedis.32900 edis.2649 32768 0 32768 0 ESTABLISHEDedis# ifconfig -a lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 10.243.1.95 netmask ffffff00 broadcast 10.243.1.255 ether 8:0:20:ad:d6:47 edis# ping gdmal001 is aliveedis# format Searching for disks.doneAVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /sbus3,0/QLGC,isp0,10000/sd0,0 1. c1t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /sbus3,0/QLGC,isp0,10000/sd1,0 2. c1t8d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /sbus3,0/QLGC,isp0,10000/sd8,0 3. c1t9d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /sbus3,0/QLGC,isp0,10000/sd9,0Specify disk (enter its number): edis# df -k Filesystem 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 -l swapfile dev swaplo blocks free/dev/dsk/c1t0d0s1 32,1 16 4099424 4099408/dev/dsk/c1t0d0s7 32,7 16 4194272 4194272gdwww001# vxdisk list DEVICE 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 list NAME STATE IDrootdg enabled 938671525.1025.gdqry001oracledg enabled 938675696.1064.gdqry001gdwww001# vxprint -ht Disk 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 MODESD 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 NAM