freebsd下相关查看系统资源命令

slurm -i fxp0 查看实时带宽,按 ‘q’ 退出;
iostat 1 每秒一次实时显示IO使用情况,按Ctrl-C退出;
top 查看系统总的情况报告;
systat -ifstat 查看带宽;
gstat 查看硬盘;

[[email protected] /]# make search key=”slurm”
Port: slurm-0.3.3
Path: /usr/ports/net/slurm
Info: A generic network load monitor
Maint: [email protected]
B-deps:
R-deps:
WWW: http://www.raisdorf.net/slurm/

[[email protected] /]# iostat 1
tty ad1 ad4 cpu
tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id
0 57 2.39 0 0.00 10.55 3 0.03 1 0 0 2 97
0 178 0.00 0 0.00 0.00 0 0.00 0 0 0 4 96
0 59 0.00 0 0.00 0.00 0 0.00 0 0 0 3 97
0 60 0.00 0 0.00 0.00 0 0.00 0 0 0 2 98
0 59 0.00 0 0.00 0.00 0 0.00 0 0 0 2 98
0 59 0.00 0 0.00 0.00 0 0.00 0 0 0 4 96

[[email protected] /]# systat -ifstat
/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10
Load Average

Interface Traffic Peak Total
lo0 in 0.000 KB/s 0.000 KB/s 133.042 KB
out 0.000 KB/s 0.000 KB/s 133.042 KB

rl0 in 0.051 KB/s 0.051 KB/s 509.582 MB
out 0.166 KB/s 0.166 KB/s 93.139 MB

[[email protected] /]# top
last pid: 21323; load averages: 0.00, 0.00, 0.00 up 5+03:06:22 19:32:46
17 processes: 1 running, 16 sleeping
CPU states: 0.0% user, 0.0% nice, 0.0% system, 4.2% interrupt, 95.8% idle
Mem: 10M Active, 1186M Inact, 165M Wired, 744K Cache, 112M Buf, 1643M Free
Swap: 4096M Total, 4096M Free

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
703 root 1 96 0 5616K 3180K select 1 0:01 0.00% sshd
710 root 1 8 0 3184K 1244K nanslp 1 0:01 0.00% cron
584 root 1 96 0 3156K 1200K select 0 0:01 0.00% syslogd
21253 root 1 96 0 8384K 3796K select 1 0:00 0.00% sshd
21261 root 1 8 0 4396K 2188K wait 1 0:00 0.00% bash
21257 root 1 20 0 4460K 2300K pause 1 0:00 0.00% csh
21323 root 1 96 0 3488K 1652K CPU1 0 0:00 0.00% top
750 root 1 5 0 3156K 1064K ttyin 0 0:00 0.00% getty
753 root 1 5 0 3156K 1064K ttyin 1 0:00 0.00% getty
751 root 1 5 0 3156K 1064K ttyin 1 0:00 0.00% getty
757 root 1 5 0 3156K 1064K ttyin 1 0:00 0.00% getty
754 root 1 5 0 3156K 1064K ttyin 1 0:00 0.00% getty
755 root 1 5 0 3156K 1064K ttyin 0 0:00 0.00% getty
752 root 1 5 0 3156K 1064K ttyin 1 0:00 0.00% getty
756 root 1 5 0 3156K 1064K ttyin 0 0:00 0.00% getty
538 root 1 4 0 1888K 544K select 1 0:00 0.00% devd

[[email protected] /]# gstat
dT: 1.013s w: 1.000s
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 0 0 0 0.0 0 0 0.0 0.0| ad1
0 0 0 0 0.0 0 0 0.0 0.0| ad1s1
0 0 0 0 0.0 0 0 0.0 0.0| ad4
0 0 0 0 0.0 0 0 0.0 0.0| ad1s5
0 0 0 0 0.0 0 0 0.0 0.0| ad1s6
0 0 0 0 0.0 0 0 0.0 0.0| ad1s7
0 0 0 0 0.0 0 0 0.0 0.0| ad1s8
0 0 0 0 0.0 0 0 0.0 0.0| ad4s1
0 0 0 0 0.0 0 0 0.0 0.0| ad4s1a
0 0 0 0 0.0 0 0 0.0 0.0| ad4s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad4s1c
[[email protected] /]#