03-05-2008
89,
0
Join Date: Feb 2008
Last Activity: 26 November 2010, 4:27 AM EST
Posts: 89
Thanks Given: 0
Thanked 0 Times in 0 Posts
CUP and Memory
Hi All Unix experts,
I want to calculate CUP Utilization and Memory Utilization on solairs boxes.
Please help me to write a script for this, since i am doing this manualy for more than 30 servers daily.
My daily task is
# top
last pid: 28627; load avg: 8.50, 8.12, 8.16; up 100+18:32:56 11:46:38
2033 processes: 2022 sleeping, 1 zombie, 1 stopped, 9 on cpu
CPU states: 45.1% idle, 26.2% user, 27.6% kernel, 1.2% iowait, 0.0% swap
Memory: 32G phys mem, 875M free mem, 16G swap, 16G free swap
CPU Utilization = (100 - ideal value)%
and for memory is
Momory = (Physical memory - Free Momory) / Physical Memory
Please friends i would like to know how we can make it script for this..
I will rally very greatful if u help me on this......!
Thanks in advance