Skip to content

Commit

Permalink
Added script/process/inspector to do simple process status informatio…
Browse files Browse the repository at this point in the history
…n on Rails dispatchers keeping pid files in tmp/pids [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Apr 28, 2006
1 parent de69de1 commit b792945
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Added script/process/inspector to do simple process status information on Rails dispatchers keeping pid files in tmp/pids [DHH]

* Added pid file usage to script/process/spawner and script/process/reaper along with a directive in default config/lighttpd.conf file to record the pid. They will all save their pid file in tmp/pids [DHH]


Expand Down
2 changes: 1 addition & 1 deletion railties/Rakefile
Expand Up @@ -41,7 +41,7 @@ LOG_FILES = %w( server.log development.log test.log production.log )
HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico images/rails.png
javascripts/prototype.js javascripts/application.js
javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
BIN_FILES = %w( about breakpointer console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner runner server plugin )
BIN_FILES = %w( about breakpointer console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin )

VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )

Expand Down
3 changes: 3 additions & 0 deletions railties/bin/process/inspector
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
7 changes: 4 additions & 3 deletions railties/lib/commands/process/inspector.rb
Expand Up @@ -44,11 +44,12 @@ def pid_files

opts.on <<-EOF
Description:
Get the lowdown on processes.
Displays system information about Rails dispatchers (or other processes that use pid files) through
the ps command.
Examples:
inspector
inspector -s 'ps -o user,start,majflt,pcpu,vsz -p %s'
inspector # default ps on all tmp/pids/dispatch.*.pid files
inspector -s 'ps -o user,start,majflt,pcpu,vsz -p %s' # custom ps, %s is where the pid is interleaved
EOF

opts.on(" Options:")
Expand Down
Expand Up @@ -51,7 +51,7 @@ def manifest
m.file "environments/test.rb", "config/environments/test.rb"

# Scripts
%w( about breakpointer console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner runner server plugin ).each do |file|
%w( about breakpointer console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin ).each do |file|
m.file "bin/#{file}", "script/#{file}", script_options
end

Expand Down

0 comments on commit b792945

Please sign in to comment.