Friday, July 25, 2008

Passenger on CentOS, problems with passenger-memory-stats

I was having difficult running passenger-memory-stats, I was getting:

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:145:in `list_processes': Invalid options. (ArgumentError)
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:107:in `start'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats:214
from /usr/bin/passenger-memory-stats:19:in `load'
from /usr/bin/passenger-memory-stats:19


After googling around, I found a post that said:

For those on CentOS/RHEL change line 107 in /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.2/bin/passenger-memory-stats from:

apache_processes = list_processes(:exe => PlatformInfo::HTTPD)

to

apache_processes = list_processes(:exe => 'httpd.worker')

This worked like a charm!

0 comments: