涉及到2个很简单的命令:一个是top(查看进程)一个就是uptime(查看开机到现在有多久)
具体演示:
查看开机时间:
class=codetop>CODE:class=codemain>[root@web~]#uptime 13:44:25up16days,3:12,1user,loadaverage:0.00,0.00,0.00 |
查看进程:
class=codetop>CODE:class=codemain>[root@web~]#top top-13:45:14up16days,3:12,1user,loadaverage:0.00,0.00,0.00 Tasks:76total,1running,75sleeping,0stopped,0zombie Cpu(s):0.0%us,0.3%sy,0.0%ni,99.7%id,0.0%wa,0.0%hi,0.0%si,0.0%st Mem:254236ktotal,167976kused,86260kfree,396kbuffers Swap:524280ktotal,21620kused,502660kfree,44216kcached
PIDUSERPRNIVIRTRESSHRS%CPU%MEMTIME COMMAND 25303root2002272972788R0.30.40:00.03top 1root2002112648564S0.00.30:02.03init 2root15-5000S0.00.00:00.01kthreadd 3rootRT-5000S0.00.00:00.00migration/0 4root15-5000S0.00.00:00.00ksoftirqd/0 5rootRT-5000S0.00.00:00.00watchdog/0 6root15-5000S0.00.00:00.18events/0 7root15-5000S0.00.00:00.00khelper 58root15-5000S0.00.00:00.33kblockd/0 61root15-5000S0.00.00:00.00kacpid 62root15-5000S0.00.00:00.00kacpi_notify 142root15-5000S0.00.00:00.00cqueue/0 144root15-5000S0.00.00:00.00ksuspend_usbd 149root15-5000S0.00.00:00.00khubd 152root15-5000S0.00.00:00.00kseriod 180root200000S0.00.00:01.35pdflush 181root200000S0.00.00:00.95pdflush |
这都是没有加入参数的情况下显示的。
下载本文示例代码
阅读(263) | 评论(0) | 转发(0) |