mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Merge pull request #597 from sugamasao/sugamasao-patch-1
unicorn_ "unicorn_rails" process not working
This commit is contained in:
commit
387652afa5
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ if [ "$mode" = "memory" ]; then
|
|||
exit 0
|
||||
else
|
||||
|
||||
memory_array=(`ps auwx | grep "unicorn worker" | grep -v grep | awk '{print $6 }'`)
|
||||
memory_array=(`ps auwx | egrep "unicorn.* worker" | grep -v grep | awk '{print $6 }'`)
|
||||
|
||||
for i in "${memory_array[@]}"
|
||||
do
|
||||
|
@ -46,7 +46,7 @@ elif [ "$mode" = "processes" ]; then
|
|||
echo "processes.label active processes"
|
||||
else
|
||||
echo -n "processes.value "
|
||||
ps awwwux | grep 'unicorn worker' | grep -v grep | wc -l
|
||||
ps awwwux | egrep "unicorn.* worker" | grep -v grep | wc -l
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -61,7 +61,7 @@ elif [ "$mode" = "average" ]; then
|
|||
echo 'unicorn_average.info The average process size for Unicorn'
|
||||
else
|
||||
echo -n "unicorn_average.value "
|
||||
ps awwwux | grep 'unicorn worker' | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
|
||||
ps awwwux | egrep "unicorn.* worker" | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue