1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -4,8 +4,8 @@
# For Linux ONLY !
# DOES NOT WORK on OSX, Solaris or BSD.
# only linux, because this script relies on proc filesystem
#
# Original author:
#
# Original author:
# Frederico de Souza Araujo - fred.the.master@gmail.com
# http://www.frederico-araujo.com
#
@ -14,20 +14,20 @@
# http://www.furbism.com
#
# Originally based on:
# thin_process_memory -
# A munin plugin to monitor memory size of
# thin_process_memory -
# A munin plugin to monitor memory size of
# each individual thin process
# by Ben VandenBos and Avvo, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@ -38,7 +38,7 @@
module Munin
class ThinProcessMemory
# run main method
def run
instances = get_pids()
@ -48,7 +48,7 @@ module Munin
puts "thin_#{port}.value #{rss}"
end
end
# only get the memory for each pid
def pid_rss(pid)
res = `grep "VmRSS" /proc/#{pid}/status`.split[1]
@ -58,7 +58,7 @@ module Munin
return res
end
end
# 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)}' | sort -t'|' -nk 2`.split(/\r?\n/)
@ -67,7 +67,7 @@ module Munin
def autoconf
get_pids().length > 0
end
end
end