2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gcutilで取得したGC統計情報に日付を加えて出力させる。

Last updated at Posted at 2019-03-17

#なぜこの記事を書いたか
tオプションで表示されるのがJVM実行からの経過時間でした、それよりも現在時刻で知りたいと思ったため。

事前準備

jpsコマンドで監視したいjavaプロセスのIDを調べておく。

#監視開始

1秒ごとに実行結果の表示、10行毎に見出しの表示を行っている。

実行コマンド
jstat -gcutil -h 10 [javaプロセスのID] 1000 | awk  -F, '{print strftime("%Y-%m-%d %H:%M:%S",systime()) $1}'

#結果

2019-03-17 11:39:38  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT    CGC    CGCT    CT
2019-03-17 11:39:38  0.00 100.00  17.39  12.32  95.68  86.38      5    0.035     0    0.000     2    0.005    0.040
2019-03-17 11:39:39  0.00 100.00  17.39  12.32  95.68  86.38      5    0.035     0    0.000     2    0.005    0.040
2019-03-17 11:39:40  0.00 100.00  17.39  12.32  95.68  86.38      5    0.035     0    0.000     2    0.005    0.040
2019-03-17 11:39:41  0.00 100.00  17.39  12.32  95.68  86.38      5    0.035     0    0.000     2    0.005    0.040
2019-03-17 11:39:42  0.00 100.00  17.39  12.32  95.68  86.38      5    0.035     0    0.000     2    0.005    0.040
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?