Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Published on
MySQL Monitoring 101
System Monitoring
❖ dstat
$ cat dbc_os.sh
#!/bin/sh
DATETIME=`date +%y%m%d.%H%M`
LOG_DIR=quot;/opt/monitor/log/quot;
INTERVAL=5
COUNT=`expr 3600 / $INTERVAL`
LOG_FILE=${LOG_DIR}os.${DATETIME}.${INTERVAL}.txt
CSV_LOG_FILE=${LOG_DIR}os.${DATETIME}.${INTERVAL}.csv
MYSQL_LOG_FILE=${LOG_DIR}os.${DATETIME}.${INTERVAL}.mysql.csv
/usr/bin/dstat --time --cpu --mem --disk --net --proc --page --swap --load --nocolor --noheaders --output $
{CSV_LOG_FILE} $INTERVAL $COUNT > $LOG_FILE 2>&1
sed -e quot;1,7dquot; -e quot;s/-/,/quot; -e quot;s/ /,/quot; ${CSV_LOG_FILE} > ${MYSQL_LOG_FILE}
exit 0
http://ronaldbradford.com
Login to see the comments