Sundaramurthy Blog

January 15, 2010

Liunx command

Filed under: Linux — sundar5 @ 7:29 am

1. Linux version.

cat /etc/redhat-release

Red Hat Enterprise Linux AS release 4 (Nahant Update 6)

2. Processors related statistics

Display 2 reports of statistics for  all  processors  at  three second intervals

$ mpstat  -P  ALL   3     2

Linux 2.6.9-67.ELlargesmp (db01.yda.abccompany.com)  07/01/2010

08:31:49 AM  CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s
08:31:52 AM  all   10.31    0.00    4.82    5.38    0.09    1.39   78.01  21015.41
08:31:52 AM    0    6.85    0.00    3.08    0.34    0.00    0.00   89.73     11.30
08:31:52 AM    1   16.44    0.00    5.14    0.34    0.00    0.00   78.77      0.00
08:31:52 AM    2   13.01    0.00    4.45    0.00    0.00    0.00   82.88      0.00
08:31:52 AM    3   13.70    0.00    2.74    0.00    0.00    0.34   83.22   1024.66
08:31:52 AM    4   14.04    0.00    4.11   23.63    0.00    2.05   56.16    190.07
08:31:52 AM    5    3.77    0.00    1.37    0.00    0.00    0.34   95.21      0.00
08:31:52 AM    6    8.90    0.00    1.37    0.00    0.00    0.34   89.73      0.00
08:31:52 AM    7    0.34    0.00    0.68    0.00    0.00    0.34   99.32     62.67

08:31:52 AM  CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s
08:31:55 AM  all   10.31    0.00    5.00    5.78    0.06    1.44   77.41  20168.24
08:31:55 AM    0    1.35    0.00    2.03    0.34    0.00    0.34   95.95      6.42
08:31:55 AM    1   12.16    0.00    4.39    0.00    0.00    0.00   82.77      0.00
08:31:55 AM    2   20.27    0.00    8.11    0.00    0.00    0.00   69.93      0.00
08:31:55 AM    3    5.07    0.00    2.36   22.97    0.00    0.68   66.89     72.97
08:31:55 AM    4    5.07    0.00    1.69    0.00    0.00    0.00   93.24   1013.51
08:31:55 AM    5    0.34    0.00    1.01    0.00    0.00    0.00   97.97      0.00
08:31:55 AM    6   22.64    0.00    3.38    0.00    0.00    0.00   72.30      0.00
08:31:55 AM    7   30.74    0.00   11.82    1.01    1.01   14.19   39.19  15242.23

Average:     CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s
Average:     all   10.31    0.00    4.91    5.58    0.08    1.42   77.71  20588.95
Average:       0    4.08    0.00    2.55    0.34    0.00    0.17   92.86      8.84
Average:       1   14.29    0.00    4.76    0.17    0.00    0.00   80.78      0.00
Average:       2   16.67    0.00    6.29    0.00    0.00    0.00   76.36      0.00
Average:       3    9.35    0.00    2.55   11.56    0.00    0.51   75.00    545.58
Average:       4    9.52    0.00    2.89   11.73    0.00    1.02   74.83    604.59
Average:       5    2.04    0.00    1.19    0.00    0.00    0.17   96.60      0.00
Average:       6   15.82    0.00    2.38    0.00    0.00    0.17   80.95      0.00
Average:       7   15.65    0.00    6.29    0.51    0.51    7.31   69.05   7704.08
Average:       8   16.67    0.00    6.80    0.85    0.51    7.31   66.67   7902.21

Display  four reports of global statistics among all processors at three second intervals.

$ mpstat  3   4

Linux 2.6.9-67.ELlargesmp (db01.yda.abccompany.com)  07/01/2010

08:30:14 AM  CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s
08:30:17 AM  all   11.63    0.00    7.27    5.41    0.11    1.30   74.28  16517.97
08:30:20 AM  all   10.93    0.00    4.98    5.80    0.06    1.20   77.03  15067.91
08:30:23 AM  all    8.81    0.00    4.36    5.73    0.06    1.22   79.82  14998.99
08:30:26 AM  all    7.64    0.00    3.55    5.58    0.09    1.16   81.99  14989.04
Average:     all    9.75    0.00    5.04    5.63    0.08    1.22   78.28  15393.56
CPU
Processor number. The keyword all indicates that statistics  are calculated as averages among all processors

%user

user level (application) the percentage of CPU utilization that occurred

%nice

the percentage of CPU utilization. user level with nice priority            .

%system

Show  the percentage of CPU utilization that occurred while executing at the system level (kernel).

%iowait

Show  the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

%irq

Show the percentage of time spent by the CPU or CPUs to  service interrupts.

%soft

Show  the percentage of time spent by the CPU or CPUs to service softirqs.

%idle

Show the percentage of time that the CPU or CPUs were  idle  and the system did not have an outstanding disk I/O request.

intr/s

Show  the  total number of interrupts received per second by the  CPU

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: