Help for this page

Select Code to Download


  1. or download this
    ($cpu_user, $cpu_nice, $cpu_total, $cpu_idle) = /^cpu\s+(\d+)\ (\d+) (
    +\d+) (\d+)/;
    
  2. or download this
    sub cpu_stats {
       my @cpustats;
    ...
    
       return(@cpustats);
    }