[Nagiosplug-devel] BUG: check_proc doeas not work under FreeB SD 4

Voon, Ton Ton.Voon at egg.com
Tue Dec 21 06:39:02 CET 2004


Tomasz,

This looks promising (with the proviso that only the first 16 chars of the
command are kept). Can I have a head -5 of:

ps -axwo 'stat uid ppid vsz rss pcpu ucomm command'

On all the FreeBSD and OpenBSD that you may have.

Ton

-----Original Message-----
From: Tomasz Pilat [mailto:poncki.lists at axelspringer.com.pl] 
Sent: 21 December 2004 11:25
To: NagiosPlug Devel
Subject: Re: [Nagiosplug-devel] BUG: check_proc doeas not work under FreeBSD
4


>> However, you are probably much better than me at understanding 
>> FreeBSD 4 - is there another way to get the columns of information 
>> that check_procs wants?

#  /bin/ps  -axwo  'state  uid  ppid  vsz  rss pcpu ucomm command' can
(almost) do the trick:

S       80 90152 24156 13780  0.0 httpd            /usr/local/sbin/httpd
-DSSL
S       80 90152 23312 12912  0.0 httpd            /usr/local/sbin/httpd
-DSSL
S       80 90152 29452 19196  0.2 httpd            /usr/local/sbin/httpd
-DSSL
Ss       0     1  4104  500  0.0 dccm
/usr/local/dcc/libexec/dccm -l log -t CMN,5, -w whiteclnt -U userdirs
Ss       0     1 15976 3892  0.0 httpd            /usr/local/sbin/httpd
-DSSL
I        0     1   908  308  0.0 courierlogger
/usr/local/sbin/courierlogger -pid=/usr/local/var/authdaemon/pid -start
/usr/local/libexec/courier-imap/authlib/authdaemond.plain
S        0 90193  1096  392  0.0 authdaemond.plai
/usr/local/libexec/courier-imap/authlib/authdaemond.plain

Same output on 4-STABLE nad 5.2.1.

And  i  think  there  is no way to get command-name longer than 16 bytes.
>From src/bin/ps/keyword.c:

        {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16},
        {"ucomm", "UCOMM", NULL, LJUST, ucomm, NULL, MAXCOMLEN},

HTH,

Ponc



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________________
Nagios Plugin Development Mailing List
Nagiosplug-devel at lists.sourceforge.net
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-----------------------------------------
This private and confidential e-mail has been sent to you by Egg.  The Egg
group of companies includes Egg Banking plc registered no. 2999842), Egg
Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd
(registered no. 3403963) which is authorised and regulated by the Financial
Services Authority. Egg Investments Ltd. is entered in the FSA register
under number 190518.     Registered in England and Wales. Registered
offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA.    If you
are not the intended recipient of this e-mail and have received it in
error, please notify the sender by replying with 'received in error' as the
subject and then delete it from your mailbox.





More information about the Devel mailing list