The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Mac OS X: Disk Utility - All options dimmed for a disk that was formatted as NTFS in iBot OS X Support RSS 0 10-13-2008 10:20 PM
Which Process is writing this Log file!! Mohammed Shell Programming and Scripting 2 11-06-2006 08:08 AM
disk i/o per process on aix 5.2 system-admin AIX 1 07-23-2006 09:13 AM
disk i/o per process aqeelcu@hotmail UNIX for Advanced & Expert Users 1 07-06-2006 10:34 AM
Writing file to disk takes time nileshkarania UNIX for Dummies Questions & Answers 7 06-16-2003 08:51 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-29-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
Question What process is writing to disk?

What program can I use to determine what process is writing to disk?

I've got a Linux server and iostat reports something is writing to the system drive:
Code:
Device:         rrqm/s   wrqm/s   r/s   w/s   rsec/s   wsec/s avgrq-sz avgqu-sz    await  svctm  %util
sda               0.00   169.83  1.75 273.82   141.65  3465.34    13.09    69.29  263.50   2.23  61.42
sda               0.00   252.50  0.00 228.25     0.00   3526.00    15.45    53.86  204.70   2.50  56.95
Unfortunately lsof gives me no serious clue:
Code:
lsof +d / | awk '$4 ~ /[0-9].*[uw]/' # search for all files noted to be open for writing/updating.
The result is : ssh-agent, samba (/etc/samba/secrets.tdb - 8k file) and another log file in /tmp which is clearly idle.

Oh, and swap is empty.

Last edited by otheus; 10-29-2008 at 05:35 AM.. Reason: it's not swap
  #2 (permalink)  
Old 10-29-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,848
I suppose that high IO activity means high system call rate and, dipending on IO subsystem, high IO waits. Did you try to run lsof passing the pids of the top top processes ?
I believe fuser could give some clue too.
  #3 (permalink)  
Old 10-29-2008
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
Try all these commands,
lsof
top
fuser

- nilesh
  #4 (permalink)  
Old 10-29-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
Thanks, radoulov, but I don't see a way for top to display "high system call rate" or "high I/O rates" anything like that.

fuser is helping, to some extent, but I have no idea how to parse the ACCESS field when using -v. That might give me some clue. Is there any way to see writes-per-second on a per process basis?
  #5 (permalink)  
Old 10-29-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,848
Quote:
Originally Posted by otheus View Post
Thanks, radoulov, but I don't see a way for top to display "high system call rate" or "high I/O rates" anything like that.
[...]
Sorry for not being clear, I meant high CPU usage (due to the high system call rate).

You may try iostat -d -p to see I/O activity by partition and thus restrict the possibilities.

Quote:
Is there any way to see writes-per-second on a per process basis?
Well,
the first think that I would begin with starcing the top CPU consumers to see where the CPU cycles go.

Last edited by radoulov; 10-29-2008 at 04:22 PM..
  #6 (permalink)  
Old 10-29-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,571
what does vmtstat 1 5 give you?
  #7 (permalink)  
Old 10-29-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
Code:
$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  2    136 850584 148660 2616060    0    0   183   143    3    4  9  2 71 17  0
 0  4    136 854368 148816 2616112    0    0   192  2396 2401 1259  0  2 40 58  0
 0  2    136 854740 148876 2616876    0    0     0   736 2056 2842  4  1 50 46  0
 0  3    136 1733284 148944 1738972    0    0   140  1756 2152 3567  0  6 49 45  0
 0  3    136 1717312 149052 1755468    0    0  8244   740 2188 3970  0  2 44 54  0
Closed Thread

Bookmarks

Tags
disk i/o, linux, performance

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0