Projet

Général

Profil

Révision b0b39b01

IDb0b39b018e200cd0b771675fd0a6489f6ee9f045
Parent 26c29daa
Enfant 809639ab

Ajouté par Lars Kruse il y a plus de 5 ans

Ruby plugins: apply style changes as suggested by "rubocop --fix-layout"

Voir les différences:

plugins/thin/thin_threads
1 1
#!/usr/bin/env ruby
2
# thin_threads -
3
#   A munin plugin for Linux to monitor how many threads per thin process
4
#
5
# For Linux ONLY !
6
# DOES NOT WORK on OSX, Solaris or BSD.
7
# only linux, because this script relies on proc filesystem
8
#
9
# Original author:
10
#   Frederico de Souza Araujo - fred.the.master@gmail.com
11
#   http://www.frederico-araujo.com
12
#
13
# Usurper:
14
#   Adam Michel - elfurbe@furbism.com
15
#   http://www.furbism.com
16
#
17
# Originally based on:
18
#   thin_process_memory -
19
#       A munin plugin to monitor memory size of
20
#       each individual thin process
21
#   by Ben VandenBos and Avvo, Inc.
22
#
23
# This program is free software; you can redistribute it and/or modify
24
# it under the terms of the GNU General Public License version 2
25
# as published by the Free Software Foundation.
26
#
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
# GNU General Public License for more details.
31
#
32
# You should have received a copy of the GNU General Public License along
33
# with this program; if not, write to the Free Software Foundation, Inc.,
34
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35
#
36
#
2

  
3
=begin
4

  
5
thin_threads -
6
  A munin plugin for Linux to monitor how many threads per thin process
7

  
8
For Linux ONLY !
9
DOES NOT WORK on OSX, Solaris or BSD.
10
only linux, because this script relies on proc filesystem
11

  
12
Original author:
13
  Frederico de Souza Araujo - fred.the.master@gmail.com
14
  http://www.frederico-araujo.com
15

  
16
Usurper:
17
  Adam Michel - elfurbe@furbism.com
18
  http://www.furbism.com
19

  
20
Originally based on:
21
  thin_process_memory -
22
      A munin plugin to monitor memory size of
23
      each individual thin process
24
  by Ben VandenBos and Avvo, Inc.
25

  
26
This program is free software; you can redistribute it and/or modify
27
it under the terms of the GNU General Public License version 2
28
as published by the Free Software Foundation.
29

  
30
This program is distributed in the hope that it will be useful,
31
but WITHOUT ANY WARRANTY; without even the implied warranty of
32
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33
GNU General Public License for more details.
34

  
35
You should have received a copy of the GNU General Public License along
36
with this program; if not, write to the Free Software Foundation, Inc.,
37
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
38

  
39

  
37 40
#%# family=auto
38 41
#%# capabilities=autoconf
39 42

  
43
=end
44

  
45

  
40 46
module Munin
41 47
  class ThinThreads
42

  
43 48
    def run
44 49
      instances = get_pids()
45 50
      instances.each do |instance|
......
71 76
    def autoconf
72 77
      get_pids().length > 0
73 78
    end
74

  
75 79
  end
76 80
end
77 81

  

Formats disponibles : Unified diff