Operating System - HP-UX
1748157 Members
4115 Online
108758 Solutions
New Discussion

Re: The "hysteretic" output of the sar with some special parameter !

 
liuyl_it
Frequent Advisor

The "hysteretic" output of the sar with some special parameter !

I find that the outputs of the sar with some special parameter,  such as -H and -L,  would be "hysteretic" until the total counts finished !
So I wonder why this type of output method would be taken, versus with other parameters would normally output in every interval?

#
#
# sar -L 1 5|grep disk0
22:31:39 disk0_lunpath0 0.00 0.50 0 1 2 0.00 2.72
22:31:40 disk0_lunpath0 1.00 0.50 0 1 16 0.00 5.22
22:31:41 disk0_lunpath0 0.00 0.50 0 1 8 0.00 6.33
22:31:42 disk0_lunpath0 1.00 0.50 0 1 16 0.00 3.80
Average disk0_lunpath0 0.40 0.50 0 1 8 0.00 4.52
#
#

7 REPLIES 7
PSPrakash
HPE Pro

Re: The "hysteretic" output of the sar with some special parameter !

Hello 

I dont see anything abnormal on the outputs you have shared.
As per man page  -L will provide report activity for each "active lunpath". One line is printed for each lunpath that had activity during the last interval. If no lunpath were active, a blank line isprinted.

Could you please more specific on your query . here is an example from my system.

# sar -L 1 5|grep disk1
13:32:29 disk1_lunpath0 2.00 0.50 0 2 32 0.00 11.29
13:32:30 disk1_lunpath0 1.00 0.50 0 1 2 0.00 12.86
13:32:31 disk1_lunpath0 3.00 0.50 0 3 40 0.00 9.83
Average disk1_lunpath0 1.20 0.50 0 1 15 0.00 10.82


I am an HPE employee

Accept or Kudo

liuyl_it
Frequent Advisor

Re: The "hysteretic" output of the sar with some special parameter !

Thanks, but it seems that you would not understand what I mean:
The outputs of the sar with some special parameters, such as -H and -L, would be "hysteretic" until all the counts finished !
In other words, the outputs with these parameters could not be displayed on the screen in real time!

Bill Hassell
Honored Contributor

Re: The "hysteretic" output of the sar with some special parameter !

If you mean that the output from your command line is intermittant, that is exactly normal:

# sar -L 1 5|grep disk0

The sar command is sending data all the time (once per interval), but you have added grep to remove anything that doesn't have disk0 in the output. So there are likely some intervals where disk0 was not active, ths no output per your grep filter,



Bill Hassell, sysadmin
PSPrakash
HPE Pro

Re: The "hysteretic" output of the sar with some special parameter !

Hello

As Bill Hassel mentioned, you are not viweing the real-time information because you have used  "grep" to filter specific disk.

If you dont use "grep" , you can see the realtime data.


I am an HPE employee

Accept or Kudo

liuyl_it
Frequent Advisor

Re: The "hysteretic" output of the sar with some special parameter !

Thanks!  This should be my negligent mistake!
The correct description for this question is the following contents :
Why the outputs of the sar with the grep pipeline would be "hysteretic" until the total counts finished,   versus the iostat would always output in every interval even with the same grep pipeline!

Bill Hassell
Honored Contributor

Re: The "hysteretic" output of the sar with some special parameter !

OK. I see the behavior you are describing (no output from grep until sar is finished)
And it appears to be a feature of sar as implemented on HP-UX.
I tested all the way back to HP-UX 11.00, and it appears that the stream from sar is filled but not released until end of job.
sar is an ancient tool and may have some strange last century code inside.



Bill Hassell, sysadmin
liuyl_it
Frequent Advisor

Re: The "hysteretic" output of the sar with some special parameter !

I feel that the "problem" would never been improved since it has still been the internal core mechanism for the sar!
Because the iostat is also a very long-standing historical performance tool,  but it can do output in every interval!