[Lazarus] RE : How to enumerate list of Linux running processes?

Michael Joyner mjoyner at vbservices.net
Sun Aug 14 17:22:15 CEST 2011


2011/8/14 ik <idokan at gmail.com>

>
>
>
>> ps parses /proc, but some of the command-line options might vary with
>> distro and version. I've used it reasonably successfully on Linux and
>> Solaris, my notes from a Perl script:
>>
>> # For Linux, ps is normally found in /bin/ps. For Solaris it is probably
>> in
>> # /usr/bin/ps, but we never want to use the Berkeley one in /usr/ucb/ps
>> which
>> # has neither the --ppid nor the -f option; code below will probably need
>> to
>> # be refined for BSD.
>>
>> I had my "new" SGI system running IRIX briefly yesterday, and could see
>> numbered entries in /proc. I didn't investigate the content, or what ps was
>> like.
>>
>
>
> PS also varied from implementation to implementation. BusyBox have very
> limited version of PS for example.
> I think it's easier to look at PS code and implement one in Pascal then to
> parse the content PS.
>

This also will result in very platform specific code.

>
>
>>
>>


-- 
---

   - Learn to speak Cherokee: http://www.cherokeelessons.com/
   - Cherokee Language Help BBS/Chat:
   http://www.cherokeelessons.com/phpBB3/viewforum.php?f=6
   - Cherokee Lessons PDF made with: http://www.lyx.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110814/acbda6e8/attachment-0003.html>


More information about the Lazarus mailing list