Created
April 15, 2012 17:49
-
-
Save glidenote/2394106 to your computer and use it in GitHub Desktop.
sheet command
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
# 直近5000アクセス中、アクセスが集中しているURLを調べ、上位4件を表示。 | |
tail -5000 /usr/local/apache2/logs/access_log|awk '{print $1}'|sort | uniq -c |sort -gr|head -n 4 | |
# 直近5000アクセス中、アクセス元のIPアドレスを調べ、上位4件を表示。 | |
tail -5000 /usr/local/apache2/logs/access_log|awk '{print $2}'|sort | uniq -c |sort -gr|head -n 4 | |
# 直近5000アクセス中アクセスの多いリダイレクト元(アクセス元)を調べ、上位4件を表示。 | |
tail -n 5000 /usr/local/apache2/logs/access_log | awk '{print $12}' | sort | uniq -c | sort -gr | head -n 4 | |
# 直近5000アクセス中アクセスの多いU/Aを調べ、上位4件を表示。 | |
tail -n 5000 /usr/local/apache2/logs/access_log | awk '{print $13}' | sort | uniq -c | sort -gr | head -n 4 |
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
# ユーザの確認 | |
select user,host,password from mysql.user; | |
# レプリケーションエラー対応用 | |
stop slave; | |
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; | |
start slave; | |
show slave status\G | |
# mk-slave-restart | |
mk-slave-restart -uroot -p --error-numbers 1062 --verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment