Re: nagios vs w/uptime
On Tue, Feb 10, 2015 at 10:24:59PM +0100, Michael Gmelin wrote: > > On 10 Feb 2015, at 22:17, Michael Gmelin wrote: > > > > 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). > % man xo_finish ... Calling this function is vital to the proper operation of libxo, especially for the non-TEXT output styles. ... Note, the word "vital" is underlined in xterm for emphasis. PS: To whomever is responsible for libxo, some (most?) libxo manpages have the wrong NAME information. For example, % man xo_finish LIBXO(3) FreeBSD Library Functions Manual LIBXO(3) NAME xo_emit - emit formatted output based on format string and arguments % man xo_attr LIBXO(3) FreeBSD Library Functions Manual LIBXO(3) NAME xo_emit - emit formatted output based on format string and arguments % man xo_create LIBXO(3) FreeBSD Library Functions Manual LIBXO(3) NAME xo_emit - emit formatted output based on format string and arguments -- Steve ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
On Tue, 2015-02-10 at 22:55 +, Brooks Davis wrote: > 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 wrote: > > > > > > > > > > > > > > > > > > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: > > > >> > > > >> [Moving to current@] > > > >> > > > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm wrote: > > > >>> > > > >>> Surprises: > > > >>> * nagios doesn't like w / uptime anymore. libxo perhaps? > > > >> [...] > > > > > > 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. > I assume there is some sort of xo_start() call if there's an xo_finish(), so the library could do that for itself? -- Ian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
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 wrote: > > > > > > > > > > > > > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: > > >> > > >> [Moving to current@] > > >> > > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm 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 pgpX0Tdut1MhO.pgp Description: PGP signature
Re: nagios vs w/uptime
> > 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. Well, so long as the app doesn't crash in a way that would bypass it shouldn't registering that with atexit() flush any pending output? -K ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
On Tue, 10 Feb 2015 22:24:59 +0100 Michael Gmelin wrote: > > > > > On 10 Feb 2015, at 22:17, Michael Gmelin wrote: > > > > > > > > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar > >> wrote: > >> > >> [Moving to current@] > >> > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm 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 opened a code review request: https://reviews.freebsd.org/D1821 -- Michael Gmelin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
On Tue, 2015-02-10 at 22:24 +0100, Michael Gmelin wrote: > > > > On 10 Feb 2015, at 22:17, Michael Gmelin wrote: > > > > > > > > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: > >> > >> [Moving to current@] > >> > >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm 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. -- Ian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
> On 10 Feb 2015, at 22:17, Michael Gmelin wrote: > > > > >> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: >> >> [Moving to current@] >> >>> On Feb 10, 2015, at 11:52 AM, Peter Wemm 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). > > >> -- >> Marcel Moolenaar >> mar...@xcllnt.net > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: nagios vs w/uptime
> On 10 Feb 2015, at 21:13, Marcel Moolenaar wrote: > > [Moving to current@] > >> On Feb 10, 2015, at 11:52 AM, Peter Wemm 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... > -- > Marcel Moolenaar > mar...@xcllnt.net > ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"