[Groonga-commit] groonga/groonga at f78c9ab [master] munin: avoid invalid detection of %CPU

Back to archive index

HAYASHI Kentaro null+****@clear*****
Thu Dec 26 13:43:44 JST 2013


HAYASHI Kentaro	2013-12-26 13:43:44 +0900 (Thu, 26 Dec 2013)

  New Revision: f78c9aba9b780decab7aef90882a56ca1cb30750
  https://github.com/groonga/groonga/commit/f78c9aba9b780decab7aef90882a56ca1cb30750

  Message:
    munin: avoid invalid detection of %CPU

  Modified files:
    data/munin/groonga_cpu_load

  Modified: data/munin/groonga_cpu_load (+1 -1)
===================================================================
--- data/munin/groonga_cpu_load    2013-12-26 13:36:14 +0900 (49485ec)
+++ data/munin/groonga_cpu_load    2013-12-26 13:43:44 +0900 (7e8a017)
@@ -42,6 +42,6 @@ if [ -z "${pid_file}" ]; then
 fi
 
 groonga_pid=$(cat ${pid_file})
-top_for_groonga=$(top -b -n 1 -p ${groonga_pid} | tail -2 | head -1)
+top_for_groonga=$(top -b -n 1 -p ${groonga_pid} | grep ${groonga_pid})
 load_in_percent=$(echo ${top_for_groonga} | sed -r -e 's/ +/ /g' | cut -d' ' -f 9)
 echo "cpu_load.value ${load_in_percent}"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index