November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Monitor Your System Performance

Monitor Your System Performance in Linux

 

@server ~]# uptime
13:14:02 up  1:30,  2 users,  load average: 0.04, 0.26, 0.27

[root@server ~]# ps -eo %u | sort | uniq -c | sort -rn

[root@server ~]# sar -c           ## Process/sec
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011

11:50:01 AM    proc/s
12:00:01 PM      6.87
12:10:01 PM      6.90
12:20:01 PM      7.10
12:30:01 PM      6.77
12:40:01 PM      6.99
12:50:01 PM      6.85
01:00:01 PM      6.83
01:10:01 PM      6.92
Average:         6.90

[root@server ~]# sar -b   ## Data r/wr ps
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011

11:50:01 AM       tps      rtps      wtps   bread/s   bwrtn/s
12:00:01 PM     24.81      0.18     24.63      6.37    376.94
12:10:01 PM     26.14      0.33     25.81     10.68    388.21
12:20:01 PM     57.68     28.05     29.63    620.21    466.02
12:30:01 PM     24.16      0.13     24.03      1.92    369.00
12:40:01 PM     24.55      0.10     24.44      1.70    374.73
12:50:01 PM     25.07      0.14     24.93      4.31    380.10
01:00:01 PM     24.95      0.58     24.37      6.20    377.88
01:10:01 PM     24.57      0.01     24.56      0.04    376.16
Average:        28.98      3.68     25.30     81.17    388.59

[root@server ~]# iostat -k
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
0.40    0.00    3.84    0.44    0.00   95.32

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               6.60        32.24        65.92     177987     363873
sda1              0.10         0.21         0.00       1163          5
sda2              6.50        32.01        65.92     176684     363868
dm-0             20.19        31.54        65.91     174109     363844
dm-1              0.02         0.08         0.00        440          0
dm-2              0.06         0.25         0.00       1397         20
dm-3              0.03         0.11         0.00        613          4

[root@server ~]#

# cat /proc/stat
cpu  1864 0 16482 416939 2375 34 527 0
cpu0 1864 0 16482 416939 2375 34 527 0
intr 2416023 2368439 12 0 2 2 0 5 0 1 0 0 0 116 0 0 21 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 29989 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 17399 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0
ctxt 258727
btime 1314166387
processes 32539
procs_running 1
procs_blocked 0

# cat /proc/meminfo
MemTotal:       218872 kB
MemFree:         36680 kB
Buffers:         40416 kB
Cached:          79080 kB
SwapCached:          0 kB
Active:         116728 kB
Inactive:        47320 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       218872 kB
LowFree:         36680 kB
SwapTotal:      614384 kB
SwapFree:       614384 kB
Dirty:             460 kBWriteback:           0 kB
AnonPages:       44556 kB
Mapped:          15936 kB
Slab:            11628 kB
PageTables:       2320 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    723820 kB
Committed_AS:   376900 kB
VmallocTotal:   802808 kB
VmallocUsed:      3564 kB
VmallocChunk:   798832 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB

