Filesystem IO Monitoring with HP-UX Glance
By Martin | August 25th, 2008 | Category: HP-UX, Unix | 1 Comment »On HP-UX, you can use glance to collect a huge range of OS Statistics and write them in a defined time interval into a file for later analysis. A collection of available metrics is available on the system in /opt/perf/paperdocs/gp/C/metrics.txt or /opt/perf/paperdocs/gp/C/metrics.pdf.
This is an example of IO Monitoring for Filesytems:
glance_filesystem.sh:
nohup glance -aos ./filesystem_advisor.conf -j 60 > glance_output_filesystem_$$.txt 2>/dev/null &
filesystem_advisor.conf:
headersprinted=headersprinted
if headersprinted != 1 then {
print "DATE TIME FILESYSTEM FIR LIR LRBR LRR LWBR LWR PIR PRBR PRR PWBR PWR"
headersprinted = 1
}
filesystem loop
{
print GBL_STATDATE|12," ",
GBL_STATTIME|9," ",
FS_DIRNAME|24,
FS_FILE_IO_RATE|8,
FS_LOGL_IO_RATE|8,
FS_LOGL_READ_BYTE_RATE|9,
FS_LOGL_READ_RATE|8,
FS_LOGL_WRITE_BYTE_RATE|9,
FS_LOGL_WRITE_RATE|8,
FS_PHYS_IO_RATE|8,
FS_PHYS_READ_BYTE_RATE|9,
FS_PHYS_READ_RATE|8,
FS_PHYS_WRITE_BYTE_RATE|9,
FS_PHYS_WRITE_RATE|8
}
Used Metrics:
FS_FILE_IO_RATE (FIR)
The number of file system related physical IOs per second directed to this file system during the interval. This value is similar to the values returned by the vmstat -d command except that vmstat reports all IOs and does not break them out by file system. Also, vmstat reports IOs from the kernel’s view, which may get broken down by the disk driver into multiple physical IOs. Since this metric reports values from the disk driver’s point of view, it is more accurate than vmstat.
FS_LOGL_IO_RATE (LIR)
The number of logical IOs per second directed to this file system during the interval. Logical IOs are generated by calling the read() or write() system calls.
FS_LOGL_READ_BYTE_RATE (LRBR)
The number of logical read KBs per second from this file system during the interval.
FS_LOGL_READ_RATE (LRR)
The number of logical reads per second directed to this file system during the interval. Logical reads are generated by calling the read() system call.
FS_LOGL_WRITE_BYTE_RATE (LWBR)
The number of logical writes KBs per second to this file system during the interval.
FS_LOGL_WRITE_RATE (LWR)
The number of logical writes per second directed to this file system during the interval. Logical writes are generated by calling the write() system call.
FS_PHYS_IO_RATE (PIR)
The number of physical IOs per second directed to this file system during the interval.
FS_PHYS_READ_BYTE_RATE (PRBR)
The number of physical KBs per second read from this file system during the interval.
FS_PHYS_READ_RATE (PRR)
The number of physical reads per second directed to this file system during the interval. On Unix systems, physical reads are generated by user file access, virtual memory access (paging), file system management, or raw device access.
FS_PHYS_WRITE_BYTE_RATE (PWBR)
The number of physical KBs per second written to this file system during the interval.
FS_PHYS_WRITE_RATE (PWR)
The number of physical writes per second directed to this file system during the interval.