root/scripts/stat_mysql_variables @ a7599d1f
865f4ff4 | Marc Dequènes (Duck) | #!/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.]+)/"
|