mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
improvement to mysql application from pkn
git-svn-id: http://www.observium.org/svn/observer/trunk@1999 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -10,9 +10,17 @@ $mysql = shell_exec($mysql_cmd);
|
|||||||
|
|
||||||
echo(" mysql...");
|
echo(" mysql...");
|
||||||
|
|
||||||
|
|
||||||
$data = explode("\n", $mysql);
|
$data = explode("\n", $mysql);
|
||||||
$nstring = trim(implode(':',$data),':');
|
|
||||||
|
for ($a=0,$n=count($data);$a<$n;$a++)
|
||||||
|
{
|
||||||
|
$elements = explode(":",$data[$a]);
|
||||||
|
$nstring .= (float)trim($elements[1]).":";
|
||||||
|
unset($elements);
|
||||||
|
}
|
||||||
|
|
||||||
|
#$data = explode("\n", $mysql);
|
||||||
|
#$nstring = trim(implode(':',$data),':');
|
||||||
|
|
||||||
if (!is_file($mysql_rrd)) {
|
if (!is_file($mysql_rrd)) {
|
||||||
rrdtool_create ($mysql_rrd, "--step 300 \
|
rrdtool_create ($mysql_rrd, "--step 300 \
|
||||||
|
Reference in New Issue
Block a user