▼すべてを開く。
▲すべてを閉じる。
$ top 17:22:15 up 2:09, 1 user, load average: 0.00, 0.00, 0.00 40 processes: 38 sleeping, 2 running, 0 zombie, 0 stopped CPU states: cpu user nice system irq softirq iowait idle total 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0% Mem: 117184k av, 104236k used, 12948k free, 0k shrd, 10128k buff 79112k active, 12300k inactive Swap: 257032k av, 0k used, 257032k free 50832k cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 1 root 15 0 504 504 444 S 0.0 0.4 0:04 0 init 2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd 3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd 4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd/0 7 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush 5 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd 6 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kscand 8 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated 9 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd 13 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald 67 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd 413 root 22 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald 1097 root 15 0 612 612 528 S 0.0 0.5 0:00 0 syslogd 1101 root 15 0 456 456 396 S 0.0 0.3 0:00 0 klogd 1158 root 15 0 2156 2156 1512 S 0.0 1.8 0:00 0 cupsd 1183 root 16 0 1560 1560 1316 S 0.0 1.3 0:00 0 sshd 1197 root 23 0 916 916 796 S 0.0 0.7 0:00 0 xinetd 1220 ntp 15 0 2560 2560 2192 S 0.0 2.1 0:00 0 ntpd 1247 root 15 0 2584 2584 1908 S 0.0 2.2 0:00 0 sendmail 1256 smmsp 15 0 2344 2336 1788 S 0.0 1.9 0:00 0 sendmail 1267 bin 15 0 1032 1032 600 S 0.0 0.8 0:00 0 cannaserver 1278 root 15 0 640 640 560 S 0.0 0.5 0:00 0 crond 1303 xfs 15 0 3816 3816 964 S 0.0 3.2 0:00 0 xfs 1312 daemon 15 0 564 564 496 S 0.0 0.4 0:00 0 atd 1322 root 25 0 608 608 548 S 0.0 0.5 0:00 0 rhnsd 1336 root 15 0 396 396 336 S 0.0 0.3 0:00 0 mdadm 1343 root 23 0 420 420 368 S 0.0 0.3 0:00 0 mingetty 1344 root 23 0 420 420 368 S 0.0 0.3 0:00 0 mingetty 1345 root 23 0 420 420 368 S 0.0 0.3 0:00 0 mingetty 1346 root 23 0 420 420 368 S 0.0 0.3 0:00 0 mingetty 1347 root 23 0 424 424 368 S 0.0 0.3 0:00 0 mingetty 1348 root 23 0 424 424 368 S 0.0 0.3 0:00 0 mingetty 1349 root 20 0 3268 3268 2620 S 0.0 2.7 0:00 0 gdm-binary 1380 root 15 0 3696 3696 2976 S 0.0 3.1 0:00 0 gdm-binary 1381 root 15 0 13356 8364 2328 S 0.0 7.1 0:00 0 X 1389 gdm 15 0 32248 31M 12272 S 0.0 27.5 0:02 0 gdmgreeter 1390 root 17 0 2060 2060 1696 S 0.0 1.7 0:00 0 sshd 1392 masa 15 0 2280 2280 1868 R 0.0 1.9 0:00 0 sshd 1393 masa 15 0 1400 1400 1148 S 0.0 1.1 0:00 0 bash 1460 masa 15 0 1096 1096 900 R 0.0 0.9 0:00 0 top
topコマンドを実行すると、現在のCPUの負荷状況を5秒ごとに表示する。
topコマンドのキー操作 | |
目 的 | キー操作 |
---|---|
データを更新 | [space] |
再描画 | [control]-l |
コマンドを終了する | [control]-c |
$ top -d 1 18:58:40 up 1:36, 1 user, load average: 0.00, 0.00, 0.00 40 processes: 38 sleeping, 2 running, 0 zombie, 0 stopped CPU states: cpu user nice system irq softirq iowait idle total 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 100.0% Mem: 374560k av, 99428k used, 275132k free, 0k shrd, 8500k buff 78692k active, 8768k inactive Swap: 257032k av, 0k used, 257032k free 46632k cached Unknown command `' -- hit `h' for help PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 1 root 15 0 492 492 432 S 0.0 0.1 0:04 0 init 2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd 3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd 4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd/0 7 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush 5 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd 6 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kscand 8 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kupdated 9 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 mdrecoveryd 13 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald 67 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 khubd 484 root 18 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald 1096 root 15 0 616 616 532 S 0.0 0.1 0:00 0 syslogd 1100 root 15 0 460 460 400 S 0.0 0.1 0:00 0 klogd 1176 root 15 0 2668 2668 1516 S 0.0 0.7 0:00 0 cupsd 1201 root 16 0 1552 1552 1304 S 0.0 0.4 0:00 0 sshd 1215 root 24 0 908 908 788 S 0.0 0.2 0:00 0 xinetd 1238 ntp 15 0 2560 2560 2196 S 0.0 0.6 0:00 0 ntpd 1265 root 15 0 2584 2584 1912 S 0.0 0.6 0:00 0 sendmail 1274 smmsp 15 0 2336 2328 1792 S 0.0 0.6 0:00 0 sendmail 1285 bin 15 0 1036 1036 604 S 0.0 0.2 0:00 0 cannaserver 1296 root 15 0 1056 1056 688 S 0.0 0.2 0:00 0 crond 1321 xfs 15 0 3836 3836 984 S 0.0 1.0 0:00 0 xfs 1330 daemon 15 0 568 568 500 S 0.0 0.1 0:00 0 atd 1340 root 25 0 608 608 548 S 0.0 0.1 0:00 0 rhnsd 1354 root 15 0 404 404 344 S 0.0 0.1 0:00 0 mdadm 1361 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1362 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1363 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1364 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1365 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1366 root 23 0 428 428 372 S 0.0 0.1 0:00 0 mingetty 1367 root 20 0 3288 3288 2640 S 0.0 0.8 0:00 0 gdm-binary 1398 root 15 0 3712 3712 2996 S 0.0 0.9 0:00 0 gdm-binary 1399 root 15 0 13388 8396 2324 S 0.0 2.2 0:00 0 X 1407 gdm 15 0 32296 31M 12316 S 0.0 8.6 0:03 0 gdmgreeter 1408 root 16 0 2060 2060 1696 S 0.0 0.5 0:00 0 sshd 1410 masa 15 0 2268 2268 1868 R 0.0 0.6 0:00 0 sshd 1411 masa 15 0 1404 1404 1156 S 0.0 0.3 0:00 0 bash 1466 masa 15 0 1120 1120 920 R 0.0 0.2 0:00 0 top
topコマンドで-dオプションを指定し、更新する間隔1(秒)を指示すると、1秒おきにプロセッサの負荷状況を表示する。
topコマンドのキー操作 | |
目 的 | キー操作 |
---|---|
データを更新 | [space] |
再描画 | [control]-l |
コマンドを終了する | [control]-c |
$ w 16:16:54 up 1:18, 4 users, load average: 0.02, 0.42, 0.36 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT masa pts/1 192.168.0.3 3:03pm 0.00s 2.27s 0.04s w guest pts/2 192.168.0.3 3:56pm 20:22 0.08s 0.08s -csh masa :0 - 4:03pm ? 0.00s 1.59s /usr/bin/gnome-session masa pts/3 :0.0 4:11pm 4:45 0.12s 0.12s bash
wコマンドを実行すると、現在システムにログインしているユーザのシステム利用状況を表示する。各項目の意味は以下の通り。
項 目 | 意 味 |
---|---|
load average: | 過去 1, 5, 15分でのシステムの平均負荷 |
USER | ユーザ名 |
TTY | ログインしている端末名(「:0」はXウィンドウ) |
FROM | ログインしている端末のIPアドレス
- : システム上のXウィンドウシステム 0.0 : システム上の端末 |
LOGIN@ | ログインした時刻 |
IDLE | アイドル(休眠)時間 |
JCPU | その端末から実行されている全プロセスが使った時間 |
PCPU | "what"項目で示されているカレントプロセスが使用したCPUの時間 |
WHAT | カレントプロセス(現在実行中のプロセス) |