Re: Notofication message truncated

Karl DeBisschop <[email protected]>
Newsgroups gmane.network.netsaint.user
Message-ID <[email protected]>
On Thu, 2002-08-22 at 08:50, [email protected] wrote:
> I'm experiencing a problem on email and pager messages that contain disk
> space information.  It seems that the messages are being truncated at
> the '%' in the message. Here is an example:
> 
> ***** NetSaint *****
> 
> Notification Type: PROBLEM
> 
> Service: /app Free Space
> Host: kcfinp04b
> Address: 10.79.2.107
> State: CRITICAL
> 
> Date/Time: Thu Aug 22 07:45:01 CDT 2002
> 
> Additional Info:
> 
> DISK CRITICAL - [5098348 kB (69
> 
> 
> The message should read:
> 
> DISK CRITICAL - [5098348 kB (69%) free on /dev/rd/c0d1p6]
> 
> 
> 
> 
> 
> Is this a problem with printf?

It's a problem with the way some of the mail commands have been written
(I am to blame for some, too).

When the message contains '%', tha is seen as a formattinc ccommand.

so you can't do:

printf '$HOSTNAME$ $OUTPUT$'

instead, you must do:

printf "%s %s\n", $HOSTNAME$, '$OUTPUT$'

make sense?

> 
> 
> 
> 
> 
> Stanley G. Martin
> Sprint - ISS Enterprise App/Decision Support Services 
> [email protected]
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> Netsaint-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/netsaint-users




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.