Class: Specinfra::Command::Freebsd::Base::Process
- Inherits:
-
Base::Process
- Object
- Base
- Base::Process
- Specinfra::Command::Freebsd::Base::Process
- Defined in:
- lib/specinfra/command/freebsd/base/process.rb
Class Method Summary collapse
- .check_count(process, count) ⇒ Object
- .check_is_running(process) ⇒ Object
- .count(process) ⇒ Object
- .get(process, opts) ⇒ Object
Methods inherited from Base
Class Method Details
.check_count(process, count) ⇒ Object
15 16 17 |
# File 'lib/specinfra/command/freebsd/base/process.rb', line 15 def check_count(process,count) "test `pgrep #{escape(process)} | wc -l` -eq #{escape(count)}" end |
.check_is_running(process) ⇒ Object
11 12 13 |
# File 'lib/specinfra/command/freebsd/base/process.rb', line 11 def check_is_running(process) "pgrep -q #{escape(process)}" end |
.count(process) ⇒ Object
7 8 9 |
# File 'lib/specinfra/command/freebsd/base/process.rb', line 7 def count(process) "pgrep #{escape(process)} | wc -l" end |
.get(process, opts) ⇒ Object
3 4 5 |
# File 'lib/specinfra/command/freebsd/base/process.rb', line 3 def get(process, opts) "ps -p `pgrep -xn #{escape(process)}` -o #{opts[:format]}" end |