Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
cpu idle measurement: sar/vmstat
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="inetquestion, post: 4827727"] I can't seem to get rid of the error message if sar doesn't exist in the path. The redirection of stderr from within the backticks isn't working via perl. Is there another way to allieviate these errors from showing up in the console? Any suggestions on how to get cpuidle which will work on unix or windows? $CpuAvg=`sar -u 15 2>/dev/null | tail -1 | awk '{print \$5}'`; if ( $CpuAvg=~/[0-9]*/ ) { $CpuAvg=`vmstat 15 2 | tail -1 | awk '{print \$22}'`; } chomp($CpuAvg); -Inet [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
cpu idle measurement: sar/vmstat
Top