Identify CPU usage on the Linux server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Identify CPU usage on the Linux server
# 1  
Old 02-10-2012
Identify CPU usage on the Linux server

We are using linux server. We have below script running on the crontab and it send the alert if the cpu usage is above 90%.

My question is, the below script tells the CPU usage for one CPU or all CPU in the server?
Code:
sar 1 1 | sed '$!d' | awk '{printf("%d", $8)}' > $SAR_LOG

Please let me know...

Last edited by Franklin52; 02-11-2012 at 08:56 AM.. Reason: Please use code tags for data and code samples, thank you
# 2  
Old 02-12-2012
You want mpstat if you want to see processor-specific stats.
# 3  
Old 02-13-2012
MySQL

you can use command "top" . it will list all the memory usage
# 4  
Old 02-13-2012
I think, my question is different here...

I would like to know if the below script gives CPU usage for one cpu or all CPU?

Quote:
sar 1 1 | sed '$!d' | awk '{printf("%d", $8)}' > $SAR_LOG
# 5  
Old 02-13-2012
How about you show us the input you have and the output you want. Otherwise, we're just wild-guessing.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Server showing high Sys% CPU usage

Hi Fellas, Not sure how I can dig in even further but we notice that one of our DB servers is showing high Sys% CPU usage even though when I execute the following command : I can see that postgres is the only one using the CPU. So if anyone can advise me what would be the best way to... (3 Replies)
Discussion started by: arizah
3 Replies

2. Shell Programming and Scripting

Script for CPU usage -Linux

Hi all I was wondering if its possible to write a script to keep CPU usage at 90%-95%? for a single cpu linux server? I have a perl script I run on servers with multple cpu's and all I do is max all but one cpu to get into the 90'% utilised area. I now need a script that raises the CPU to... (4 Replies)
Discussion started by: sudobash
4 Replies

3. Solaris

Total CPU usage on a server

hi, i am using solaris server. I want to find the total CPU usage on a server. Top command will give that result, but here that command is not working. So anyone can help me to find the total CPU usage. (2 Replies)
Discussion started by: Arasu123
2 Replies

4. AIX

Identify All Processes memory and cpu usage.

Hi All, Anyone has script to monitor AIX total processes memory and cpu usage that contribute to the total memory and CPU utilize so far ? The purpose of this is to analyze process memory trend. Thanks. Best Regards, ckwan (2 Replies)
Discussion started by: ckwan
2 Replies

5. UNIX for Dummies Questions & Answers

Cpu usage of UNIX server

I want to know the total cpu usage(in %ge)of unix server like windows (NOTE :-not each process cpu usage) Its urgent...plzzzz help me.... (1 Reply)
Discussion started by: rohit kataria
1 Replies

6. AIX

Script to identify high CPU usage processes

Hi Guys, I need to write a script capable of identifying when a high cpu utilitzation process. It sounds simple but we are on a AIX 5.3 environment with Virtual CPU's (VP's) and logical CPU's. Please any ideas or tips would be highly appreciated. Thanks. Harby. (6 Replies)
Discussion started by: arizah
6 Replies

7. Red Hat

How do we extract CPU usage in server?

We are using linux OS. I want to extract the CPU usage on specific time for last one week. The information i need is, date, CPU, %user , %nice , %system , %iowait, %idle Is there anyway, i can pull these info... Any help is highly appreciated. (4 Replies)
Discussion started by: govindts
4 Replies

8. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

9. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

10. UNIX for Dummies Questions & Answers

How check the overall CPU usage of the unix server

Hi All, Can anyone help me.. I want to know the command to check the overall CPU usage of the server. Note: I don't want the CPU usge of each and every process. I just want to know thw aggregate CPU utilization of the server. (2 Replies)
Discussion started by: Selva_Kumar
2 Replies
Login or Register to Ask a Question