in reply to Re^3: Percent of CPU/Mem Usage for User
in thread Percent of CPU/Mem Usage for User

Really? Well, there has to be something for you to do :)
  • Comment on Re^4: Percent of CPU/Mem Usage for User

Replies are listed 'Best First'.
Re^5: Percent of CPU/Mem Usage for User
by geekt (Novice) on Jun 11, 2010 at 11:28 UTC

    On second look Proc table MAY be usable...but I'll have to do some more research. :) Thank you.

    Edit: First look was too brief, made it look like less than it was. Looking into it further it seems almost too basic. Fully usable, but will have to experiment when my brain isn't all over the place. :) Thank you again.

      If you post something like
      #!/usr/bin/perl -T -- use strict; use warnings; use IPC::System::Simple qw' capturex '; Main( 'theuser' ); exit( 0 ); sub Main { my( $username ) = @_; #~ my $top = `top -b -n 1 -u $username`; ## Capture text while invoking the shell. #~ my $top = capturex( qw' top -b -n 1 -u ', $username ); my $output = <<'__TOP_EXAMPLE__'; here is something top will output it goes like this __TOP_EXAMPLE__ if( $output=~ /.../ ){ # my regex print "$1$2...\n"; } }
      then I can help with the regex ... more tips like this at How (Not) To Ask A Question, I know what I mean. Why don't you?, courtesy of PerlMonks FAQ, Tutorials