[root@server ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping        : 10
cpu MHz         : 2592.870
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss constant_tsc up pni
bogomips        : 5185.74

[root@server ~]# cat /proc/buddyinfo
Node 0, zone      DMA     37     33     31     29     19     12      9      2      0      0      0
Node 0, zone   Normal   2217    861    467    317     71     17      6      1      1      0      0
[root@server ~]#

[root@server ~]# cat /proc/execdomains
0-0     Linux                   [kernel]

[root@server ~]# cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   binfmt_misc
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   anon_inodefs
nodev   futexfs
nodev   tmpfs
nodev   inotifyfs
nodev   eventpollfs
nodev   devpts
ext2
nodev   ramfs
nodev   hugetlbfs
iso9660
nodev   mqueue
ext3

[root@server ~]# cat /proc/interrupts
CPU0
0:    2539099    IO-APIC-edge  timer
1:         12    IO-APIC-edge  i8042
6:          5    IO-APIC-edge  floppy
7:          0    IO-APIC-edge  parport0
8:          1    IO-APIC-edge  rtc
9:          0   IO-APIC-level  acpi
12:        116    IO-APIC-edge  i8042
15:         21    IO-APIC-edge  ide1
51:      31376   IO-APIC-level  ehci_hcd:usb1, ioc0
59:         37   IO-APIC-level  uhci_hcd:usb2
67:      19497   IO-APIC-level  eth0
75:          0   IO-APIC-level  Ensoniq AudioPCI
NMI:          0
LOC:    4700127
ERR:          0
MIS:          0

[root@server ~]# cat /proc/iomem

[root@server ~]# cat /proc/loadavg
0.33 0.36 0.29 1/92 2916

[root@server ~]# cat /proc/locks
1: POSIX  ADVISORY  READ  2689 fd:00:320039 4 4
2: POSIX  ADVISORY  WRITE 2732 fd:00:931460 0 EOF
3: POSIX  ADVISORY  READ  2689 fd:00:320021 4 4
4: POSIX  ADVISORY  WRITE 2689 fd:00:288615 0 0
5: POSIX  ADVISORY  READ  2686 fd:00:320027 4 4
6: POSIX  ADVISORY  READ  2686 fd:00:320026 4 4
7: POSIX  ADVISORY  READ  2686 fd:00:320025 4 4
8: POSIX  ADVISORY  READ  2686 fd:00:320024 4 4
9: POSIX  ADVISORY  READ  2686 fd:00:320021 4 4
10: POSIX  ADVISORY  WRITE 2686 fd:00:288614 0 0
11: FLOCK  ADVISORY  WRITE 2641 fd:00:288138 0 EOF
12: POSIX  ADVISORY  WRITE 2592 fd:00:288509 0 EOF
13: POSIX  ADVISORY  WRITE 2592 fd:00:288508 0 EOF
14: POSIX  ADVISORY  WRITE 2592 fd:00:288507 0 EOF
15: POSIX  ADVISORY  WRITE 2457 fd:00:288680 1024 2047

[root@server ~]# cat /proc/net/tcp
sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
0: 00000000:0185 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7642 1 c8adbb40 3000 0 0 2 -1
1: 0100007F:0CEA 00000000:0000 0A 00000000:00000000 00:00000000 00000000    27        0 7887 1 c8adb240 3000 0 0 2 -1
2: 00000000:008B 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8138 1 c8ada4c0 3000 0 0 2 -1
3: 00000000:006F 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7482 1 c9720040 3000 0 0 2 -1
4: 00000000:0015 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7778 1 c8adb6c0 3000 0 0 2 -1
5: 0708A8C0:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7399 1 c9720940 3000 0 0 2 -1
6: 0808A8C0:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7397 1 c9720dc0 3000 0 0 2 -1
7: 0908A8C0:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7395 1 c9721240 3000 0 0 2 -1
8: 0A08A8C0:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7393 1 c97216c0 3000 0 0 2 -1
9: 0100007F:0035 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7391 1 c9721b40 3000 0 0 2 -1
10: 0100007F:03B9 00000000:0000 0A 00000000:00000000 00:00000000 00000000    25        0 7407 1 c97204c0 3000 0 0 2 -1
11: 00000000:01BD 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8137 1 c8ada940 3000 0 0 2 -1
12: 0908A8C0:D26D 3208A8C0:0016 02 00000001:00000000 01:000000DF 00000000   502        0 143213 3 c28d9b40 3000 0 0 2 -1
[root@server ~]#
[root@server ~]# cat /proc/net/udp
sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
9: 0A08A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8108 2 c4db8d00
9: 0908A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8106 2 c4db32c0
9: 0808A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8104 2 c4db36c0
9: 0708A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8102 2 c4db3ac0
9: 00000000:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8099 2 c8a04080
10: 0A08A8C0:008A 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8109 2 c4db8b00
10: 0908A8C0:008A 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8107 2 c4db30c0
10: 0808A8C0:008A 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8105 2 c4db34c0
10: 0708A8C0:008A 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8103 2 c4db38c0
10: 00000000:008A 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8100 2 c4db3cc0
53: 00000000:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7403 2 c96e9c40
53: 0708A8C0:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7398 2 c96e9240
53: 0808A8C0:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7396 2 c96e9440
53: 0908A8C0:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7394 2 c96e9640
53: 0A08A8C0:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7392 2 c96e9840
53: 0100007F:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000    25        0 7390 2 c96e9a40
111: 00000000:006F 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7476 2 c96e9040
123: 0708A8C0:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7770 2 c8a04280
123: 0808A8C0:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7769 2 c8a04480
123: 0908A8C0:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7768 2 c8a04680
123: 0A08A8C0:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7767 2 c8a04880
123: 0100007F:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7766 2 c8a04a80
123: 00000000:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 7762 2 c8a04c80

[root@server ~]# cat /proc/net/protocols
protocol  size sockets  memory press maxhdr  slab module     cl co di ac io in de sh ss gs se re sp bi br ha uh gp em
RAWv6      648     -1      -1   NI       0   yes  ipv6        y  y  y  n  y  y  y  n  y  y  y  y  n  y  y  y  y  n  n
UDPv6      620     -1       0   NI       0   yes  ipv6        y  y  y  n  y  n  y  n  y  y  y  y  n  n  y  y  y  y  n
TCPv6     1248     19       1   no     224   yes  ipv6        y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  y
PACKET     444     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n
UNIX       416     -1      -1   NI       0   yes  kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n
RAW        500     -1      -1   NI       0   yes  kernel      y  y  y  n  y  y  n  n  y  y  y  y  n  y  y  y  y  n  n
UDP        508     -1       0   NI       0   yes  kernel      y  y  y  n  y  n  y  n  y  y  y  y  y  n  y  y  y  y  n
TCP       1136     19       1   no     224   yes  kernel      y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  y
NETLINK    404     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n

[root@server ~]# cat /proc/partitions
major minor  #blocks  name

8     0   31457280 sda
8     1     104391 sda1
8     2   20860402 sda2
253     0    7168000 dm-0
253     1     512000 dm-1
253     2    3891200 dm-2
253     3    2048000 dm-3

[root@server ~]# cat /proc/schedstat
version 12
timestamp 2436227
cpu0 4336 4336 7 4343 7528 307075 58464 139144 139144 192048 1771799 248611
domain0 00000001 661081 661081 0 0 0 0 0 661081 360 360 0 0 0 0 0 360 58464 58464 0 0 0 0 0 58464 0 0 0 0 0 0 0 0 0 0 0 0
[root@server ~]#

[root@server ~]# cat /proc/stat
cpu  2085 0 18967 484888 2403 42 607 0
cpu0 2085 0 18967 484888 2403 42 607 0
intr 2808623 2749553 12 0 2 2 0 5 0 1 0 0 0 116 0 0 21 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 33013 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 25861 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0
ctxt 302029
btime 1314166387
processes 37438
procs_running 1
procs_blocked 0

[root@server ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/mapper/MYVOL-SWAPer                partition       511992  0       -1
/extraswap                              file            102392  0       -2
[root@server ~]#

[root@server ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
Type:   Direct-Access                    ANSI SCSI revision: 02
[root@server ~]#

[root@server ~]# cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
serial               /dev/ttyS       4 64-95 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console

[root@server ~]# cat /proc/uptime
5253.31 4967.57
[root@server ~]#

[root@server ~]# cat /proc/version
Linux version 2.6.18-164.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 03:33:56 EDT 2009
[root@server ~]# cat /proc/vmstat
nr_anon_pages 9791
nr_mapped 3984
nr_file_pages 30072
nr_slab 3002
nr_page_table_pages 521
nr_dirty 107
nr_writeback 0
nr_unstable 0
nr_bounce 0
pgpgin 183179
pgpgout 345817
pswpin 0
pswpout 0
pgalloc_dma 8166
pgalloc_dma32 0
pgalloc_normal 3542647
pgalloc_high 0
pgfree 3561159
pgactivate 41504
pgdeactivate 13669
pgfault 12248866
pgmajfault 885
pgrefill_dma 1954
pgrefill_dma32 0
pgrefill_normal 22667
pgrefill_high 0
pgsteal_dma 1177
pgsteal_dma32 0
pgsteal_normal 13810
pgsteal_high 0
pgscan_kswapd_dma 576
pgscan_kswapd_dma32 0
pgscan_kswapd_normal 7328
pgscan_kswapd_high 0
pgscan_direct_dma 608
pgscan_direct_dma32 0
pgscan_direct_normal 7744
pgscan_direct_high 0
pginodesteal 213
slabs_scanned 23552
kswapd_steal 7342
kswapd_inodesteal 289
pageoutrun 198
allocstall 142
pgrotated 0

[root@server ~]#
[root@server ~]# vmstat -m

## Check NC status
[root@server ~]# mii-tool eth0

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>