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

@ -1,31 +1,31 @@
#!/usr/bin/env ruby
# thin_peak_memory -
# thin_peak_memory -
# A munin plugin for Linux to monitor the maximum memory size
# that an each individual thin process has reached
#
#
# For Linux ONLY !
# DOES NOT WORK on OSX, Solaris or BSD.
# only linux, because this script relies on proc filesystem
#
# Author:
# Author:
# Frederico de Souza Araujo - fred.the.master@gmail.com
# http://www.frederico-araujo.com
#
# 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.
@ -36,7 +36,7 @@
module Munin
class ThinPeakMemory
def run
instances = get_pids()
instances.each do |instance|
@ -45,7 +45,7 @@ module Munin
puts "thin_#{port}.value #{hwm}"
end
end
# only get VmHWM count for each pid
# (Virtual Memory High Water Mark)
# Using Proc filesystem
@ -60,7 +60,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/)
@ -69,7 +69,7 @@ module Munin
def autoconf
get_pids().length > 0
end
end
end
@ -84,7 +84,7 @@ when "config"
puts "graph_scale yes"
puts "graph_info Tracks the peak memory of thin processes, aka High Water Mark."
mpm.get_pids.each do |instance|
pid, port = instance.split("|")
pid, port = instance.split("|")
puts "thin_#{port}.label thin_#{port}"
puts "thin_#{port}.info Peak Memory"
puts "thin_#{port}.type GAUGE"