From: Harri <har...@tu...> - 2005-07-26 10:11:38
|
Hi, I figured out a ps-command that will work with other versions of ps as well. I tested it on both ps of SunOS 5.8 and 5.9 (as reported by uname) and GNU procps 3.2.1 and procps 3.1.15 on GNU/Linux. It is probable that it will work on *BSD too. The command is "/bin/ps -e -o pid,etime,user,args" instead of "/bin/ps x -eo '%p %t %U %a --sort user'=20 The -e should include everything "x" includes. The AIX codes have been replaced with equivalent standard codes (POSIX) and the sorting is removed since it is not implemented in bsd-like ps. The sorting wasn't actually taken advantage of anyway. This doesn't make ProcessKiller platform independent but will allow it to work on many other Unix-like environments. If you want to add SunOS as a supported platform for ProcessKiller, the label returned by getProperty("os.name") is "SunOS". I hope this will be useful. Yours, Harri J=E4rvi |