Hello! On Sun, Apr 30, 2006 at 05:07:07PM +0200, Federico Giannici wrote: >My CD finally arrived and I immediately installed 3.9 in the first machine. > >I immediately found a problem for me: it seems that the GENERIC kernel >no longer support the procfs filesystem.
>Instead of compiling a custom kernel, what is the best way (in Perl) to >get the list of current processes? >I have to scan the list every few seconds. A couple of years ago, I >tried executing an external "ps", but found that it sometimes "freezed". >I found the scanning of the "/proc" filesystem much more stable... If parsing ps output *freezed*, I think you did something wrong. Some other utilities like zap (from ports) do exactly that. Then, there's the possibility to use the direct sysctl interface, using CTL_KERN as the first level name and the KERN_PROC* names on the second level, see the manual page sysctl(3). That's the way how ps(1) and top(1) do it if I'm right. Kind regards, Hannah.

