Operating System - HP-UX
1753776 Members
7142 Online
108799 Solutions
New Discussion

Re: The output behavior for iostat/sar when there is no any devices I/O !

 
liuyl_it
Frequent Advisor

The output behavior for iostat/sar when there is no any devices I/O !

Is there any way to keep up outputting with zero via iostat/sar, even if the lunpaths/devices have no I/O traffic but still online?
Notes: Because the default output behavor for iostat/sar is,  If no lunpaths/devices were active, a blank line is printed.

root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp# sar -d 1 2

HP-UX jcyxfam2 B.11.31 U ia64 01/07/19

14:49:33 device %busy avque r+w/s blks/s avwait avserv
14:49:34 disk1 1.00 0.50 4 64 0.00 1.98
disk2 1.00 0.50 2 40 0.00 2.89
14:49:35

Average disk1 0.50 0.50 2 32 0.00 1.98
Average disk2 0.50 0.50 1 20 0.00 2.89
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp# iostat -L 1 2

lunpath bps sps msps

disk1_lunpath1 37 4.1 1.0
disk137_lunpath307 0 0.0 1.0
disk138_lunpath309 0 0.0 1.0
disk143_lunpath319 0 0.0 1.0
disk152_lunpath340 0 0.0 1.0
disk139_lunpath312 0 0.0 1.0
disk140_lunpath314 0 0.0 1.0
disk141_lunpath315 0 0.0 1.0
disk142_lunpath318 0 0.0 1.0
disk5_lunpath16 273 0.6 1.0
disk6_lunpath18 0 0.0 1.0
disk153_lunpath343 0 0.0 1.0
disk2_lunpath299 27 3.4 1.0
disk137_lunpath308 0 0.0 1.0
disk140_lunpath313 0 0.0 1.0
disk5_lunpath15 53 0.1 1.0
disk6_lunpath19 0 0.0 1.0
disk153_lunpath342 0 0.0 1.0

disk1_lunpath1 6 1.0 1.0

root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#
root@jcyxfam2:/tmp#

5 REPLIES 5
Bill Hassell
Honored Contributor

Re: The output behavior for iostat/sar when there is no any devices I/O !

iostat and sar won't show any text for devices that are not busy. It's primary purpose is to track actual I/O and on very large systems with thousands of disk and tape devices, showing a bunch of zero I/O devices is not useful.

 



Bill Hassell, sysadmin
liuyl_it
Frequent Advisor

Re: The output behavior for iostat/sar when there is no any devices I/O !

I can accept this viewpoint as a whole,  but it also do would become more useful under some specical circumstances!
For example,  we need observe which lunpaths/devices had lost I/Os,  what time they happened and how long they lasted!

Bill Hassell
Honored Contributor

Re: The output behavior for iostat/sar when there is no any devices I/O !

iostat and sar are for running systems. They don't provide any useful information if something fails.
In HP-UX, I/O traffic doesn't just stop. A failure will be logged in dmesg as well as syslog.log. And for connection problems, ioscan will show errors for the link(s) such as NO_HW. 

That's where you need to look for problems.



Bill Hassell, sysadmin
liuyl_it
Frequent Advisor

Re: The output behavior for iostat/sar when there is no any devices I/O !

But I do feel that the iostat/sar are more perceptual intuition in real time rather than either ioscan or syslog.log!
Notes:  such handling mechanism is indeed different from the same iostat/sar on all other UNIX systems !

Rob Urban
Advisor

Re: The output behavior for iostat/sar when there is no any devices I/O !

iostat and sar won't show any text for devices that are not busy. It's primary purpose is to track actual I/O and on very large systems with thousands of disk and tape devices, showing a bunch of zero I/O devices is not useful.

I am amazed at the ignorance of this statement. Zero is also an important value. If it had been up to you, I guess, we would still be using Roman numerals (the Romans had no way to represent zero -- they saw no need for it).

Instead of the user being able to see that the disk or controller is idle, one must compare the output from previous or following samples to figure out what would have been in the space of the blank line(s). This is a particualr pain in the neck when one has asked sar to print all available statisctics ("sar -A"). Why do you think all the other sar implementations show the lines with zeros when the corresponding disk is idle? Only HP came to this pathologic conclusion.

Imagine someone trying to parse the output of sar (a very real scenario, I can assure you). Having blank lines makes the job much harder.

Omitting these lines violates the rule of keeping output consistent and regular. Essentially it is broken.

The developer(s) responsible (and you) clearly never used the tools they created for any serious purpose. HP sar is a toy, not a tool.

Rob Urban