in reply to Percent of CPU/Mem Usage for User

Top may not be what you really need. Top is supposed to give a "dynamic real-time view of a running system". On the other hand, "ps selects all processes with the same effective user id (euid=EUID) as the current user and associated with the same terminal as the invoker".

Replies are listed 'Best First'.
Re^2: Percent of CPU/Mem Usage for User
by geekt (Novice) on Jun 11, 2010 at 12:34 UTC
    That is why I used the variation "top -b -n 1", so I could grab it as a string. However, Proc::ProcessTable mentioned by the other poster seems to return similar, as a Perl module. I am currently looking into calculating processor and memory usage from it.