System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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#

4 REPLIES 4
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
Highlighted
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 !