Project

General

Profile

Download (331 Bytes) Statistics
| Branch: | Revision:

root / scripts / stat_mysql_variables @ 865f4ff4

1
#!/bin/sh
2

    
3
PARAM=${1:-noexistent}
4

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

    
(5-5/8)