Changeset 874 for trunk/Modules/TimeMeasure/Measurement/System.php
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/TimeMeasure/Measurement/System.php
r873 r874 14 14 { 15 15 fclose($Fp1); 16 return (TRUE);16 return TRUE; 17 17 } else 18 18 { 19 19 //echo($ERROR_NO.','.$ERROR_STR); 20 return (FALSE);20 return FALSE; 21 21 } 22 22 restore_error_handler(); … … 34 34 $Time = $Parts[7]; 35 35 $TimeParts = explode('=', $Time); 36 return ($TimeParts[1]);37 } else return (0);36 return $TimeParts[1]; 37 } else return 0; 38 38 } 39 39 … … 48 48 while (strpos($Row, ' ') !== false) $Row = str_replace(' ', ' ', $Row); 49 49 $RowParts2 = explode(' ', $Row); 50 return ($RowParts[2] + $RowParts2[2]);50 return $RowParts[2] + $RowParts2[2]; 51 51 } 52 52 … … 81 81 } 82 82 file_put_contents($CpuStateFileName, serialize($CpuUsage)); 83 return (100 - round($CpuUsagePercent['Idle'], 2));83 return 100 - round($CpuUsagePercent['Idle'], 2); 84 84 } 85 85 … … 114 114 } 115 115 file_put_contents($NetworkStateFile, serialize($NetworkState)); 116 return ($NetworkState);116 return $NetworkState; 117 117 } 118 118 … … 120 120 { 121 121 $NetworkState = $this->GetNetworkState(); 122 return ($NetworkState['Interface']['DownAverage']);122 return $NetworkState['Interface']['DownAverage']; 123 123 } 124 124 … … 126 126 { 127 127 $NetworkState = $this->GetNetworkState(); 128 return ($NetworkState['Interface']['UpAverage']);128 return $NetworkState['Interface']['UpAverage']; 129 129 } 130 130 … … 134 134 $Output = array(); 135 135 exec('cat /proc/net/nf_conntrack|grep "dst='.$HostIP.' "|grep "dport='.$Port.' "|grep "ASSURED"', $Output); 136 return (count($Output));136 return count($Output); 137 137 } 138 138 … … 145 145 $Parts = explode(' ', $Row); 146 146 $Value = str_replace(',', '.', $Parts[11]); 147 return ($Value);147 return $Value; 148 148 } 149 149 150 150 function DiskFree($Path) 151 151 { 152 return (disk_free_space($Path));152 return disk_free_space($Path); 153 153 } 154 154 … … 163 163 $Line = substr($Line, strpos($Line, '+') + 1); 164 164 $Line = substr($Line, 0, strpos($Line, '°')); 165 return ($Line);165 return $Line; 166 166 } 167 167 } 168 return (0);168 return 0; 169 169 } 170 170 … … 175 175 fclose($File); 176 176 $UptimeParts = explode(' ', $Uptime); 177 return ($UptimeParts[0]);177 return $UptimeParts[0]; 178 178 } 179 179 }
Note:
See TracChangeset
for help on using the changeset viewer.