On 18-11-10 22:24, no-re...@cfengine.com wrote:
> Forum: Cfengine Help
> Subject: Re: Parent process selection
> Author: eystein
> Link to topic: https://cfengine.com/forum/read.php?3,19311,19322#msg-19322
>
> Interesting. The main concern is portability.
> Do you have experience with libproc on different Unix flavours (e.g. Linux, 
> HPUX, BSD, Solaris, etc.)?
> Thanks.
>

I have done some reading and libproc is portable on Linux systems.  I have 
download the source of the command utility 'top'. They support a lot of 
different OSes.  For most oses they use opendir('/proc') and then parse the 
different files.  So the conclusion is that for every os it is different ;-(

But for now the process selection is not correct. It depend on the ps 
output and options. with modern ps commands you can request which fields 
you want to have. For process select to work we need this fields. So why 
don't we use something like this:
ps -eo ruser,pid,ppid,pgid,cputime,ni,pri,rss,vsize,pcpu,stat,tty,thcount,cmd

We now exactly which fields we get back and what the meaning is of those 
fields and if cfengine decided to add another option for process_select you 
must afjust these line with the new parameter.

regards


-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to