nagios vs w/uptime

Brooks Davis brooks at freebsd.org
Tue Feb 10 22:55:56 UTC 2015


On Tue, Feb 10, 2015 at 02:32:44PM -0700, Ian Lepore wrote:
> On Tue, 2015-02-10 at 22:24 +0100, Michael Gmelin wrote:
> > 
> > 
> > > On 10 Feb 2015, at 22:17, Michael Gmelin <grembo at freebsd.org> wrote:
> > > 
> > > 
> > > 
> > > 
> > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar <marcel at xcllnt.net> wrote:
> > >> 
> > >> [Moving to current@]
> > >> 
> > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm <peter at wemm.org> wrote:
> > >>> 
> > >>> Surprises:
> > >>> * nagios doesn't like w / uptime anymore. libxo perhaps?
> > >> 
> > >> Seems most likely, although I haven?t seen any differences in output
> > >> in my (admittedly limited) testing.
> > >> 
> > >> In what way does Nagios not like w/uptime?
> > >> Any concrete errors, output or misbehavior?
> > >> Ideally: can you reproduce the problem?
> > > 
> > > 
> > > Just compared 10.1 to current, unmodified output looks the same, but pipelines don't work properly:
> > > 
> > > 10.1:
> > > # uptime | wc
> > > 1 12 68
> > > 
> > > Current:
> > > # uptime | wc
> > > 0 0 0
> > > 
> > > # uptime | cat
> > > # uptime
> > > 10:16PM  up 9 mins...
> > > 
> > 
> > Adding xo_finish() to w.c line 268 just right before exit(0); fixes that issue (I don't know libxo well enough to say if this is the proper fix or just a workaround, but it seems logical to me).
> > 
> 
> I wonder if that implies that any non-normal exit from a program that
> has been xo'd will result in the loss of output that would not have been
> lost before the xo changes?  That could lead to all kinds of subtle
> failures of existing scripts and apps.

I suspect that for most programs with more than a few exit points,
adding an atexit() registration to call xo_finish() is going to be a
good odea.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20150210/7975f9cc/attachment.sig>


More information about the freebsd-current mailing list