Operating System - Linux
1753805 Members
7395 Online
108805 Solutions
New Discussion юеВ

Re: Getting logical volumes i/o stats programatically

 
uiqbal
Advisor

Getting logical volumes i/o stats programatically

Hi,

I am working on hp pa-risc system and i need the following information:

1. How to get information for logical volume i/o stats? the blocks/pages/bytes read or written to them i.e the amount of i/o done.

2. Also how can i know that a logical volume belongs to a certain physical disk through api?

Just like in solaris i have the information like this

In solaris
sd0 - disk
sd0,a - Partition
sd0,b - partition
sd31 - disk
sd31,a - partition

Can i get it this way in hp ux as well?

Regards,
rui
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Getting logical volumes i/o stats programatically

Hi:

Have a look at 'pstat()':

http://www.docs.hp.com/en/B2355-60130/pstat.2.html

Regards!

...JRF...
TTr
Honored Contributor

Re: Getting logical volumes i/o stats programatically

1. glance (optional sw), sar and iostat are tools that can give you i/o metrics.

2. There are no hard partitions in HP-UX. They made a comeback in 11.31 but that's only to accomodate the EFI multi OS booting. HP-UX uses LVM as the disk management system. To find out which hard disk each volume resides, use the "lvdisplay -v " command. It will show which physical disk the logical volume is on. This "residing" is done using extends.
Ralph Grothe
Honored Contributor

Re: Getting logical volumes i/o stats programatically

If your HP-UX/LVM volumes contain VxFS filesystems then you could use the vxstat command to retrieve some stats about reads, writes etc.
See man vxstat.
To just see the physical layout (e.g. disks aka PVs involved, spread of PEs, allocation etc.) you can use the regular LVM commands like vgdisplay, pvdisplay, lvdisplay.
All understand the verbose switch -v to see lots of detail.
Please, look at the respective manpages for explanations of output etc.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Getting logical volumes i/o stats programatically

Sorry, first part of my reply was wrong
since vxstat only applies to VxVM managed disks instead of LVM.
Madness, thy name is system administration