From 08c3a67e8b7031a4801c0dfedc067cfaa81f89a3 Mon Sep 17 00:00:00 2001 From: Thomas Vial Date: Sat, 8 Jun 2013 18:07:26 +0200 Subject: [PATCH] Fixed instance order using port number and not pid anymore --- plugins/thin/thin_memory | 2 +- plugins/thin/thin_threads | 2 +- plugins/thin/thins_peak_memory | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/thin/thin_memory b/plugins/thin/thin_memory index cf7814df..f800f759 100755 --- a/plugins/thin/thin_memory +++ b/plugins/thin/thin_memory @@ -61,7 +61,7 @@ module Munin # fetch all pids that match thin 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 def autoconf diff --git a/plugins/thin/thin_threads b/plugins/thin/thin_threads index 57a4d542..c328b48d 100755 --- a/plugins/thin/thin_threads +++ b/plugins/thin/thin_threads @@ -65,7 +65,7 @@ module Munin # fetch all pids that match thin 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 def autoconf diff --git a/plugins/thin/thins_peak_memory b/plugins/thin/thins_peak_memory index 049fda29..bcf56c9c 100755 --- a/plugins/thin/thins_peak_memory +++ b/plugins/thin/thins_peak_memory @@ -63,7 +63,7 @@ module Munin # fetch all pids that match thin 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 def autoconf