Project

General

Profile

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

PARAM=${1:-noexistent}

CACHE_FILE=/tmp/zbx-mysql_variables
test -z `/usr/bin/find ${CACHE_FILE} -mmin -5 2>/dev/null` && \
echo "SHOW VARIABLES" | 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.]+)/"

(5-5/8)