This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Log monitor. Sums requests by hour. Auto-refresh view each second. | |
while : | |
do | |
TODAY=$(date +"%b %d") | |
awk -F: -v t="$TODAY" '$0~t {h[$1]++;m[$1":"$2]++;}END{for(x in h)print x,h[x];'} /var/log/requests.log | sort > /tmp/requests_view.tmp | |
clear | |
echo "Requests Pace for" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '/Sep 07/ {total += 1} END {print "total requests = " total}' /var/log/requests.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /var/log/requests.log | awk ' { print $4 } ' | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -n 5000 -f /var/log/requests.log | awk ' | |
/FAIL$/ {print "\033[30m" $0 "\033[0m"} # black | |
/(\/delete.php)/ {print "\033[31m" $0 "\033[0m"} # red | |
/(\/move.php)/ {print "\033[32m" $0 "\033[0m"} # green | |
/(\/request.php)/ {print "\033[33m" $0 "\033[0m"} # yellow | |
/(\/change.php)/ {print "\033[34m" $0 "\033[0m"} # blue | |
/(\/part.php)/ {print "\033[35m" $0 "\033[0m"} # magenta | |
/(\/process.php)/ {print "\033[36m" $0 "\033[0m"} # cyan | |
/NO AFFECTED ROWS$/ {print "\033[37m" $0 "\033[0m"}' # white |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PTDEBUG=1 pt-heartbeat --host="mysql-b" --user=root --ask-pass --database="percona" --monitor --master-server-id="14" --frames=1m,5m,15m,1h,12h,1d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# whole table check | |
pt-table-checksum --databases=world --tables=city --user=root --ask-pass --no-check-binlog-format | |
# with a parameter for smaller samples | |
pt-table-checksum --databases=world --tables=city --where="name LIKE '%a%'" --user=root --ask-pass --no-check-binlog-format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysql: momentarily enable, then view, general log table | |
SET GLOBAL log_output = 'TABLE'; | |
SET GLOBAL general_log = 'ON'; | |
SELECT SLEEP(5); | |
SET GLOBAL general_log = 'OFF'; | |
SELECT * FROM mysql.general_log; | |
###### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* editBox | |
* auto-updating form, with reset/resave | |
* @author D.M. Giglio | |
*/ | |
(function(window, document, $){ | |
'use strict'; | |
$(document).ready(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Note: This script disables foreign key checks and ignores all errors! | |
DUMPDIR='/tmp/mysql_dumps/' | |
USERNAME='root' | |
PASSWORD='MyP@55' | |
DATABASE='databaseName' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>QUnit Matrix Tests</title> | |
<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.19.0.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> |
OlderNewer