[NBLUG/talk] Which process is accessing my disk?

ME dugan at passwall.com
Sun Jul 13 23:59:01 PDT 2003


If you are looking for number of open files, then lsof can get you this,
and with some scripting, you could easily create summary pages with totals
(assuming flags from lsof would not.)

If you are just trying to find processes that are busily opening up files
in a serialized fashion (and they run often) you can build a script with
lsof that compares diffs between tim intervals. (This is not elegant, but
it is a "way". Of course, this is not even close to "real time".)

There is a tool call "sar" which has many options and stats - might be of
use, but I have not used it. This can be useful when looking at the data
being passed (speed) and excess queing of data. If this helps, please let
us know how well or how poorly.

What about process accounting? Sure, there are limits to what kinds of
processes that can provide data and what data is probvided, but that may
be what you were after if caused by a user in a shell.

Looking at file activity is a difficult problem without more specifics.
file access could be effective throughput of data to files and storage, or
activity on disk WRT excess seeks with fragmented filesystems andor many
opens of files with little access and then closure.

As stated, top is useful for looking at active processes. Though it is not
as effective against processes that hide their true nature, it can help to
find processes that might be good to examine based on reported activity.

I would expect this to be a common enough problem for utils and stats apps
to exist for this.

When you find better solutions, could you followup this thread with a
reply? Others may have your same question.

Enjoy,
-ME


Micxz (lovedialup.com) said:
>
> I think I misunderstood what you were asking. Anyone else? - Micxz
>
> error wrote:
>>
>> So where is that?
>>
>> top - 20:54:23 up 17 days, 23:12,  6 users,  load average: 0.06, 0.12,
>> 0.38
>> Tasks:  78 total,   1 running,  77 sleeping,    stopped,    zombie
>> Cpu(s):   4.6% user,   2.8% system,   0.0% nice,  92.6% idle
>> Mem:    256572k total,   241820k used,    14752k free,    12020k buffers
>> Swap:   498004k total,   117468k used,   380536k free,    83872k cached
>>
>>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
>> Command
>> 21392 error     11    12488  10m 7256 S  2.8  4.4   4:35.05 gaim
>>
>> That looks to me like the PID, the user, the priority, how nice the PID
>> s, the virtual memory, the resident memory, the shared memory, it's
>> state, cpu %, memory %, running time and then the PIDs name.
>>
>> Where in that list is similar info about disk IO?
>> I don't see how many pages a given process is writing to disk with the
>> exception of SWAP.
>>
>> I could be wrong but you either misunderstood what I was asking for or
>> you are wrong.
>>
>> e.
>>
>> On Sun, 2003-07-13 at 21:02, Micxz (lovedialup.com) wrote:
>> > top
>> >
>> > - Micxz
>> >
>> > error wrote:
>> > >
>> > > If my hard drive is going crazy with disk IO, how can I find which
>> PID
>> > > is causing this?
>> > >
>> > > --
>> > > error <error at sonic.net>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>
>




More information about the talk mailing list