barttenbrinke / munin-plugins-rails

Collection of munin plugins for ruby on rails server environments
railsdoctors.com
165 stars 34 forks source link

passenger memory stats no longer have a total RSS #27

Open micah opened 9 years ago

micah commented 9 years ago

The memory stats plugin is looking for this regexp in the output of passenger-memory-stats:

stats =~ /RSS:\s_([\d.]+)\s_MB\Z/m

but the output of passenger-memory-stats has this:

Version: 4.0.53
Date   : 2015-05-21 08:22:20 -0700

----------- Apache processes -----------
PID    PPID   VMSize     Resident  Name
----------------------------------------
7312   28424  1985.7 MB  16.5 MB   /usr/sbin/apache2 -k start
7575   28424  1985.5 MB  16.1 MB   /usr/sbin/apache2 -k start
27860  28424  1985.1 MB  16.1 MB   /usr/sbin/apache2 -k start
28424  1      102.4 MB   8.8 MB    /usr/sbin/apache2 -k start

-------- Nginx processes ---------

------ Passenger processes ------
PID    VMSize     Resident  Name
---------------------------------
1323   484.4 MB   247.7 MB  Passenger RackApp: /srv/crabgrass
2437   421.2 MB   231.2 MB  Passenger RackApp: /srv/crabgrass
6871   422.6 MB   233.2 MB  Passenger RackApp: /srv/crabgrass
7548   421.3 MB   210.8 MB  Passenger RackApp: /srv/crabgrass
15553  356.2 MB   162.6 MB  Passenger RackApp: /srv/crabgrass
24354  218.0 MB   3.2 MB    PassengerWatchdog
24358  1338.9 MB  7.3 MB    PassengerHelperAgent
24365  221.3 MB   8.5 MB    PassengerLoggingAgent
whatcould commented 8 years ago

At the very end of the output, in both Passenger 4 and 5, should be this:

### Processes: 4
### Total private dirty RSS: 79.95 MB

This is what it's parsing, and it works for me in both versions (on my fork). Maybe you missed the couple lines at the end of the output.