[Nagiosplug-devel] Partial feature additions

Ton Voon tonvoon at mac.com
Thu Apr 22 16:57:05 CEST 2004


On 19 Apr, 2004, at 18:29, Jason Martin wrote:

> I'm looking to add a feature to check_procs that deals with the age of 
> the
> process. I see that that check_procs has ps format listings for quite  
> a
> few platforms and I only have access to a few.  Would it be acceptable 
> to
> submit a patch that only enables that functionality on a subset of
> platforms? Is there a standard way of dealing with this sort of 
> situation?
>
>
This is an interesting idea and would be useful - someone has already 
made this suggestion but I had rejected it because of the work 
involved. I think it will probably be very hard to do as there would 
have to be a lot of intelligence in evaluating the ps output (etime 
available? Is format different?). However, if you would like to have a 
go, I would be keen to see your patch.

It would be unrealistic to insist on all platforms if you do not have 
access, but I think you would need to prove your change would work on 
at least 3 platforms to increase confidence in non-OS specific 
functionality.

This change would not go into the 1.4 release - it would be added to 
the 1.5 release.

Just to give you an idea of what I have planned (time permitting), my 
medium term aim is to separate the ps code out of check_procs and 
check_nagios into utils.c with a routine called (say) psopen to start a 
ps fork, with subsequent psgets to return each process information into 
a process structure (with null values for columns that are not 
defined). This would allow more flexibility in the functionality per 
OS.

The long term strategy is to move to other libraries that handle the 
cross-platform issues (such as check_disk using the GNU coreutils 
code), but I don't think there is a suitable one for process listings.

Ton





More information about the Devel mailing list