$ ps PID TTY TIME CMD 805 pts/1 00:00:00 bash 1587 pts/1 00:00:00 xload 2200 pts/1 00:00:00 ps
$ ps -a PID TTY TIME CMD 589 tty1 00:00:00 startx 600 tty1 00:00:00 xinit 610 tty1 00:00:00 startkde 624 tty1 00:00:00 xinitrc 628 tty1 00:00:02 kinput2 701 tty1 00:00:00 kwrapper 1136 pts/0 00:00:07 vim 1587 pts/1 00:00:00 xload
$ ps -lx F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 501 552 540 16 0 6776 1388 wait4 S tty1 0:00 -bash 0 501 589 552 23 0 6628 1084 wait4 S tty1 0:00 /bin/sh /usr/ 0 501 600 589 20 0 3064 644 wait4 S tty1 0:00 xinit /etc/X1 0 501 610 600 15 0 6416 1136 wait4 S tty1 0:00 /bin/sh /usr/ 1 501 624 610 25 0 5648 1136 wait4 S tty1 0:00 /bin/sh /etc/ 0 501 628 624 15 0 4804 2456 schedu S tty1 0:03 kinput2 -cann 1 501 629 610 15 0 4252 1016 schedu S ? 0:00 ssh-agent /et 1 501 673 1 16 0 20964 7872 schedu S ? 0:00 kdeinit: Runn :
$ ps -o user,ppid,pid,comm USER PPID PID COMMAND ycos 718 805 bash ycos 805 1587 xload ycos 805 2503 ps
項目名 | 意味 |
---|---|
UID | ユーザID |
PID | プロセスID |
PPID | 親プロセスID |
CP | CPU利用度 |
PRI | 実行優先度(小さいくなるほど優先度が高い) |
NI | ナイス値(プライオリティ算出に用いる値) |
VSZ | 仮想メモリ利用量 |
RSS | 物理メモリ利用量 |
WCHAN | 待ちイベントの状態 |
S | プロセスの実行状態を記号で表示 |
TTY | 起動された端末名 |
TIME | CPU時間の総量 |
CMD,COMMAND | 実行中のコマンド |
pstree コマンド
$ pstree
init-+-bdflush
|-cannaserver
|-crond
|-gconfd-2
|-httpd---4*[httpd]
|-kapmd
|-kdeinit-+-artsd
| |-autorun
| |-firefox---run-mozilla.sh---firefox-bin
| |-2*[kdeinit]
| `-kdeinit-+-bash---vim
| |-bash---xload
| `-bash---pstree
|-7*[kdeinit]
|-keventd
:
$ pstree -up 673
kdeinit(673,ycos)-+-artsd(690)
|-autorun(705)
|-firefox(748)---run-mozilla.sh(760)---firefox-bin(765)
|-kdeinit(704)
|-kdeinit(715)
`-kdeinit(718)-+-bash(719)---vim(1136)
|-bash(805)---xload(1587)
`-bash(2201)---pstree(2519)
top コマンド
$ top
14:47:53 up 5:03, 5 users, load average: 0.14, 0.12, 0.08
63 processes: 60 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 0.5% 0.0% 0.9% 0.3% 0.0% 0.0% 98.0%
Mem: 378296k av, 339948k used, 38348k free, 0k shrd, 49940k buff
251656k active, 39132k inactive
Swap: 522072k av, 0k used, 522072k free 138372k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
601 root 15 0 90124 23M 3108 R 0.9 6.2 4:42 0 X
718 ycos 15 0 18476 18M 13508 R 0.3 4.8 1:07 0 kdeinit
2554 ycos 15 0 1144 1144 912 R 0.1 0.3 0:00 0 top
1 root 15 0 516 516 456 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 35 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
110 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
402 root 15 0 600 600 520 S 0.0 0.1 0:00 0 syslogd
Copyright 2007-2018 ycosSystems Monitor/Body263.html