Changeset 66 for client/php/Linux.php
- Timestamp:
- Jan 2, 2016, 12:17:56 AM (10 years ago)
- Location:
- client/php
- Files:
- 
      - 1 added
- 1 copied
 
 - 
          
  . (added)
- 
          
  Linux.php (copied) (copied from trunk/measure_scripts/system.php ) (3 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      client/php/Linux.phpr63 r66 23 23 } 24 24 25 function Ping( )25 function Ping($Host = 'nix.cz') 26 26 { 27 exec('ping nix.cz-c 1 -W 1|grep time=', $Row);27 exec('ping '.$Host.' -c 1 -W 1|grep time=', $Row); 28 28 // W - timeout in seconds 29 29 // c - ping count … … 124 124 } 125 125 126 function DiskUtilization( )126 function DiskUtilization($Device = 'sda') 127 127 { 128 128 $Output = array(); 129 exec('iostat -d sda-x -m 2 2', $Output); // 2 second measure delay129 exec('iostat -d '.$Device.' -x -m 2 2', $Output); // 2 second measure delay 130 130 $Row = $Output[6]; 131 131 while(strpos($Row, ' ') !== false) $Row = str_replace(' ', ' ', $Row); … … 135 135 } 136 136 137 function DiskFree( )137 function DiskFree($Path) 138 138 { 139 return(disk_free_space( '/'));139 return(disk_free_space($Path)); 140 140 } 141 141 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
