in reply to Process display

Your problem centers on ps having different flags on different systems.  Check out ppk for some inspiration (don't look too hard though, the code is from when I was beginning in Perl).  I know the code does not do what you are wanting, but it does deal with ps having differnt flags on different systems.