2011年2月25日 星期五

[MySQL]Mysql Thread State Classification

Mysql Thread State Classification
原始文件定義: http://dev.mysql.com/doc/refman/5.5/en/general-thread-states.html

 •Network Operation
   Reading from net
   Writing to net
   Sending data
•Sort
   Sorting result
•Update
   update
   updating
   Updating
•Temp Table (Disk Operation)
   Copying to tmp table on disk
•Table Operation
   Copying to tmp table
   Opening tables
   closing tables
   converting HEAP to MyISAM
   Creating tmp table 
   removing tmp table
•Flush Operation
•Closing, Cleaning, Ending
   cleaning up
   end
•Other Administration Operation
   statistics
   preparing
   freeing items
   checking permissions
•Lock
   Locked
   Waiting for release of readlock
•User Operation
   init
   executing
   login
=================================================
出現次數統計 (2/22~3/1)
Sending data ## 218
update ## 192
Copying to tmp table ## 1241
Updating ## 61
Locked ## 136
end ## 90
init ## 7
Copying to tmp table on disk ## 28
statistics ## 22
preparing ## 5
Opening tables ## 3
Reading from net ## 7
cleaning up ## 3
closing tables ## 1
freeing items ## 1
updating ## 4
executing ## 2
login ## 27
Writing to net ## 46
converting HEAP to MyISAM ## 3
Sorting result ## 2
Waiting for release of readlock ## 97
checking permissions ## 1
Creating tmp table ## 2
removing tmp table ## 1
========================================
文章修改紀錄:
2/25 觀察到20個state, 並進行分類.
3/1 新增5個新觀察到的state.

2011年2月24日 星期四

[TIPs]SSH Login Takes Long Time

Solution 1.
Add the following to /etc/ssh/sshd_config on your SSH server
UseDNS no
Then restart the ssh daemon and your pauses should be gone.

Solution 2.
Disabled this login method on the ubuntu client side (/etc/ssh/ssh_config).
Uncommented the single line (need to be root to do so...) in the ssh_config file:
GSSAPIAuthentication no
Once this is done, the password prompt immediately.

Reference:
a. http://ubuntuforums.org/showthread.php?t=630623

[TIPs]顯示程式碼標記

程式碼
命令

Reference:
a. http://klcintw4.blogspot.com/2006/11/blog-post_03.html
b. http://abintech.twidv.com/2006/11/blog-post_7922.html

2011年2月23日 星期三

[TIPs]SSH Conncetion Timeout Fix

There four choices for fixing the SSH conncetion timeout problem

1. At server side:
On the server, login as root and edit /etc/ssh/sshd_config and add the line:
ClientAliveInterval 60

2. At client side:
As root on your desktop (or client) machine, edit /etc/ssh/ssh_config and add the line:
ServerAliveInterval 60

3. Enable putty keepalive
putty -> Connection -> Seconds between keepalives
(default 0 means turn off), change it to 60 (seconds)


4. man sshd_config and use other config.

Reference:
a. http://ocaoimh.ie/how-to-fix-ssh-timeout-problems/
b. http://www.yaozer.cn/ssh-%E8%B6%85%E6%97%B6ssh-timeout-%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/