我希望使用top parameter
.
一般信息是指以下内容:
top - 09:35:05 up 3:26, 2 users, load average: 0.29, 0.22, 0.21
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.3%us, 0.7%sy, 0.0%ni, 96.3%id, 0.8%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3840932k total, 2687880k used, 1153052k free, 88380k buffers
Swap: 3998716k total, 0k used, 3998716k free, 987076k cached
我不想做的是:
top -u user | grep process_name
或者
top -bp $(pgrep process_name) | do_something
我怎样才能做到这一点?
注意:我在 Ubuntu 12.04 上,最高版本是 3.2.8。