LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-13-2006, 04:55 AM   #1
kornelix
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Ubuntu
Posts: 58

Rep: Reputation: 24
process I/O statistics?


There seems to be no way to get per process I/O statistics (counts, bytes) (disk, network) in Linux.

True?

I see only some aggregate statistics in /proc/diskstats.
 
Old 07-13-2006, 03:27 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I am not sure if it contains the info you are looking for but there is a great deal of per process info under /proc/<pid number>/.
 
Old 07-13-2006, 06:32 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Do you have the GNU accounting utilities installed? Have a look for the commands ac, sa, lastcomm and accton. If you do have them, you can turn on process accounting by running accton at boot time and logging to /var/log/pacct. For example, to get it running on my setup I did the following (as root):
Code:
touch /var/log/pacct
chown root:root /var/log/pacct
chmod 0644 /var/log/pacct
Then I modified /etc/rc.d/rc.local:
Code:
if [ -x /sbin/accton ]
then 
  /sbin/accton /var/log/pacct 
  echo "Process accounting turned on." 
fi
The utilities allow you to query the stats generated. If you want to look at system based stats there's also the sysstat utilities at http://perso.orange.fr/sebastien.godard/.

Last edited by gilead; 07-13-2006 at 06:33 PM.
 
Old 07-13-2006, 11:55 PM   #4
kornelix
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 24
Thanks for the help. GNU accounting is not installed on my distro (Ubuntu). I will dig into what is necessary to get them.
 
Old 07-14-2006, 02:59 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Always bear in mind that gathering stats that fine-grained creates
overhead, and make sure you strike a balance between cost (in terms
of extra load) and gain. I've seen people (specifically Oracle DBAs)
monitor machines to a near stand-still ;} And no, the Gnu process
accounting isn't quite that bad.



Cheers,
Tink
 
Old 07-14-2006, 04:34 PM   #6
kornelix
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 24
I was looking for something like the perfmon utility in Windows or the old DEC VAX monitor command. These allowed you to tell what processes were causing what loads on the system (CPU, memory, paging, disk IO) in real-time and almost effortlessly. The overheads were trivial.

I see nothing like this in Linux land.
 
Old 07-14-2006, 04:39 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Ah - you're running a GUI on your server then? To each his own - if you're using KDE have a look at KSysGuard, it sounds like what you're talking about.
 
Old 07-15-2006, 12:30 AM   #8
kornelix
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by gilead
Ah - you're running a GUI on your server then? To each his own - if you're using KDE have a look at KSysGuard, it sounds like what you're talking about.
One app running a GUI on a server - GUILTY !
I deserve nothing less than death!

I will have a look at KSysGuard.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
Statistics NightSoul Linux - Newbie 6 06-10-2006 11:32 PM
Like gnuplot but for statistics Cornholio Linux - Software 2 03-03-2005 02:26 AM
counting statistics rafalek Linux - Networking 0 05-21-2004 03:39 PM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:07 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