试验环境redhat Linux5.4 x86_64
版本:uname -ar
内存:cat/proc/meninfo
-------------------------------------
MemTotal: 16433032 kB
MemFree: 45260 kB
Buffers: 383808 kB
Cached: 12057620 kB
SwapCached: 0 kB
Active: 6903792 kB
Inactive: 8644108 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 16433032 kB
LowFree: 45260 kB
SwapTotal: 18481144 kB
SwapFree: 18103104 kB
-------------------------
CPU: cat/proc/cupinfo
-------------------------
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
stepping : 5
cpu MHz : 2666.845
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
--------------------------------
ps aux
----------------------------------
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10348 680 ? Ss Jan25 2:21 init [5]
-----------------------------------
top
-----------------------------------
top - 12:47:09 up 111 days, 19:53, 7 users, load average: 0.00, 0.01, 0.00
Tasks: 371 total, 1 running, 369 sleeping, 0 stopped, 1 zombie
Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 16433032k total, 16359268k used, 73764k free, 383464k buffers
Swap: 18481144k total, 378040k used, 18103104k free, 12032860k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27589 mqm 15 0 12872 1316 820 R 0.7 0.0 0:21.20 top
8836 oracle 16 0 4941m 32m 18m S 0.3 0.2 906:38.49 oracle
-----------------------------------
从/proc文件系统获取性能参数据命令:
cpu使用率:/proc/stat
---------------------------------
cpu 14761575 87263 15321636 15414231287 17126684 191864 2360695 0
cpu0 798648 2363 326166 965359316 6140 0 12492 0
说明:user(14761575)从系统启动开始累计到当前时刻,用户态的CPU时间(单位:
Jiffies ),不包含nice值为负进程,1Jiffies =0.01秒。
nice (87263) 从系统启动开始累计到当前时刻,nice值为负的进程所占用的CPU时间(单位:jiffies)
system (15321636) 从系统启动开始累计到当前时刻,核心时间(单位:jiffies)
idle (15414231287) 从系统启动开始累计到当前时刻,除硬盘IO等待时间以外其它等待时间(单位:jiffies)
iowait (17126684) 从系统启动开始累计到当前时刻,硬盘IO等待时间(单位:jiffies),
irq (191864) 从系统启动开始累计到当前时刻,硬中断时间(单位:jiffies)
softirq (2360695) 从系统启动开始累计到当前时刻,软中断时间(单位:jiffies)
---------------------------------
内存使用情况:/proc/meninfo
网络负载信息:/proc/net/dev
--------------------------------
Inter-|Receive |Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
--------------------------------