PDA

View Full Version : Logging - Required server performance, new values per second


bbrendon
09-09-2008, 03:30
Required server performance, new values per second
system.run[script]

<?php
chdir('/usr/local/share/zabbix');

require_once "include/config.inc.php";


$status=get_status();

echo $status['qps_total'] . "\n";
?>

nelsonab
12-09-2008, 02:10
You can also run the following MySQL command


select count(*)/avg(delay) from items as i, hosts as h where i.hostid=h.hostid and h.status=0 and i.status=0 and h.available=1;

nelsonab
15-09-2008, 18:07
Added a link in the wiki:

http://www.zabbix.com/wiki/doku.php?id=howto:misc

lauerdk
04-07-2009, 23:34
This works in mysql 4.1+


SELECT sum(qps) AS qps
FROM (
SELECT count(*),count(*)/i.delay as qps
FROM items i,hosts h
WHERE i.status=0
AND i.hostid=h.hostid
AND h.status=0
GROUP BY i.type,i.delay
ORDER BY i.type, i.delay
) as data;

dawabz94
03-05-2011, 15:00
This works in mysql 4.1+


SELECT sum(qps) AS qps
FROM (
SELECT count(*),count(*)/i.delay as qps
FROM items i,hosts h
WHERE i.status=0
AND i.hostid=h.hostid
AND h.status=0
GROUP BY i.type,i.delay
ORDER BY i.type, i.delay
) as data;


Works perfectly on zabbix 1.8.4 / MySQL 5.0.51, thanks a lot !