You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
| - unless Rails.env.development? | |
| / Require jQuery | |
| = javascript_include_tag 'http://yandex.st/jquery/1.7.1/jquery.min.js' | |
| / Require Google's jQuery if Yandex is down | |
| :javascript | |
| window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">\x3C/script>') | |
| / Require local jQuery if Google is down / is development env | |
| :javascript | |
| window.jQuery || document.write('<script src="#{asset_path('jquery.js')}">\x3C/script>') |
| require 'socket' | |
| socket = UDPSocket.new | |
| socket.send("I am ok.", 0, 'localhost', 1234) | |
| text, sender = socket.recvfrom(16) | |
| socket.close |
| require 'spec_helper' | |
| describe "HistoryItems" do | |
| before(:each) {login_as :user} | |
| describe "GET /history_items" do | |
| it "works!" do | |
| visit history_items_path | |
| response.should be_success | |
| end | |
| end |
| class Book < ActiveRecord::Base | |
| has_many :pages | |
| belongs_to :p2fline | |
| belongs_to :print_profile | |
| belongs_to :publish_profile | |
| acts_as_audited :except => [:name, :file_name] | |
| include AASM | |
| aasm_column :state |
| # http://unicorn.bogomips.org/SIGNALS.html | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| rails_root = ENV['RAILS_ROOT'] || "/data/github/current" | |
| God.watch do |w| | |
| w.name = "unicorn" | |
| w.interval = 30.seconds # default | |
| # unicorn needs to be run from the rails root |
| set :rails_env, :production | |
| set :unicorn_binary, "/usr/bin/unicorn" | |
| set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
| set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
| namespace :deploy do | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
| end | |
| task :stop, :roles => :app, :except => { :no_release => true } do |