Operating System - Linux
1828225 Members
2524 Online
109975 Solutions
New Discussion

Re: linux functional equivalent of pstat

 
anat heilper
Frequent Advisor

linux functional equivalent of pstat

Hi,
I'm transferring application from HP to Linux, and I want to use something similar to pstat_getlv that I used in hpux.
Is there an equivelent for that?
Thanks,
Anat
1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: linux functional equivalent of pstat

In HP-UX, pstat_getlv() system call is used to get I/O statistics on LVM logical volumes.

In Linux, similar information is available through /proc/diskstats and /sys/block//stat. A small wrinkle though: in both these sources, the LV is not identified by name, but instead using a generic dm-N style name, in which N is the minor device number of the associated LV.

Both the /proc and /sys filesystems contain "virtual" files, whose content is auto-generated from the kernel data structures at the time someone reads the files.

The documentation of the format of the above-mentioned files is in the Linux kernel source tree, in file linux-/Documentation/iostats.txt.

Here's a link to kernel 2.6.23 version of the iostats.txt file:
http://www.mjmwired.net/kernel/Documentation/iostats.txt

MK
MK