Wednesday, November 28, 2012

0 Linux Monitor command: top, sar, iostat, /proc/meminfo …

Monitor overall system

top
-p   Show particular PID
-d   refresh secs
1   show individual CPU information
sorting P Sort by CPU usage
  M sort by memory usage
  N sort by PID
image
vmstat

vmstat report memory and CPU information.  In the below example, it means collect information every 2 secs for 3 times.

vmstat 2 3
image

sar

sar also can report the CPU, memory and disk IO information base on the parameter.

sar 2 3

This example means collect the information every 2 secs for 3 times.

image

sar –r 2 3 

-r provide more detail of the memory

image

sar –b 2 3

-b provide the disk IO information.

image

Monitor CPU

uptime: This provide the idea for general host level loading. Large number means higher load.

image

Monitor Disk

collect information every 2 secs for 2 times.

iostat 2 2

image

Monitor memory

mpstat
mpstat 2 3

collect information every 2 secs for 3 times.

image

free

General memory utilization on the host.

image

/proc/meminfo

Snapshot for the host memory usage.

cat /proc/meminfo

image

ipcs

show shared memory in the Oracle SGA.

image

Others

ipcrm: Remove the message queue or shared memory.

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates