How to take Server CPU Utilization?
Answer: "vmstat $interval $numberOfSamples"
Sample Output:
or
"sar -u $interval $numberOfSamples"
Sample Output:
How to Record Netowrk usage?
Answer: "sar -n DEV $interval $numberOfSamples"
Sample Output:
How to take Core-wise CPU utilization?
Answer: "mpstat -P ALL $interval $numberOfSamples"
Sample Output:
How to capture System I/O statistics?
Answer: "iostat -x -k $interval $numberOfSamples"
Sample Output:
Answer: "vmstat $interval $numberOfSamples"
Sample Output:
Code:
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
5 0 0 2461704 179196 1664128 0 0 1 5 40 48 4 1 95 0 0
0 0 0 2461968 179196 1664184 0 0 0 27 1660 2161 2 3 95 0 0
10 0 0 2464308 179196 1664240 0 0 0 22 3470 3160 19 3 77 0 0
"sar -u $interval $numberOfSamples"
Sample Output:
Code:
04:43:23 AM CPU %user %nice %system %iowait %steal %idle
04:43:24 AM all 1.77 0.00 5.30 0.00 0.00 92.93
04:43:25 AM all 2.02 0.00 5.29 0.00 0.00 92.70
04:43:26 AM all 1.76 0.00 2.02 0.00 0.00 96.22
04:43:27 AM all 1.26 0.00 2.02 0.00 0.00 96.72
How to Record Netowrk usage?
Answer: "sar -n DEV $interval $numberOfSamples"
Sample Output:
Code:
04:43:23 AM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
04:43:24 AM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
04:43:24 AM eth1 73.74 89.90 13.03 9.33 0.00 0.00 0.00
How to take Core-wise CPU utilization?
Answer: "mpstat -P ALL $interval $numberOfSamples"
Sample Output:
Code:
04:43:23 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
04:43:24 AM all 1.78 0.00 5.08 0.00 0.00 0.00 0.00 0.00 93.15
04:43:24 AM 0 2.04 0.00 6.12 0.00 0.00 0.00 0.00 0.00 91.84
04:43:24 AM 1 3.00 0.00 5.00 0.00 0.00 0.00 0.00 0.00 92.00
04:43:24 AM 2 1.02 0.00 7.14 0.00 0.00 0.00 0.00 0.00 91.84
04:43:24 AM 3 1.00 0.00 3.00 0.00 0.00 0.00 0.00 0.00 96.00
How to capture System I/O statistics?
Answer: "iostat -x -k $interval $numberOfSamples"
Sample Output:
Code:
avg-cpu: %user %nice %system %iowait %steal %idle
3.61 0.00 0.96 0.01 0.00 95.43
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.06 4.49 0.13 0.97 2.89 21.85 44.97 0.00 4.06 0.76 0.08
dm-0 0.00 0.00 0.18 5.46 2.87 21.85 8.77 0.28 49.05 0.15 0.08
dm-1 0.00 0.00 0.00 0.00 0.01 0.00 8.00 0.00 1.91 0.85 0.00