系統統計
1.prtconf 系統信息
prtconf –V 顯示OBP版本
2./usr/platform/sun4u/sbin/prtdiag -v
顯示系統信息(包括內存,CPU,OBP版本等)
3.sysdef 系統信息
sysdef –i 顯示可調內核參數的設置
4.eeprom 顯示機器IDPROM變量
5.vmstat 監視CPU和內存
# vmstat
procs memory page disk
faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s1 s6
in sy cs us sy id
0 1 0 557136 11544 2 77 278 166 235 0 9 0 32 0 13
301 472 142 2 5 94
5. mpstat 監視多個CPU狀態
6. # mpstat
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr
sys wt idl
15 0 400 199 142 6 0 0 0 470 2 4 64
29
變量 說明 變量 說明
CPU CPU ID migr
Minf 輕微故障(minor faults) smtx
Mjf 重要故障(major faults) srw
Xcal 處理機間的調用 syscl 系統調用次數
Intr 中斷數 usr 用戶時間所占百分比
Ithr 線程中斷數(不包括時鐘中斷) sys 系統時間所占百分比
csw 上下文切換次數 wt 等待時間所占百分比
icsw 強制的上下文切換次數 idle 空閒時間所占百分比
7.iostat 監視磁盤狀態
# iostat
tty fd0 sd0 sd1
sd6 cpu
tin tout kps tps serv kps tps serv kps tps serv
kps tps serv us sy wt id
0 69 0 0 0 326 32 76 0 0 4
193 13 70 2 5 65 29
tin us
tont sy
bps wt
tps id
serv
8.uptime 顯示系統運行時間以及在過去的15分鐘內系統的負載情況
# uptime
4:23pm up 1:15, 1 user, load average: 0.10, 0.13,
0.12
/etc/system
set rstchown = 0 ;users can chown files
set ngroups_max = 32 ;設置每個用戶最大組數為32,但可能引起NFS兼容問題
;因為典型NFS Servers
set pt_cnt =
set hires_tick = 1 ;設置頻率為1000
set rlim_fd_max = 4096 ;設置文件描述符硬限制
set rlim_fd_cur = 1024 ;設置文件描述符軟限制
set maxuprc =
set maxnprocs=
2.Making boot device alias In case system can not boot fromprimary disk and it is needed to make another boot disk to access thedata , nvalias command is used . nvalias command makes the devicealias and assigns an alternate name to a physical disk. Physicaladdress of target disk is required which can be had by show-disk command on ok>.
ok>nvaliasdisk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0 The new aliased disk can be named as boot disk or can be used for booting by refering its name . ok> setenv boot-device disk7 ok>reset or ok> boot disk7
3."Timeout waiting for ARP/RARP packet"? At ok> type printenv and look for these parameters .
boot-device disk
mfg-switch? false
diag-switch? false if you see "boot-device net " or true value for the other two parameter change it to the values above. In case you wants to boot fromnetwork make sure your client is properly configured in boot server andnetwork connections & configuration are proper.
4."The file just loaded does not appear to be executable." Boot block on the hard disk is corrupted .Boot the system in single user mode with cdrom and reinstall boot block . #installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 5."bootblk: can't find the boot program" boot block can not find the bootprograme - ufsboot in Solaris .Either ufsboot is missing or corrupted .In such cases it can be restored from the cdrom after booting fromcdrom & mounting the hard disk # cp /platform/`uname -i`/ufsboot /mnt/platform/`uname -i`
6."boot: cannot open kernel/unix" Kernel directory or unix kernelfile in this directory is not found .Probably deleted during fsck ordeleted by mistake .Copy it from the cdrom or restore from the backuptape. # cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel
7."Error reading ELF header."? Kernel directory or unix kernel file in this directory is corrupted.Copy it from the cdrom or restore from the backup tape. # cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel
8."Cannot open '/etc/path_to_inst'" System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be rebuild. To rebuild this file boot the system with -ar option : ok>boot -ar Press enter to select default values for the questions asked during booting and select yes to rebuild /etc/path_to_install The /etc/path_to_inst on your system does not exist or is empty. Do you want to rebuild this file [n]? y system will continue booting after rebuilding the file.
9."Can't stat /dev/rdsk/c0t3d0s0" When booted from cdrom and donefsck the root partition comes out to be fine but on booting from rootdisk this error occurs. The device name for / is missing from /dev/dskdirectory and to resolve the issue /dev & /devices directories hasto be restored from root backup tapes .