LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2009, 06:00 PM   #1
Uday123
Member
 
Registered: Nov 2005
Posts: 80

Rep: Reputation: 15
ps command


ps command gives the cputime for a process.

Is there a way to find the time spent by a process in IO?
and also time spent on network (process level)?

Thanks in advance.
 
Old 09-10-2009, 10:31 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
You can break up a process CPU time into user time and system time by looking at the /proc/PID/stat file. The 14th and 15th fields are the user time and kernel time in jiffies (typically 1/100th or 1/250th of a second, depending on your kernel).

For finer grained monitoring of system access, you can use /usr/bin/time -v application to give detail, or strace -c application to monitor all the system calls.

Last edited by neonsignal; 09-10-2009 at 10:43 PM.
 
Old 09-11-2009, 04:24 AM   #3
Uday123
Member
 
Registered: Nov 2005
Posts: 80

Original Poster
Rep: Reputation: 15
Thanks my friend. That is a good info to start.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Only execute 2nd command on successufl execution of 1st command kregec05 Linux - Newbie 3 08-19-2009 10:29 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
busybox command works, same command within script says permission denied jeroenv Linux - Newbie 2 01-17-2009 02:58 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
Turning a Ruby on Rails Ubuntu command into a Redhat command Mangalaiii Red Hat 1 12-02-2008 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration