ども、 cloudpack の かっぱ (@inokara) です。 はじめに pidstat というツールを教えて頂いた上にその結果を Graphite に送るスクリプトも見つけたのでそれをちょっと改変して各プロセス毎の CPU 使用率を Graphite に送るスクリプトを作ってみたメモ。 参考 pidstat(1) – Linux man page 原因調査用Linuxコマンド プロセス単位のリソース使用量を調べる (pidstat) 10 pidstat Examples to Debug Performance Issues of Linux Process report per-process IO stats with pidstat or sar pidstat とスクリプト 各プロセス毎のリソース状態を出力するツールで sysstat パッケージに含まれる pidstat
![pidstat の結果を Graphite に送る bash スクリプト | iret.media](https://cdn-ak-scissors.b.st-hatena.com/image/square/377a9c51a86d20c871561f0ba1caf65409e4f7f2/height=288;version=1;width=512/https%3A%2F%2Firet.media%2Fwp-content%2Fthemes%2Fclp_media%2Fimg%2Fcommon%2Fogp-thumbnail_1200x630.png%3F135792468)