how to check CPU consume time by unix script.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to check CPU consume time by unix script.
# 1  
Old 04-05-2006
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.
# 2  
Old 04-05-2006
using the command 'time' followed by the script will give you an output. In ksh it's a builtin, which means that it's more accurate and suffers from less overhead. There's also a binary standalong 'time' command which is found in /usr/bin/time on AIX systems, this can be used if called explicitly but the builtin is used in preference. See the man pages for 'time' and 'ksh's manpage and website for further details. You may want to read up a little on performance monitoring, cpu time and similar concepts in order to accurately interpret the information.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with speeding up my working script to take less time - how to use more CPU usage for a script

Hello experts, we have input files with 700K lines each (one generated for every hour). and we need to convert them as below and move them to another directory once. Sample INPUT:- # cat test1 1559205600000,8474,NormalizedPortInfo,PctDiscards,0.0,Interface,BG-CTA-AX1.test.com,Vl111... (7 Replies)
Discussion started by: prvnrk
7 Replies

2. AIX

Process lose its parent then consume high CPU usage ...

Hello. In an informix context, on AIX 5.3 TL 12, we encounter this problem : Sometimes in the day (probably when users exits from their session), a child process lose its parent (PPID is now "1") and this child is consumming lot of CPU "USER". I tried, on different cases, "truss -p... (4 Replies)
Discussion started by: stephnane
4 Replies

3. Red Hat

Gpk-update-icon consume more CPU

Dear all, I have installed OEL Oracle Linux 6.4 on my server , when I type " Top " command to see the CPU utilization , the output shows a root user executed "gpk-update-icon" which consume upto 98% , So needs your feedback with solution. If I kill this process it will effect ?? ... (1 Reply)
Discussion started by: mody82
1 Replies

4. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

5. Shell Programming and Scripting

Please. Check Script Keep Stat CPU.

:wall: My Script. :D. I. want monitor cpu every 10 minute. This my Script. while true; do date ; top >> cpu.csv ; sleep 600; echo " "; echo " "; echo " "; doneYou think it Work? if not work. please suggest. Thank you :o (3 Replies)
Discussion started by: ooilinlove
3 Replies

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

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

8. UNIX for Advanced & Expert Users

how to know which process consume CPU time more

Hi, I have problem like everyday i have to check which process consuming more cpu time. I have done it manually using top command.. Is there any script which will tell the exact process name which will consuming more time. I am using hpux. (1 Reply)
Discussion started by: rajesh08
1 Replies

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

10. UNIX for Dummies Questions & Answers

How to check process/cpu utilisation thru unix shell scripting

Dear Champs, Can anybody help me out to write a shell script , which will check whether the process is running , if running then divide the process into 2 so that next var it can take process parallel . Let ps -ef | grep a.sh => shows running note a.sh will take a process of next... (0 Replies)
Discussion started by: manas_ranjan
0 Replies
Login or Register to Ask a Question