Please. Check Script Keep Stat CPU.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please. Check Script Keep Stat CPU.
# 1  
Old 03-03-2011
Please. Check Script Keep Stat CPU.

Smilie My Script. Smilie.

I. want monitor cpu every 10 minute.

This my Script.
Code:
while true; do date ; top >> cpu.csv ; sleep 600; echo " "; echo " "; echo " ";  done

You think it Work?
if not work. please suggest.


Thank you Smilie
# 2  
Old 03-03-2011
There is much variation in the "top" command.
What Operating System and version do you have?
What Shell do you use?
Any reason for trying to get the command sequence onto one line?
Do you have the unix "sar" or "vmstat" programs installed? They are much easier to work with in Shell.


If you want to keep historic records, a correctly installed "sadc" running from cron is the usual solution.

Last edited by methyl; 03-03-2011 at 10:45 AM..
# 3  
Old 03-03-2011
Operating System = SunOS

Ex.
load averages: 12.8, 9.32, 9.45; up 69+21:04:34 21:43:27
200 processes: 186 sleeping, 7 running, 7 on cpu
CPU states: 0.0% idle, 82.1% user, 17.9% kernel, 0.0% iowait, 0.0% swap
Memory: 28G phys mem, 9822M free mem, 16G swap, 16G free swap
# 4  
Old 03-03-2011
There are more versions of SunOS than I can name.
After blotting anything confidential, what is the output from:
Code:
uname -a

The title of you post is "Check Script Keep Stat CPU". What precise statistics are you trying to keep, and what will you be doing next with those statistics?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

On Solaris, without stat, how to check how old a file is?

Hi, How do I check how old a file is? That is, is it 1 day old, 1 year old, generated x hours ago? Currently, I receive a supposed to be daily report and in the last few times, it has not been recent, that is instead of the one generated for the day, it is one that was created yesterday or... (3 Replies)
Discussion started by: newbie_01
3 Replies

2. Shell Programming and Scripting

script to check high cpu utilization for java process

Hello Team, I need help in preparing script to check for high cpu utilisation for java process. I have many java process on my system which consumes high cpu so i have to monitor it using script. ---------- Post updated 12-10-10 at 02:21 AM ---------- Previous update was 12-09-10 at... (1 Reply)
Discussion started by: coolguyamy
1 Replies

3. Solaris

How to check CPU spike between certain priod of time

Hi, Does anyone know how to check which process has been used the most CPU between certain time period? say I have noticed CPU spike happend between 1:00 to 1:30 now it is 3:00 o'clock already. Is there anyway to find out what process/PID use the most CPU then? Thanks a lot (3 Replies)
Discussion started by: uuontario
3 Replies

4. Shell Programming and Scripting

Check for the Processes in Unix and also CPU utilization

What is the command for checking all the processes running on UNIX. Alos can any one share the CPU utilization script to know what are all the processes running and what is the cpu utilization ... thanks in advance Perla Mohan (3 Replies)
Discussion started by: perlamohan
3 Replies

5. 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

6. Shell Programming and Scripting

check cpu usage

Hi, Are there previous threads on perl scripts that check the cpu usage and send email whenever this exceeded a certain threshold? Thanks. (3 Replies)
Discussion started by: gholdbhurg
3 Replies

7. SCO

How to check CPU Utilization

Hi All, I want to check the CPU Utilization for my SCO UNIX machine. Please suggest some commands to do that. Thanks, Am (2 Replies)
Discussion started by: am_yadav
2 Replies

8. Shell Programming and Scripting

how to check CPU consume time by unix script.

Hi, I searched for any answers to this query bu in vain. My question is , Is their any script or command to check how much CPU time is been taken by a script. thanks. (1 Reply)
Discussion started by: Rakesh Bhat
1 Replies

9. UNIX for Dummies Questions & Answers

command for check CPU

Can someone tell me which command I should use to get the detail CPU info in one HP unix box, asuch as # of CPU, CPU Speed and CPU HW Support Thanks (2 Replies)
Discussion started by: abcde
2 Replies
Login or Register to Ask a Question