Wednesday, 7 March 2012

Monitor Your System Performance


Monitor Your System Performance

Xxxxxxxxxxxxxxx Monitor Your System Performance xxxxxxxxxxxxxxxxxxxxX

[root@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
56 root

22 nagios

8 apache

1 xfs

[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

# 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 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/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

[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

[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

[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 ~]# 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 ~]# 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 ~]# 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 ~]# 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

Other that are usefulls :
[root@server ~]# cat /proc/interrupts

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

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

[root@server ~]# vmstat -m


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

No comments:

Post a Comment

Twitter Bird Gadget