2013-11-01から1日間の記事一覧
パフォーマンスチューニング等で結構使うのでメモ 第一引数にjstatのログファイル 第二引数にグラフのタイトル 第三引数にファイルのプレフィックス を渡して起動してやると ~/img/配下に${file_name}.pngの名前でグラフの画像を出してくれる。 #!/bin/sh if…
$()でバッククォートと似たことできるんだな。 $(cd $(dirname $1) && pwd)/`basename $1` 参考: http://dokonoumanohone.blog47.fc2.com/blog-entry-2.html
なんだこれ超めんどくせぇ private void archive(File input, File output) { FileOutputStream fOut = null; BufferedOutputStream bOut = null; GzipCompressorOutputStream gzOut = null; TarArchiveOutputStream tOut = null; try { fOut = new FileOutp…
iostatの出力は1回で複数行出てしまうため、編集してやる必要がある。 iostat 1 -x -t /dev/sda | awk ' BEGIN { print "time %user %nice %system %iowait %steal %idle Device rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util "…