AgileApps Support Wiki Pre Release

Monitoring OS Statistics

From AgileApps Support Wiki
Revision as of 21:37, 2 October 2013 by imported>Aeric
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Before tuning any stack, whether for a web server or a database server, you should know how heavily system resources are being used. To get the information, use the following commands:

  • top
top - 15:50:31 up 309 days, 21:10,  1 user,  load average: 0.06, 0.16, 0.15
Tasks: 134 total,   1 running, 133 sleeping,   0 stopped,   0 zombie
  PID  USER   PR  NI  VIRT  RES  SHR S %CPU %MEM   TIME+   COMMAND
12929  root   18   0 3680m 1.2g  12m S 17.6 32.3  76:19.02 java
  • mpstat
03:51:30 PM  CPU   %user   %nice %system %iowait   %irq   %soft   %idle   intr/s
03:51:30 PM  all    1.79    0.00    0.29    0.43   0.01    0.06   97.42   425.80
03:51:30 PM    0    3.22    0.00    0.43    0.47   0.02    0.21   95.65   151.15
03:51:30 PM    1    1.08    0.00    0.21    0.68   0.00    0.01   98.02   103.64
03:51:30 PM    2    1.65    0.00    0.28    0.38   0.00    0.02   97.68    96.45
03:51:30 PM    3    1.24    0.00    0.23    0.19   0.00    0.01   98.33    74.56
  • vmstat
procs  -----------memory----------- --swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache    si   so   bi    bo    in   cs  us sy id wa
 0  0  22264 1110200 168460 1120660   0    0    1    39     0    0   2  0 97  0
  • free –m
             total    used    free   shared  buffers  cached
Mem:          3945    2862    1083        0      164    1094
-/+ buffers/cache:    1603    2342
Swap:         1027      21    1005

Learn More:'