分类:
2008-05-27 10:15:18
相信很多人和我有类似的想法:要是solaris 10安装配置完以后把它扔到某个位置再也不用管它,那该有多好。当然,这只是我们的一厢情愿而已!尽管solaris 10的功能已经异常强大、性能超级稳定,但还是需要我们经常性的看管和维护。维护的主要内容包括监控、配置/设置修改以及故障处理这几个方面,下面我们分别以一些实例来讨论这些情形。
root@zsc # showrev
Hostname: zsc
Hostid: 841e
Release: 5.10
Kernel architecture: sun4u //intel架构的服务器输出不一样
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.10 Generic_118833-18 //内核版本号 |
root@zsc # prtconf
System Configuration: Sun Microsystems sun4u//intel,amd cpu的输出不同
Memory size: 8192 Megabytes //内存为
System Peripherals (Software Nodes):
SUNW,Sun-Fire-V490
scsi_vhci, instance #0
packages (driver not attached)
SUNW,builtin-drivers (driver not attached)
……… |
root@zsc # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w
1. c1t1d0
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w |
root@zsc # ifconfig -a
lo0: flags=2001000849
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843
inet 61.128.x.x netmask ffffff00 broadcast 61.128.x.255
ether 0:14:
ce1: flags=1000843
inet 192.168.x.5 netmask ffffff00 broadcast 192.168.x.255
ether 0:14: |
root@db890 ~#mpstat //这个命令也是查看CPU负载的工具
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 0 1 136 3 1 67 1 1 6 1 93 0 1 4 94
1 0 1 101 25 22 67 1 1 6 1 85 0 1 4 95
2 0 1 121 3 1 68 1 1 6 1 91 0 1 4 95
3 0 1 129 3 1 69 1 1 6 1 95 0 1 4 95
4 0 1 126 3 1 69 1 1 5 1 95 0 1 4 95
5 0 1 125 129 126 66 1 1 5 1 90 0 1 4 95
6 0 1 123 4 1 68 1 1 6 1 92 0 1 4 95
7 0 1 105 242 140 65 1 1 7 1 89 0 0 4 95 |
root@zsc # uptime
上午8点48分 运行4天15:12, 2用户, 平均负载:0.01, 0.01, 0.01 |
root@zsc # w
上午9点12分 运行4天15:36, 3用户, 平均负载:0.02, 0.01, 0.01
用户名 终端号 登入时间 闲置 JCPU PCPU 执行命令
root console 周一下午5点 5天 4:53
root pts/3 上午8点36分 25 -bash
root pts/4 上午9点12分 w |
root@zsc # who -r
. run-level 3 |
root@zsc # last |more
root pts/3 211.94.81.227 Sat Oct 14 14:31仍在登录状态
root sshd 211.94.81.227 Sat Oct 14 14:31仍在登录状态
root sshd 218.247.140.197 Sat Sep 16
oracle console :0 Sat Sep 16 12:02 -关机 (00:02)
reboot system boot Sat Sep 16
reboot system down Sat Sep 16
root pts/4 61.128.122.128 Sat Sep 16 12:01 -关机 (00:01)
root sshd 61.128.122.128 Sat Sep 16 12:01 -关机 (00:01)
oracle console :0 Sat Sep 16 12:00 -关机 (00:01)
reboot system boot Sat Sep 16
reboot system down Sat Sep 16
oracle console :0 Sat Sep 16 11:58 -关机 (00:01)
root console :0 Sat Sep 16
oracle console :0 Sat Sep 16 |