ps command


 

How to use ps

 

#> ps

#> ps -efl

 

Example of ps

 

#> ps
 PID TTY       TIME COMD
 346 pts/2     0:01 ksh
1029 pts/2     0:00 ps
1199 pts/2     0:01 ksh
#> ps -efl
 UID  PID PPID  C PRI NI     ADDR    SZ    WCHAN    STIME TTY TIME COMD
root    0    0 80   0 SY f01706f0     0          19:47:44 ?   0:01 sched
root    1    0 80  99 20 fc18f800   173 fc18f9c8 19:47:48 ?   0:36 /etc/init -

 

 

vmstat command


 

How to use vmstat

 

#> vmstat 5

procs

r b w

cpu

cs us sy id

 

How to read vmstat data

 

¢º If CPU spends most of its time in USER mode, one or more processes may be monopolizing the CPU.

¢º A low value "id" indicates a MEMORY starved or I/O bound system.

¢º Compute Intensive program.

¢º If the CPU is mainly in system mode, then it is probably I/O bound.

 

Example of vmstat

 

#> vmstat
procs   memory          page              disk    faults    cpu
r b w  swap free re mf pi po fr de sr f0 s0 s1 s2 in sy cs us sy id
0 0 0 72836 7688  0  1  5  1  4  0  2  0  0  0  1 16 37 30  1  1 98

ÁÖÀÇ : sr °ªÀÌ °è¼Ó ³ôÀ¸¸é ¸Þ¸ð¸®ºÎÁ·À» ÀǽÉÇØ ºÁ¾ß ÇÑ´Ù.

 

 

CPU Solutions


 

If your CPU is often busy, or

If it often deals with jobs than monopolize the system,

 

 

ÁÖÀÇ : ºÎÁ·ÇÑ ¸Þ¸ð¸®´Â °ú´ÙÇÑ ½º¿ÍÇÎ(swapping)°ú ÆäÀÌ¡(paging)ÀÇ ¿øÀÎÀÌ µÈ´Ù.

 

[ Back ]