[Solaris]
1. 查看内核是32位还是64位:
# isainfo -kv
2. 查看程序执行时所有的系统调用:
# truss
3. 查看特定网络接口与特定主机间的流量:
# snoop -d host
4. 关闭beep:
# /usr/openwin/bin/xset b off
5. 查看文件来自哪个包:
# pkgchk -lp {file}
6.查看CPU的个数和频率:
# psrinfo -v
Status of virtual processor 0 as of: 12/02/2008 09:41:59
on-line since 12/01/2008 07:49:11.
The i386 processor operates at 2210 MHz,
and has an i387 compatible floating point processor.
[OpenSolaris]
1. 恢复系统到初始安装时的快照:
$ pfexec mkdir /altroot
$ pfexec zpool import -R /altroot -f rpool
$ pfexec zfs rollback -R rpool/ROOT/opensolaris@install
$ pfexec reboot
2. 用live cd启动mount以前的opensolaris:
$pfexec su -
#zpool import -f rpool
#beadm mount opensolaris /a
3. OpenSolaris增加swap空间(32bit) [64bit无需将每个swap文件分割为2G]:
#
# Set the default swap rpool to 2G
#
swap -d /dev/zvol/dsk/rpool/swap
zfs set volsize=2G rpool/swap
#
# Create three more 2G rpool swap files
#
zfs create -V 2G rpool/swap1
zfs create -V 2G rpool/swap2
zfs create -V 2G rpool/swap3
vi /etc/vfstab (look like this)
/dev/zvol/dsk/rpool/swap - - swap - no -
/dev/zvol/dsk/rpool/swap1 - - swap - no -
/dev/zvol/dsk/rpool/swap2 - - swap - no -
/dev/zvol/dsk/rpool/swap3 - - swap - no -
/sbin/swapadd
sfehrman@opensolaris:~$ vmstat 5
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd s0 -- -- in sy cs us sy id
1 0 0 8391608 1594504 468 2869 0 0 0 0 2429 60 -0 0 0 520 16099 5256 16 21 63
0 0 0 9500500 1370104 2 8 0 0 0 0 0 0 0 0 0 376 413 173 0 1 99
0 0 0 9500472 1370696 0 0 0 0 0 0 0 0 0 0 0 368 375 165 0 1 99
0 0 0 9500380 1370648 5 45 0 0 0 0 0 6 0 0 0 423 540 246 0 1 98
0 0 0 9500264 1370524 0 0 0 0 0 0 0 39 0 0 0 385 568 207 0 1 99
0 0 0 9500264 1370524 0 0 0 0 0 0 0 0 0 0 0 371 327 164 0 1 99
sfehrman@opensolaris:~$ swap -lh
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,1 4K 2.0G 2.0G
/dev/zvol/dsk/rpool/swap1 182,4 4K 2.0G 2.0G
/dev/zvol/dsk/rpool/swap2 182,6 4K 2.0G 2.0G
/dev/zvol/dsk/rpool/swap3 182,2 4K 2.0G 2.0G
阅读(610) | 评论(0) | 转发(0) |