Project

General

Profile

Download (332 Bytes) Statistics
| Branch: | Revision:
#!/bin/sh

PARAM=${1:-noexistent}

CACHE_FILE=/tmp/zbx-mysql_status
test -z `/usr/bin/find ${CACHE_FILE} -mmin -5 2>/dev/null` && \
echo "SHOW GLOBAL STATUS" | mysql --defaults-file=/etc/mysql/debian.cnf \
--batch --skip-pager --skip-column-names >${CACHE_FILE}
cat ${CACHE_FILE} | perl -ne "print \$1 if m/^${PARAM}\t([\d.]+)/"

(4-4/8)