module Edaemon::Helper::Process

Public Class Methods

list() click to toggle source

:nocov:

# File lib/edaemon/helper/process.rb, line 6
def list
  `ps ax`.split("\n")
end
pids() click to toggle source

:nocov:

# File lib/edaemon/helper/process.rb, line 11
def pids
  list.map { |row| row.scan(/\A {0,}([0-9]{1,})/) }
      .flatten
      .compact
      .uniq
      .map(&:to_i)
      .sort
end