2010年8月29日日曜日

Ubuntu Terminalでコピー ペースト

OSXのターミナルとかだとコントロール・コピーがターミナルにできるんだけど、Ubuntuだと少しやり方がちがう。
ctrl-insert : copy
shift-insert : paste


とやればブラウザでコピーしたものをターミナルへコピーすることができます。

2010年8月16日月曜日

echoで変数の改行が空白に

shellスクリプトで変数をいろいろして、出力しようとしたんだけど、出力時に改行が空白になってしまっている。ということでその際は、man echo の
$echo -e enable interpretation of backslash escapes

より
$ echo -e $LOG

2010年8月10日火曜日

Spring tool suit for eclipse

The order of the installation..

# Install all features from the update site labeled “AJDT” and restart
# Install at least the Jira Connector feature from the update site labeled “Mylyn Extras” and restart
# Install all features from the update site labeled “Spring IDE Update Site” and restart
# Install all features from the update site labeled “SpringSource dm Server Tools Update Site” and restart
# Install all features from the update site labeled “SpringSource Tool Suite Update Site” and restart

2010年8月6日金曜日

JBossやTomcatのデバッグ

まずはプロセスIDを取得
$ jps


プロセスのヒープメモリをダンプ
$ jmap -dump:live,format=b,file=/var/tmp/jboss.log [PID]


ダンプ内容を確認
$jhat [dump file]

でも
% jhat jboss.log 
Reading from jboss.log...
Dump file created Mon Sep 13 08:56:53 CEST 2010
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Hashtable.rehash(Hashtable.java:356)
at java.util.Hashtable.put(Hashtable.java:412)
at com.sun.tools.hat.internal.model.Snapshot.addHeapObject(Snapshot.java:153)
at com.sun.tools.hat.internal.parser.HprofReader.readInstance(HprofReader.java:728)
at com.sun.tools.hat.internal.parser.HprofReader.readHeapDump(HprofReader.java:474)
at com.sun.tools.hat.internal.parser.HprofReader.read(HprofReader.java:226)
at com.sun.tools.hat.internal.parser.Reader.readFile(Reader.java:79)
at com.sun.tools.hat.Main.main(Main.java:143)

とかがでてしまうなら、
$ jhat -J-Xmx512m  [dump file]

としてみましょう。そしてブラウザからhttp://127.0.0.1:7000/ にアクセス。