garbage characters being returned in scripts

Jonathan Angliss jon at netdork.net
Sat Jul 23 15:48:55 CEST 2011


On 07/20/11 18:05, Rick Garland wrote:
> Hi all:
>
> Got a Nagios 3.2.3 server running on RHEL 5.5.
>
> Installed plugins include pnp4nagios 0.6.13 & rrdtools 1.4.5
>
> I made some custom scripts that include the use of sar. A snippet;
>
> WAITIO=`sar -u 1 3 | grep Average | awk '{print $4}'`
>
> CRIT=50
>
> echo "%waitio = $WAITIO | /=$WAITIO%;;$CRIT;0;100\r"
>
> exit 0

This may be a silly question, and completely unrelated, but is there any 
reason you're using \r instead of \n?  Is there any reason you're 
putting a carriage return? in here at all?

-- 
Jonathan Angliss


------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list