HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tracking disk IO by PID or user
Operating System - HP-UX
1833323
Members
3198
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2000 09:42 AM
06-12-2000 09:42 AM
Having used sar to track disk IO, I'm now trying to find out who/what processes are causing it. I know that glance has a real time "most active process" line, but I'm looking for something I can dump into a file so I can play with it a bit. Does anyone know of a command that will give me IO by process or even the top ~10 processes (IO wise)?
Thanks
Steve
Thanks
Steve
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2000 06:17 PM
06-12-2000 06:17 PM
Re: Tracking disk IO by PID or user
It can be a bit messy but you can start of by doing something like this
fuser /dev/vg00/lvol1
this gives you all the pid's on that lv you can use this to check the IO utilisation of each proccess and then use perl or something to do a bit of math..
fuser /dev/vg00/lvol1
this gives you all the pid's on that lv you can use this to check the IO utilisation of each proccess and then use perl or something to do a bit of math..
Minimum effort maximum output!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2000 12:40 AM
06-13-2000 12:40 AM
Re: Tracking disk IO by PID or user
Measureware can do that. It's runs all the time (uses the midaemon glance uses) and captures the data for later analyses.
It's a purchasable product however.
The only other way, is to write your own code using pstat() calls.
It's a purchasable product however.
The only other way, is to write your own code using pstat() calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2000 05:07 PM
06-13-2000 05:07 PM
Solution
If you want to use glance, you could use it in adviser mode. For example, create a file /tmp/proc.adviser containing:
PhysIoThreshold=0
FirstTime=FirstTime
if FirstTime == 0 then
{
print " "
FirstTime=1
print " Phys"
print " Proc Proc IO"
print " Date Time Interval Name ID Rate"
print "------------------------------------------------------------"
}
process loop
{
if (PROC_DISK_PHYS_IO_RATE > PhysIoThreshold) then
{
print GBL_STATDATE," ",GBL_STATTIME," ",GBL_INTERVAL," ", PROC_PROC_NAME," ", PROC_PROC_ID," ",PROC_DISK_PHYS_IO_RATE
}
}
(note that last print statement is all one long line)
Then run glance like:
/opt/perf/bin/glance -adviser_only -syntax /tmp/proc.adviser -j 30 -iterations 10 > /tmp/proc.out
If your glance thresholds are set correctly, you should see something like the following in the proc.out file:
Phys
Proc Proc IO
Date Time Interval Name ID Rate
------------------------------------------------------------
06/13/00 21:02:35 5.0 glance 8159 0.2
06/13/00 21:02:50 5.0 vx_iflush_thread 28 0.2
06/13/00 21:02:50 5.0 glance 8159 0.2
06/13/00 21:02:55 5.0 vx_delxwri_threa 31 0.2
06/13/00 21:02:55 5.0 rpcd 833 0.2
06/13/00 21:02:55 5.0 vi 7948 1.0
(my system is pretty idle and I used a shorter interval and a 0 threshold so I could get some data).
You can set the threshold variable to cut down on the data if you like and you can
add more PROC_DISK_* metrics to the print statement depending on what you are trying to capture... see the /opt/perf/paperdocs/gp/C/metrics.pdf file for metric info and the adviser.pdf file for info on using adviser mode. Also note that the first interval is usually a short one while glance is initializing. I usually ignore the first interval and wait for one with something closer to the requested interval.
PhysIoThreshold=0
FirstTime=FirstTime
if FirstTime == 0 then
{
print " "
FirstTime=1
print " Phys"
print " Proc Proc IO"
print " Date Time Interval Name ID Rate"
print "------------------------------------------------------------"
}
process loop
{
if (PROC_DISK_PHYS_IO_RATE > PhysIoThreshold) then
{
print GBL_STATDATE," ",GBL_STATTIME," ",GBL_INTERVAL," ", PROC_PROC_NAME," ", PROC_PROC_ID," ",PROC_DISK_PHYS_IO_RATE
}
}
(note that last print statement is all one long line)
Then run glance like:
/opt/perf/bin/glance -adviser_only -syntax /tmp/proc.adviser -j 30 -iterations 10 > /tmp/proc.out
If your glance thresholds are set correctly, you should see something like the following in the proc.out file:
Phys
Proc Proc IO
Date Time Interval Name ID Rate
------------------------------------------------------------
06/13/00 21:02:35 5.0 glance 8159 0.2
06/13/00 21:02:50 5.0 vx_iflush_thread 28 0.2
06/13/00 21:02:50 5.0 glance 8159 0.2
06/13/00 21:02:55 5.0 vx_delxwri_threa 31 0.2
06/13/00 21:02:55 5.0 rpcd 833 0.2
06/13/00 21:02:55 5.0 vi 7948 1.0
(my system is pretty idle and I used a shorter interval and a 0 threshold so I could get some data).
You can set the threshold variable to cut down on the data if you like and you can
add more PROC_DISK_* metrics to the print statement depending on what you are trying to capture... see the /opt/perf/paperdocs/gp/C/metrics.pdf file for metric info and the adviser.pdf file for info on using adviser mode. Also note that the first interval is usually a short one while glance is initializing. I usually ignore the first interval and wait for one with something closer to the requested interval.
Any sufficiently advanced technology is indistinguishable from Magic - Arthur C. Clarke
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP