|
** I. ¼º´ÉÃøÁ¤ **
1. ps(ÇÁ·Î¼¼½º »óÅ ÃøÁ¤)
# -l OPTION
[v700:/]#ps -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
8 R 0 576 574 1 47 20 708bc350 191 pts/1 0:00 csh
8 O 0 585 576 0 47 20 70a63168 131 pts/1 0:00 ps
F : Process Flag
S : Process Status
.O : Running ÁßÀÎ Process
.S : Sleeping
.R : Run Queue ¿¡ ÀÖ´Â Proces
.Z : Zombie
.T : Job Control signal ¿¡ ÀÇÇØ Á¤ÁöµÈ Process
UID : Process Owner User ID ¼ö
PID : Process Process ID
PPID : Parent Process ID
C : Scheduling À» À§ÇÑ Process »ç¿ë·®
CLS : Scheduling Class
PRI : Process Priority
NI : Process Priority ¿¡ »ç¿ëµÈ °ª
ADDR : Process Memory Address
SZ : Virtual Memory¿¡¼ Process Àüü Å©±â, Data ¿Í Stack Segment Å©±â
WCHAN: Sleeping »óÅ¿¡ ÀÖ´Â Process À̺¥Æ® ÁÖ¼Ò
STIME: Process ½ÃÀ۽ð£
TTY : Process ½ÇÇà Terminal
TIME : Process ½ÇÇà´©Àû ½Ã°£
COMMAND: ¸í·É¾î
#ps -efl | more
# -o OPTION
[v700:/]#ps -ef -o "user group pid ppid pcpu pmem vsz rss time stime tty args" | more
USER GROUP PID PPID %CPU %MEM VSZ RSS TIME STIME TT COMMAND
root root 0 0 0.0 0.0 0 0 0:00 17:13:58 ? sched
root root 1 0 0.0 0.2 760 296 0:00 17:14:01 ? /etc/init -
root root 2 0 0.0 0.0 0 0 0:00 17:14:01 ? pageout
root root 3 0 0.1 0.0 0 0 0:21 17:14:01 ? fsflush
root root 227 1 0.0 0.4 1024 712 0:00 17:14:16 ? /usr/lib/utmpd
root root 173 1 0.0 1.2 2584 2160 0:00 17:14:14 ? /usr/lib/autofs/automountd
root root 274 1 0.0 0.6 1664 1128 0:00 17:14:23 ? /usr/lib/saf/sac -t 300
root root 52 1 0.0 0.6 1392 976 0:00 17:14:07 ? /usr/lib/devfsadm/devfseventd
root root 54 1 0.0 0.6 2416 1024 0:00 17:14:07 ? /usr/lib/devfsadm/devfsadmd
root root 125 1 0.0 0.6 2024 1128 0:00 17:14:12 ? /usr/sbin/rpcbind
root root 219 1 0.0 0.5 1296 928 0:00 17:14:16 ? /usr/lib/power/powerd
root root 127 1 0.0 0.8 2360 1400 0:00 17:14:12 ? /usr/sbin/keyserv
root root 160 1 0.0 0.7 1808 1248 0:00 17:14:13 ? /usr/lib/nfs/lockd
root root 156 1 0.0 0.9 2232 1680 0:00 17:14:13 ? /usr/sbin/inetd -s
root root 200 1 0.0 1.1 2440 1904 0:00 17:14:15 ? /usr/sbin/nscd
root root 183 1 0.0 1.1 3384 1920 0:00 17:14:14 ? /usr/sbin/syslogd
daemon daemon 157 1 0.0 1.0 2424 1720 0:00 17:14:13 ? /usr/lib/nfs/statd
root root 206 1 0.0 0.7 3064 1152 0:00 17:14:15 ? /usr/lib/lpsched
root root 187 1 0.0 0.7 1888 1192 0:00 17:14:14 ? /usr/sbin/cron
root root 271 1 0.0 1.1 3912 2032 0:00 17:14:23 ? /var/opt/netvault6/bin/nvpmgr
root root 231 1 0.0 1.3 3120 2328 0:01 17:14:16 ? /usr/sbin/vold
root root 267 1 0.0 0.6 1984 992 0:00 17:14:21 ? /usr/local/unitsms/smsd
root root 237 1 0.0 1.0 2800 1736 0:00 17:14:17 ? /usr/lib/sendmail -bd -q15m
root root 259 1 0.0 1.1 3056 1968 0:00 17:14:20 ? /usr/lib/dmi/dmispd
..................................
user : Process »ç¿ë»óÀÇ User ID
ruser : Process ½ÇÁúÀûÀÎ User ID
group : Process »ç¿ë»óÀÇ Group ID
rgroup : Process ½ÇÁúÀûÀÎ Group ID
pid : Process ID ÀÇ ½ÊÁø¼ö °ª
ppid : Parent Process ID ÀÇ ½ÊÁø¼ö °ª
pgid : Process Group ID ÀÇ ½ÊÁø¼ö °ª
pcpu : °°Àº ½Ã°£´ëÀÇ CPU »ç¿ë½Ã°£¿¡ ´ëÇÑ ºñÀ²(%)
vsz : Virtual Memory¿¡¼ Process ÀÇ Àüü Å©±â (KB)
nice : ProcessÀÇ System Scheduling ¿¡ ÀÇÇÑ ¿ì¼± ¼øÀ§¿¡ ´ëÇÑ ½ÊÁø¼ö °ª
dd : ¿äÀÏ¿¡ ÇØ´çÇÏ´Â ¼ö -> ½ÊÁø¼ö µÎÀÚ¸®·Î Ç¥½Ã
hh : ½Ã°£¿¡ ÇØ´çÇÏ´Â ¼ö
mm : ºÐ¿¡ ÇØ´çÇÏ´Â ¼ö
ss : ÃÊ¿¡ ÇØ´çÇÏ´Â ¼ö
tty : Process Controlling Terminal
comm : ½ÇÇàµÈ ¸í·É¾î
args : ¸ðµç Argument ¸¦ Æ÷ÇÔÇÏ°í ÀÖ´Â ¸í·É¾î
2. vmstat
vmstat [option] [interval [count]]
OPTION
.c : Cache Flushing Åë°èÄ¡
.i : Device ´ç Interrupted µÈ ¼ö
.s : Booting ÀÌÈĺÎÅÍ ½Ã½ºÅÛ¿¡¼ ¹ß»ýµÈ Àüü À̺¥Æ®
.S : ÆäÀÌ¡´ë½Å¿¡ ½º¿ÍÇÎÀ» Ç¥½Ã, ÆäÀÌ¡ÀÇ re¿Í mf¸¦ swapping Ãâ·ÂÀÇ si(swap-input)¿Í
so(swap-output)·Î ³ªÅ¸³½´Ù.
#vmstat 3
[v700:/]#vmstat 3
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 53736 72328 0 0 1 0 0 0 0 0 1 0 0 309 49 26 0 0 100
0 0 0 1160816 76264 0 1 0 0 0 0 0 0 4 0 0 327 31 24 0 0 99
0 0 0 1160816 76264 0 0 0 0 0 0 0 0 0 0 0 306 111 27 0 0 100
procs : ÇÁ·Î¼¼½º ¼ö¿Í ±×¿¡ ÇØ´çÇÏ´Â µ¥ÀÌŸ¸¦ ³ªÅ¸³¿
.r : ½ÇÇà°¡´ÉÇÑ »óÅ·Π´ë±â Å¥¿¡ ½×ÀÎ ÇÁ·Î¼¼½º ¼ö, À̼ýÀÚ°¡ Å©´Ù´Â °ÍÀº
ÇöÀç CPU °¡ ÀÛ¾÷À» ¿øÈ°È÷ ¼ÒÈÇÏÁö ¸øÇÏ°í ÀÖ´Ù´Â ÀǹÌ
r = 0 : White (CPU Idle)
0 < r < 3 : Green (NO Problem)
3 <= r <=5 : Amber (CPU Busy)
5 < r : Red (CPU Busy)
.b : I/O ÀÚ¿øÀ» ÇÒ´ç¹ÞÁö ¸øÇØ ºí·ÏµÈ ÇÁ·Î¼¼½º
.w : Swap-outµÈ ÇÁ·Î¼¼½º ¼ö, ½ÇÇà °¡´ÉÇÑ ´ë±â Å¥¿¡ ½×ÀÌÁö ¾Ê°í
Swap-outµÈ ÇÁ·Î¼¼½º°¡ ¸¹´Ù´Â °ÍÀº Physical ¸Þ¸ð¸®°¡ ºÎÁ·ÇÏ´Â °Í
memory : °¡»ó¸Þ¸ð¸®¿Í Physical ¸Þ¸ð¸®ÀÇ »ç¿ë °¡´É·®
.swap : ÇöÀç »ç¿ë °¡´ÉÇÑ ½º¿Ò Å©±â
.free : ÇöÀç »ç¿ë°¡´ÉÇÑ free ¸Þ¸ð¸® Å©±â (kb), free ¸Þ¸ð¸®°¡ ÀνºÅçµÈ
¸Þ¸ð¸®ÀÇ 6%º¸´Ù °è¼ÓÀûÀ¸·Î ÀÛÀ¸¸é °¡¿ë ¸Þ¸ð¸®°¡ ºÎÁ·ÇÑ °æ¿ì
ÀáÀçÀûÀÎ º´¸ñ Çö»óÀÌ´Ù.
page : ÃÊ ´ç ¹ß»ýÇÏ´Â fault page ¼ö¿Í ½ÇÇàÁßÀÎ ÆäÀÌ¡ Ç¥½Ã
.re : page reclaim
.mf : minor fault
.pi : page in(KB)
.po : page out(KB)
.fr : free(KB)
.de : Short-term ¸Þ¸ð¸® ºÎÁ·ºÐ, Áï Swap-inÀ» ¸·±âÀ§Çؼ Swap-out ½Ã ¼³Á¤µÈ
ÀΰøÀûÀÎ ¸Þ¸ð¸®ÀÇ ºÎÁ·ºÐÀÌ´Ù.
.sr : clock ¾Ë°í¸®Áò¿¡ ÀÇÇÑ ÆäÀÌÁö scanned. srÀº °¡¿ë ¸Þ¸ð¸® ºÎÁ·½Ã¿¡ È°¼º
ÈµÈ ÆäÀÌÁö µ¥¸óÀÇ ¼ö, sr ÀÌ Å©´Ù´Â °ÍÀº »ç¿ë°¡´É ¸Þ¸ð¸® ºÎÁ·
sr = 0 : White
0 < sr < 200 : Green
200 < sr < 300 : Amber
400 < sr : RED
disk : ÃÊ´ç µð½ºÅ© Á¶ÀÛ ¼ö
faults : ÃÊ´ç trap/interrupt ºñÀ²
.in : Device Interrupt(non clock)
.sy : ÃÊ ´ç System Fault
.cs : CPU Context Switch ºñÀ²
cpu : CPU »ç¿ë ½Ã°£¿¡ ´ëÇÑ ¹éºÐÀ²(%)
.us : »ç¿ëÀÚ »ç¿ë ½Ã°£
.sy : ½Ã½ºÅÛ »ç¿ë ½Ã°£
.id : Idle ½Ã°£
2.1 System EVent : -s OPTION
#vmstat -s
[v700:/]#vmstat -s
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
47349 total address trans. faults taken
4971 page ins
28 page outs
9733 pages paged in
28 pages paged out
251 total reclaims
251 reclaims from free list
0 micro (hat) faults
47349 minor (as) faults
4506 major faults
10789 copy-on-write faults
11802 zero fill page faults
0 pages examined by the clock daemon
0 revolutions of the clock hand
28 pages freed by the clock daemon
492 forks
101 vforks
425 execs
1705725 cpu context switches
26191352 device interrupts
61180 traps
3175075 system calls
119180 total name lookups (cache hits 96%)
2248 user cpu
5972 system cpu
6383693 idle cpu
3434 wait cpu
2.2 Swapping : -S OPTION
.si : ÃÊ´ç Swap-in µÈ ÆäÀÌÁö
.so : ÃÊ´ç Swap-out µÈ ÆäÀÌÁö
#vmstat -S 3
[v700:/]#vmstat -S 3
procs memory page disk faults cpu
r b w swap free si so pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 66240 72376 0 0 1 0 0 0 0 0 1 0 0 309 49 26 0 0 100
0 0 0 1160768 76216 0 0 0 0 0 0 0 0 0 0 0 307 147 57 0 0 100
0 0 0 1160768 76216 0 0 0 0 0 0 0 0 0 0 0 306 30 23 0 0 100
2.3 Cache Flusing : -c OPTION
.usr : User
.ctx : Context
.rgn : Region
.seg : Segment
.pag : Page
.par : Partial-page
#vmstat -c 3
:- Cache Flusing »óŸ¦ ³ªÅ¸³»´Â °ÍÀ¸·Î, ½Ã½ºÅÛÀÌ ºÎÆÃÇÑ ÀÌÈĺÎÅÍÀÇ
FlushingµÈ ij½ÃÀÇ ¼ö
[v700:/]#vmstat -c 3
flush statistics: (interval based)
usr ctx rgn seg pag par
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
2.4 Interrupts : -i OPTION
#vmstat -i
:- Device º° ÀÎÅÍ·´Æ® µÈ »çÇ×
[v700:/]#vmstat -i
interrupt total rate
--------------------------------
clock 6421499 100
zsc0 18 0
zsc1 6 0
cgsixc0 13 0
lec0 83719 1
fdc0 10 0
--------------------------------
Total 6505265 101
3. iostat
iostat [option] [interval [count]]
.o : user mode, system mode, I/O ¸¦ À§ÇÑ waiting, idleµî¿¡ »ç¿ëµÈ ½Ã°£¿¡ ´ëÇÑ
¹éºÐÀ²
.D : ÃÊ´ç µð½ºÅ©ÀÇ read, write ¿Í utilization ¿¡ ´ëÇÑ ¹éºÐÀ²
.t : ÃÊ´ç Å͹̳ο¡¼ »ç¿ëµÈ read, writeÀÇ character ¼ö
.x : Ãß°¡µÈ ¸ðµç µð½ºÅ©µéÀÇ »óÅ ǥ½Ã
#iostat 3
[v700:/]#iostat 3
tty fd0 sd0 sd2 sd6 cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
0 1 0 0 0 6 1 5 0 0 12 0 0 0 0 0 0 100
0 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100
0 27 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100
.tin : Terminal Input Queue ÀÇ CharacterÀÇ ¼ö
.tout : Terminal Output Queue ÀÇ Character ¼ö
.bps : ÃÊ ´ç ºí·Ï
.tps : ÃÊ ´ç Æ®·¢Àè¼Ç
.serv : ¼ºñ½º ½Ã°£ÀÇ Æò±Õ°ª(milliseconds)
.us : User mode
.sy : System mode
.wr : I/O ÀÇ Waiting
.id : Idle
#iostat -xtc 3
:- °¡Àå Áß¿äÇÑ °ÍÀº ¼ºñ½º ½Ã°£(svc_t), µå¶óÀ̺꿡 ´ëÇÑ ÀÔ,Ãâ·Â ¿ä±¸ÀÇ ¼ºñ½º
¿¡ ¼Ò¿äµÈ ½Ã°£À» ³ªÅ¸ÅÆ. ÀÌ ½Ã°£¿¡ ´Ù¸¥ ¿ä±¸°¡ ó¸®Áß¿¡ Àֱ⠶§¹®¿¡ Å¥¿¡
´ë±âÇÏ´Â ½Ã°£Æ÷ÇÔ, 30ÃÊÀÇ Æò±Õ»ç¿ë·üÀÌ 30%À» ³Ñ´Â µð½ºÅ©´Â Á¡°Ë ¿ä.
[v700:/]#iostat -xtc 3
extended device statistics tty cpu
device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id
fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 1 0 0 0 100
sd0 0.1 0.7 0.8 5.4 0.0 0.0 5.3 0 0
sd2 0.0 0.0 0.4 0.0 0.0 0.0 12.5 0 0
sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
.r/s : ÃÊ ´ç Read
.w/s : ÃÊ ´ç Write
.kr/s : ÃÊ ´ç Read(KB)
.kw/s : ÃÊ ´ç Write(KB)
.wait : ¼ºñ½º¸¦ À§ÇÑ Transaction Waiting ÀÇ Æò±Õ°ª
.actv : ½ÇÁúÀûÀ¸·Î ¼ºñ½ºµÈ Transaction ÀÇ Æò±Õ°ª
.svc_t : ¼ºñ½º ½Ã°£ÀÇ Æò±Õ°ª(milliseconds)
.%w : Queue°¡ ºñ¾îÀÖÁö ¾ÊÀº ½Ã°£ÀÇ ¹éºÐÀ²
.%b : µð½ºÅ©°¡ busy »óÅÂÀÎ ½Ã°£ÀÌ ¹éºÐÀ²
#iostat -D 3
:- ½Ã½ºÅÛÀÇ I/O °¡ °¡Àå È°¹ßÈ÷ ¿î¿ëµÇ°í ÀÖÀ» ¶§ ÃøÁ¤ÇÏ¿© I/O ÆíÁßµÊÀ» ÃøÁ¤.
°¢ µð½ºÅ©ÀÇ »ç¿ëµµ(util)°¡ ¾î´À Á¤µµÀÎÁö ÃøÁ¤, 60%ÀÌ»óÀÌ¸é °úºÎÇÏ.
[v700:/]#iostat -D 3
fd0 sd0 sd2 sd6
rps wps util rps wps util rps wps util rps wps util
0 0 0.0 0 1 0.1 0 0 0.0 0 0 0.0
0 0 0.0 0 0 0.0 0 0 0.0 0 0 0.0
0 0 0.0 0 0 0.0 0 0 0.0 0 0 0.0
util < 5% : White
5% < util < 35% : Green
35% < util < 65% : Amber
65% < util : RED
4. SAR(System Activity Reporter)
sar [option] [-o file] t [n]
sar [opotion] [-s time] [-e time] [-i sec] [-f file]
#sar 3 5
[v700:/]#sar 3 5
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:18:21 %usr %sys %wio %idle
11:18:24 0 0 0 99
11:18:27 0 0 0 100
11:18:30 0 0 0 100
11:18:33 0 0 0 100
11:18:36 0 0 0 100
Average 0 0 0 100
.-a : Check file access operation
.-b : Report buffer activity
.-c : Report system calls
.-d : Report block device activity
.-g : Report paging activity(page-out & memory freeing)
.-k : Report kernel memory allocation(KMSA) activity
.-m : Report message & semaphore activity
.-p : Report paging acitivity(page-in & fault activity)
.-q : Report average queue length while occupied & percent of time occupied
.-r : Report unused memory pages & disk blocks
.-u : Report CPU utilization
.-v : Report status of process, i-node, file tables
.-x : Report remote file-sharing & switching activity
.-w : Report system swapping & switching activity
.-y : Report TTY device activity
.-A : Report all data
#CPU ¿¡ °üÇÑ Á¡°Ë»çÇ×
#sar 3 5
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:18:21 %usr %sys %wio %idle
11:18:24 0 0 0 99
11:18:27 0 0 0 100
11:18:30 0 0 0 100
11:18:33 0 0 0 100
11:18:36 0 0 0 100
Average 0 0 0 100
[v700:/]#sar -o /tmp/sar_1.file 3 5
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:26:01 %usr %sys %wio %idle
11:26:04 0 0 0 100
11:26:07 0 0 0 100
11:26:10 0 0 0 100
11:26:13 0 0 0 100
11:26:16 0 0 0 100
Average 0 0 0 100
[v700:/]#ls -l /tmp/sar_1.file
-rw-r--r-- 1 root other 26064 10¿ù 12ÀÏ 11:26 /tmp/sar_1.file
[v700:/]#sar -f /tmp/sar_1.file
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:26:01 %usr %sys %wio %idle
11:26:04 0 0 0 100
11:26:07 0 0 0 100
11:26:10 0 0 0 100
11:26:13 0 0 0 100
11:26:16 0 0 0 100
Average 0 0 0 100
#Buffer Activity
#sar -b 3 5
[v700:/]#sar -b 3 5
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:27:09 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
11:27:12 0 0 100 0 0 100 0 0
11:27:15 0 0 100 0 0 100 0 0
11:27:18 0 0 100 0 0 100 0 0
11:27:21 0 0 100 0 0 100 0 0
11:27:24 0 3 100 3 6 53 0 0
Average 0 1 100 1 1 53 0 0
:- %rcache ¿Í %wcache´Â ½Ã½ºÅÛ ¹öÆÛÀÇ ½ÇÁúÀûÀÎ À¯È¿°ªÀ¸·Î, ¸¸¾à %rcache °¡
90%ÀÌÇÏ·Î ¶³¾îÁö°Å³ª, %wcache °ªÀÌ 65% ÀÌÇÏÀÌ¸é ¹öÆÛ½ºÆäÀ̽º Áõ°¡ÇÒ °Í
#Disk I/O Á¡°Ë
#sar -d 10 3
[v700:/]#sar -d 5 3
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:29:06 device %busy avque r+w/s blks/s avwait avserv
11:29:11 fd0 0 0.0 0 0 0.0 0.0
nfs1 0 0.0 0 0 0.0 0.0
sd0 0 0.0 0 0 0.0 0.0
sd0,a 0 0.0 0 0 0.0 0.0
sd0,b 0 0.0 0 0 0.0 0.0
sd0,c 0 0.0 0 0 0.0 0.0
sd0,d 0 0.0 0 0 0.0 0.0
sd0,f 0 0.0 0 0 0.0 0.0
sd0,g 0 0.0 0 0 0.0 0.0
sd0,h 0 0.0 0 0 0.0 0.0
sd2 0 0.0 0 0 0.0 0.0
sd2,c 0 0.0 0 0 0.0 0.0
sd2,d 0 0.0 0 0 0.0 0.0
sd2,f 0 0.0 0 0 0.0 0.0
sd2,h 0 0.0 0 0 0.0 0.0
sd6 0 0.0 0 0 0.0 0.0
#Memory ¿Í page-out Á¡°Ë
#sar -g 10 3
:- pgscan/3 ´Â ÃÊ ´ç ÆäÀÌÁö ¼ö¸¦ ³ªÅ¸³½ °Í, ³ôÀ¸¸é ºÎÁ·ÇÔ
sar -g 10 3
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:30:50 pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
11:31:00 0.00 0.00 0.00 0.00 0.00
11:31:10 0.00 0.00 0.00 0.00 0.00
11:31:20 0.00 0.00 0.00 0.00 0.00
Average 0.00 0.00 0.00 0.00 0.00
#Process Á¡°Ë
#sar -q 10 3
:-q OPTION À» »ç¿ëÇÏ¸é ¾ó¸¶³ª ¸¹Àº ¼öÀÇ ÇÁ·Î¼¼½º°¡ ½ÇÇà ´ë±â Å¥¿¡ ÀÖ´ÂÁö °Ë»ö
ÇÒ ¼ö ÀÖ´Ù. runq-sz Àº ¸Þ¸ð¸® »ó¿¡ ´ë±âÁßÀÎ Process Thread ¼ö, 2 ÀÌ»óÀ̸é
CPU °¡ ÇÑ°èÄ¡¿¡ ´Ù´Ù¸¥ °Í. %runocc ´Â ¾î¶² run queue ¼ýÀÚ°¡ ÀÛÀ»¼ö·Ï ¿ì¼±
¼øÀ§°¡ ³ô´Ù.
[v700:/]#sar -q 10 3
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:33:27 runq-sz %runocc swpq-sz %swpocc
11:33:37
11:33:47
11:33:57
Average
#Swap Memory ¿Í Swap-file disk block
#sar -r 10 3
:- °¡¿ë ¸Þ¸ð¸®°¡ ÀνºÅçµÈ ¸Þ¸ð¸®ÀÇ 6%º¸´Ù °è¼ÓÇؼ ÀÛÀ¸¸é °¡¿ë ¸Þ¸ð¸®°¡ ºÎÁ·ÇÔ
ÀáÀçÀûÀÎ º´¸ñ Çö»ó
[v700:/]#sar -r 10 3
SunOS v700 5.7 Generic_106541-17 sun4u 10/12/01
11:34:12 freemem freeswap
11:34:22 9469 2318629
11:34:32 9478 2320944
11:34:42 9478 2320944
Average 9475 2320172
5. netstat
#netstat-i 5
[v700:/]#netstat -i 5
input le0 output input (Total) output
packets errs packets errs colls packets errs packets errs colls
82959 4 3691 37 17 84638 4 5370 37 17#netstat -i
7 0 1 0 0 7 0 1 0 0
5 0 2 0 0 5 0 2 0 0
6 0 2 0 0 6 0 2 0 0
2 0 2 0 0 2 0 2 0 0
#netstat -i
[v700:/]#netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 1679 0 1679 0 0 0
le0 1500 v700 v700 83015 4 3717 37 17 0
:- Network Collision Rate(%) ´Â Collision ¼ö¸¦ Output Packet ¼ö¸¦ ³ª´« °ÍÀ¸·Î
(Network Collision Rate = Collis/Opkts)À¸·Î, ¾ÕÀÇ »çÇ×À» ¿¹·Î Çϸé Network
Collision RAte = 17/3717=0.0046% ÀÌ´Ù. ÀÌ ¶§ Collision Rate °¡ 5%º¸´Ù Å©°í
10%¿¡ °¡±î¿öÁö¸é Network Overload °¡ ÃÊ·¡µÊ,
:- Input Packet Error Rate(%)´Â Input Error ¼ö¸¦ Àüü Input Packet ¼ö·Î ³ª´©¸ç
(Input Packet Error Rate = Ierrs/Ipkts), Output Packet Error Rate(%) ´Â Output
Error ¼ö¸¦ Àüü Output Packet Error ¼ö·Î ³ª´« °Í(Output Packet Error Rate =
Oerrs/Opkts)À¸·Î, À̶§ Input Rate °¡ 0.25%º¸´Ù Å©°Ô µÇ¸é ½Ã½ºÅÛÀº ÆÐŶÀ»
µå·ÓÇÏ°Ô µÈ´Ù.
6.snoop
#snoop -o /tmp/a
[v700:/]#snoop -o /tmp/a
Using device /dev/le (promiscuous mode)
189 ^C
[v700:/]#snoop -i /tmp/a | more
1 0.00000 211.47.158.167 -> dos TELNET C port=1034 f
2 0.00051 dos -> 211.47.158.167 TELNET R port=1034 f
3 0.01138 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141984171 Seq=9703528 Len=0 Win=8760
4 0.00146 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141990011 Len=1460 Win=8022
5 0.00122 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141991471 Len=1460 Win=8022
6 0.01544 211.200.131.241 -> 211.47.158.140 UDP D=9001 S=9785 LEN=25
7 0.00592 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141987091 Seq=9703528 Len=0 Win=8760
8 0.00146 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141992931 Len=1460 Win=8022
9 0.00123 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141994391 Len=1460 Win=8022
10 0.02105 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141990011 Seq=9703528 Len=0 Win=8760
11 0.00146 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141995851 Len=1460 Win=8022
12 0.00123 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141997311 Len=1460 Win=8022
13 0.01199 211.47.158.146 -> cheesy XWIN R port=36490
14 0.00394 211.47.158.167 -> dos TELNET C port=1034
15 0.00051 dos -> 211.47.158.167 TELNET R port=1034
16 0.00782 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141992931 Seq=9703528 Len=0 Win=8760
17 0.00146 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=141998771 Len=1460 Win=8022
18 0.00123 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142000231 Len=1460 Win=8022
19 0.01835 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141995851 Seq=9703528 Len=0 Win=8760
20 0.00145 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142001691 Len=1460 Win=8022
21 0.00122 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142003151 Len=1460 Win=8022
22 0.02392 notebook -> v700 TELNET C port=1235
23 0.00007 v700 -> notebook TELNET R port=1235 Using device /dev/le
24 0.00035 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=141998771 Seq=9703528 Len=0 Win=8760
25 0.00147 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142004611 Len=1460 Win=8022
26 0.00122 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142006071 Len=1460 Win=8022
27 0.01833 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=142001691 Seq=9703528 Len=0 Win=8760
28 0.00133 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142007531 Len=1344 Win=8022
29 0.02296 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=142004611 Seq=9703528 Len=0 Win=8760
30 0.02383 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=142007531 Seq=9703528 Len=0 Win=8760
31 0.00764 211.47.158.167 -> dos TELNET C port=1034
32 0.00113 211.47.237.143 -> 211.47.158.144 TCP D=3129 S=139 Ack=142008875 Seq=9703528 Len=0 Win=7416
33 0.00027 211.47.158.144 -> 211.47.237.143 TCP D=139 S=3129 Ack=9703528 Seq=142008875 Len=68 Win=8022
7. sdtprocess
8. top
** II. ¼º´É Á¶Á¤ ±âÁØ **
.White : »ç¿ë·®ÀÌ ¾ÆÁÖ Àû´Ù
.Blue : »ç¿ë·®ÀÌ Àû´Ù
.Green : ƯÀÌÇÑ ¹®Á¦Á¡¾øÀÌ ¿øÈ°È÷ ¿î¿µµÇ°í ÀÖ´Ù.
.Amber : Warning Level
.Red : ½É°¢ÇÑ LEVEL À̸ç, Á¶Ä¡°¡ ÇÊ¿äÇÔ
.Black : ½Ã½ºÅÛÀÇ »óÅ°¡ ¾ÆÁÖ ½É°¢ÇÏ´Ù.
.Action : °¢ Å×À̺íÀÇ rule ¿¡¼ ÃëÇØ¾ß ÇÒ Á¶Ä¡ »çÇ׿¡ °üÇÑ ³»¿ë
1. Memory Rule
- °¡»ó¸Þ¸ð¸®
100000k <= vmstat 30. swap White Swap Waste
100000k <= vmstat 30. swap < 100000k Green No Problem
4000k <= vmstat 30, swap < 10000k Amber Swap Low
1000k <= vmstat 30, swap < 4000k Red Swap Low
vmstat 30. swap < 1000k Black No Swap
- Physical ¸Þ¸ð¸®
vmstat 30. sr = = 0 White RAM Waste
0 < vmstat 30. sr < 200 Green No Problem
200 <= vmstat 30. sr < 300 Amber RAM Low
300 <= vmstat 30. sr RED RAM Low
- CPU Rule
vmstat 30. r = = 0 White CPU Idle
0 < (vmstat 30. r/ncpus) < 3.0 Green No Problem
3.0 <= (vmstat 30. r/ncpus) <= 5.0 Amber CPU Busy
5.0 < (vmstat 30. r/ncpus) RED CPU Busy
mpstat 30. smtx < 200 Green NO Problem
200 <= mpstat 30. smtx < 400 Amber Nutex Stall
400 <= mpstat 30. smtx RED Mutex Stall
- Disk I/O Rule
(iostat -x 30. b < 5%) && (Other disks white or green) White No Problem
(iostat -x 30. b < 5%) && (Other disks amber or red) Blue Idle Disk
( 5% <= iostat -x 30. b) && (iostat -x 30. svc_t < 30 ms) Green No Problem
(20% <= iostat -x 30. b) && (30ms <= iostat -x 30. svc_t < 50ms) Amber Busy Disk
(20% <= iostat -x 30. b) && (50ms <= iostat -x 30. svc_t) RED Budy Disk
(20% <= iostat -x 30. b) && (50ms <= iostat -x 30. svc_t)
&& (iostat -x 30. disk == "fd0" || iostat -x 30. disk == "sd6") Amber Floppy/CD
0% == iostat -x 30. w Green No Problem
0% < iostat -x 30. w < 5% Amber SCSI Busy
5% <= iostat -x 30. w RED SCSI Busy
- Network Rule(Ethernet collision)
(0 < netstat -i 30. output.packets < 10) && (100 * netstat -i 30. output.colls/
netstat -i 30. output.packets < 0.5%) &&(Other nets white or green) White NO problem
(0 < netstat -i 30. Output.packets < 10) && (100 * netstat -i 30. Output.colls/
netstat -i 30. Output.packets < 0.5%) && (Other nets amber or red) Blue Inactive Net
(10 <= netstat -i 30. Output.packets) && (0.5% <= 100 * netstat -i 30. Output.colls/
netstat -i 30. Output.packets < 2.0% ) Green NO Problem
(10 <= netstat -i 30. Output.packets) && (2.0% <= 100 * netstat -i 30. Output.colls/
netstat -i 30. Output.packets < 5.0% ) Amber Busy Net
(10 <= netstat -i 30. Output.packets) && (5.0% <= 100 * netstat -i 30. Output.colls/
netstat -i 30. Output.packets)
|