2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Fixed instance order using port number and not pid anymore

This commit is contained in:
Thomas Vial 2013-06-08 18:07:26 +02:00
parent 9ec552e04e
commit 08c3a67e8b
3 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ module Munin
# fetch all pids that match thin # fetch all pids that match thin
def get_pids def get_pids
pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}'`.split(/\r?\n/) pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}' | sort -t'|' -nk 2`.split(/\r?\n/)
end end
def autoconf def autoconf

View File

@ -65,7 +65,7 @@ module Munin
# fetch all pids that match thin # fetch all pids that match thin
def get_pids def get_pids
pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}'`.split(/\r?\n/) pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}' | sort -t'|' -nk 2`.split(/\r?\n/)
end end
def autoconf def autoconf

View File

@ -63,7 +63,7 @@ module Munin
# fetch all pids that match thin # fetch all pids that match thin
def get_pids def get_pids
pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}'`.split(/\r?\n/) pids = `pgrep -f 'thin' -l | awk -F " " '{ if (substr( $4, 10, 4)>=1) print $1"|"substr( $4, 10, 4)}' | sort -t'|' -nk 2`.split(/\r?\n/)
end end
def autoconf def autoconf