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 jawiki-latest-pages-articles.xml | sed -e 's/<ns>.*<\/ns>\|<ns.*\/>\|<sha1>.*<\/sha1>\|<sha1.*\/>\|<parentid>.*<\/parentid>\|<parentid.*\/>\|<model>.*<\/model>\|<model.*\/>\|<format>.*<\/format>\|<format.*\/>\|<redirect>.*<\/redirect>\|<redirect.*\/>//' | xml2sql |
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
[user] | |
[color] | |
ui = auto | |
[core] | |
editor = vim | |
excludesfile = ~/.gitignore | |
[alias] | |
ad = add | |
br = branch |
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
arch = node['kernel']['machine'] | |
arch = 'i386' unless arch == 'x86_64' | |
pversion = node['platform_version'].split('.').first | |
yum_repository 'percona' do | |
repo_name 'Percona' | |
description 'Percona Repo' | |
url "http://repo.percona.com/centos/#{pversion}/os/#{arch}/" | |
key 'RPM-GPG-KEY-percona' | |
action :add |
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 | |
@@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH as GLOBAL_BUFFER_SIZE, | |
@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + @@GLOBAL.READ_RND_BUFFER_SIZE as THREAD_BUFFER_SIZE, | |
@@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH | |
+ (@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + @@GLOBAL.READ_RND_BUFFER_SIZE) * @@GLOBAL.MAX_CONNECTIONS AS TOTAL_MEMORY_SIZE, | |
(@@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH | |
+ (@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + |
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文 | |
tcpdump -l -i eth1 -A -n -s 0 dst port 3306 | grep SELECT | |
■UPDATE文 | |
tcpdump -l -i eth1 -A -n -s 0 dst port 3306 | grep UPDATE | |
■INSERT文 | |
tcpdump -l -i eth1 -A -n -s 0 dst port 3306 | grep INSERT |
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
ps alx | awk '{printf ("%d\t%s\n", $8,$13)}' | sort -nr | head -10 |
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
ps aux | grep [h]ttpd | grep [a]pache | awk 'BEGIN{x=0}{x+=$6}END{ print x/NR }' |
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
Server:Apache/2.2.3 (Red Hat) DAV/2 mod_auth_kerb/5.1 mod_auth_pgsql/2.0.3 PHP/5.1.6 mod_python/3.2.8 Python/2.4.3 mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 SVN/1.6.11 mod_perl/2.0.4 Perl/v5.8.8 | |
X-Powered-By:PHP/5.1.6 |
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
#管理ノードで実行 | |
ndb_mgmd -f /var/lib/mysql-cluster/config.ini --initial | |
#データノードで実行 | |
ndbmtd --initial(シングルスレッド版で起動する場合はndbd --initial) | |
#SQLノードで実行 | |
service mysql start | |
/usr/bin/mysql_secure_installation | |
#権限テーブルがMyISAMのため、ndbclusterエンジンに変更する |
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
ERROR 1297 (HY000) at line 1207: Got temporary error 410 'REDO log files overloaded (decrease TimeBetweenLocalCheckpoints or increase NoOfFragmentLogFiles)' from NDBCLUSTER | |
#NoOfFragmentLogFiles=4にしていたのをNoOfFragmentLogFiles=16(デフォルト値)に戻した | |
ERROR 1114 (HY000) at line 1213: The table 'sample_table' is full | |
#→通常のMySQLでも出るが一旦以下のようにして回避 | |
#innodb_data_file_path=ibdata1:10M:autoextend→ダメだった | |
#config.iniの[NDBD_DEFAULT]セクション内のDataMemory、IndexMemoryを増やす必要がある | |
#IndexMemory=100M | |
#DataMemory=1024M | |
#※本来はndb_size.pl(http://dev.mysql.com/doc/refman/5.1/ja/mysql-cluster-utilities-ndb-size.html)や |