Permalink
Browse files

emit value in correct unit

ps reports memory sizes in KBytes, so we should multiply in order
for munin to graph the value correctly
  • Loading branch information...
1 parent 75959c6 commit 6db218261d505b87f3ba5a50d9958a36ac6622f4 @pilif pilif committed Jun 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 phpfpm_average
View
@@ -35,5 +35,5 @@ exit 0
fi
echo -n "php_average.value "
-ps awwwux | grep $PHP_BIN | grep -v grep | grep -v master | awk '{total_mem = $6 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
+ps awwwux | grep $PHP_BIN | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'

0 comments on commit 6db2182

Please sign in to comment.