星期四, 1月 13, 2011

Null 欄位排序處理

  1. SELECT completed
  2. FROM TABLE
  3. ORDER BY case when completed IS NULL then 1 else 0 end, completed DESC

星期三, 1月 12, 2011

Linux - kill java

 

ps -ef|grep java|awk '{print $2}' gives all the process numbers , i think some 'cut ' command is there but not sure.

 

su -c 'killall -9 java'

星期二, 1月 11, 2011

Netstat command

netstat -p tcp

• Packet traffic

• Retransmissions, errors, …

• Look for:

– connect requests dropped due to full queue

 

netstat –a

• Socket connections

• Look for:

– connections with *WAIT*