Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk Usage

Status
Not open for further replies.

kenred

Technical User
Aug 16, 2001
58
GB
After reading the man pages for ps I now feel that my heads on backwards.

Am i right in thinking that if I do ps -ef, the fourth column C is the % of the particular process that is using the Hard Disk rather than memory.

If so is it possible to see what % of the Hard disk is being used by a particular process.

Thanks in advance for any help
 
I think you're confusing memory use and hard disk use. The C column in ps is basically the amount of cpu time the process is using. It's feasible that a process will be using hard disk space too, but probably only if paging in and out of memory. Otherwise 'processes' don't normally use hard disk space (ie the actual physical disk). If you're after the amount of space a particular file takes up, just do an ls -la <filename> in the directory in which it resides and read the 5th column for it's size in byes (I assume you know this already?).

Hope this helps.
 
KenCunningham

Thanks for the swift reply.

maybe i'm using the wrong job to find an answer, sometimes during the day the our system will slow down, if I do sar -d it will tell me that the disks are 100% busy.

What I was trying to do was find out what was making the disks busy, dont know if this is even possible as i am relatively new to this.

Do you have any ideas how to do this, or even if it is possible.

Thanks
Ken
 
Depending on the flavour of unix you're using you may have a program called top available to assist.

If you run that, it will show you the top ten processes using the CPU in descending order. That should then give you an idea of what (or who!) is causing the problem. If you don't have top (it doesn't come as standard with Solaris for example, but it is available from you can do a ps -ef | pg and scroll down the processes looking for anything with a unusually large value in the TIME column.

Hope this helps - post again if you think I/we can help further.
 
Once again thanks for the speedy response.

We don have top on our system, but next time it slows i'll look for the TIME value, thanks very much for the help it will give me something to go on.
 
Ken, no problem. For disks you might also want to try iostat -d (assuming you have iostat, that is!).

Have a look at the man page for iostat for more info about the output displayed. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top