| 157 |
|
$total = "$diskRoot.p$i.attributes.total"; |
| 158 |
|
$graph = preg_replace("/_/", "$hex_underscore", $mount); |
| 159 |
|
$graph = preg_replace("/\//", "$hex_slash", $graph); |
| 160 |
+ |
$graph = preg_replace("/\\\\/", "$hex_bslash", $graph); |
| 161 |
+ |
$graph = preg_replace("/ /", "$hex_space", $graph); |
| 162 |
+ |
$graph = preg_replace("/:/", "$hex_colon", $graph); |
| 163 |
|
$totalinodes = getPregMatch("$diskRoot.p$i.attributes.totalinodes", $input); |
| 164 |
|
$freeinodes = getPregMatch("$diskRoot.p$i.attributes.freeinodes", $input); |
| 165 |
|
showBar("$name ($mount)<br>space used", $used, $total, $units, $input, "disk-$graph"); |
| 183 |
|
while(1) { |
| 184 |
|
$name = getPregMatch("$diskRoot.p$i.attributes.name", $input); |
| 185 |
|
if ($name) { |
| 186 |
+ |
$graph = preg_replace("/\//", "$hex_slash", $name); |
| 187 |
+ |
$graph = preg_replace("/_/", "$hex_underscore", $graph); |
| 188 |
+ |
$graph = preg_replace("/\\\\/", "$hex_bslash", $graph); |
| 189 |
+ |
$graph = preg_replace("/ /", "$hex_space", $graph); |
| 190 |
+ |
$graph = preg_replace("/:/", "$hex_colon", $graph); |
| 191 |
|
print "<br><center><b>(Disk $name)</b></center>"; |
| 192 |
< |
showStat("Read bytes (per sec)", "$diskRoot.p$i.attributes.rbytes", $input, "diskio-$name"); |
| 193 |
< |
showStat("Write bytes (per sec)", "$diskRoot.p$i.attributes.wbytes", $input, "diskio-$name"); |
| 192 |
> |
showStat("Read bytes (per sec)", "$diskRoot.p$i.attributes.rbytes", $input, "diskio-$graph"); |
| 193 |
> |
showStat("Write bytes (per sec)", "$diskRoot.p$i.attributes.wbytes", $input, "diskio-$graph"); |
| 194 |
|
print " <br>\n"; |
| 195 |
|
} |
| 196 |
|
else { |
| 209 |
|
while(1) { |
| 210 |
|
$name = getPregMatch("$netRoot.p$i.attributes.name", $input); |
| 211 |
|
if ($name) { |
| 212 |
+ |
$graph = preg_replace("/\//", "$hex_slash", $name); |
| 213 |
+ |
$graph = preg_replace("/_/", "$hex_underscore", $graph); |
| 214 |
+ |
$graph = preg_replace("/\\\\/", "$hex_bslash", $graph); |
| 215 |
+ |
$graph = preg_replace("/ /", "$hex_space", $graph); |
| 216 |
+ |
$graph = preg_replace("/:/", "$hex_colon", $graph); |
| 217 |
+ |
$graph = preg_replace("/\(/", "$hex_lbracket", $graph); |
| 218 |
+ |
$graph = preg_replace("/\)/", "$hex_rbracket", $graph); |
| 219 |
+ |
$graph = preg_replace("/\+/", "$hex_plus", $graph); |
| 220 |
+ |
$graph = preg_replace("/#/", "$hex_hash", $graph); |
| 221 |
|
print "<br><center><b>(Network Interface $name)</b></center>"; |
| 222 |
< |
showStat("Received bytes (per sec)", "$netRoot.p$i.attributes.rx", $input, "net-$name"); |
| 223 |
< |
showStat("Transfered bytes (per sec)", "$netRoot.p$i.attributes.tx", $input, "net-$name"); |
| 222 |
> |
showStat("Received bytes (per sec)", "$netRoot.p$i.attributes.rx", $input, "net-$graph"); |
| 223 |
> |
showStat("Transfered bytes (per sec)", "$netRoot.p$i.attributes.tx", $input, "net-$graph"); |
| 224 |
|
print " <br>\n"; |
| 225 |
|
} |
| 226 |
|
else { |