2014-05-14 Sergio Martin <sergio.martin@artica.es>

* extensions/realtime_graphs/ajax.php: Improve the commands of 
	realtime graphs



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9933 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2014-05-14 09:39:42 +00:00
parent fad65b1d53
commit 26f09b52bc
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2014-05-14 Sergio Martin <sergio.martin@artica.es>
* extensions/realtime_graphs/ajax.php: Improve the commands of
realtime graphs
2014-05-14 Sergio Martin <sergio.martin@artica.es>
* include/functions_graph.php: fixed "resolution" of custom

View File

@ -22,10 +22,10 @@ $refresh = $_POST['refresh'];
switch($graph) {
case 'cpu_load':
$data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{print $2+$4+$6}'");
$data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
break;
case 'pending_packets':
$data = exec("find /var/spool/pandora/data_in/*.data | wc -l");
$data = exec("ls /var/spool/pandora/data_in/ | wc -l");
break;
case 'disk_io_wait':
$data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'");
@ -34,10 +34,10 @@ switch($graph) {
$data = exec("ps aux | grep mysqld | grep -v safe | grep -v grep | awk '{ print $3 }'");
break;
case 'apache_load':
$data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ print $3 }'");
$data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
break;
case 'server_load':
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{print $3}'");
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
break;
case 'snmp_interface':
$snmp_address = $_POST['snmp_address'];