Questions tagged [pgrep]
7 questions
6
votes
2 answers
Is this many Apache instances normal?
We run Apache version 2.2.8-1ubuntu0.15 on our VPS instance of Ubuntu 8.04.4 LTS \n \l, as I determined by asking this question.
When I issue pgrep apache2, I get the following:
…

Iain Samuel McLean Elder
- 1,232
- 4
- 15
- 27
5
votes
2 answers
pgrep returns extra processes when piped by other commands
Here is a very strange question about using pgrep to search which shell processes are running the same script as the current one.
Here is the test script named test.sh
#!/bin/bash
full_res=`pgrep -a -l -f 'test\.sh'`
res=$(pgrep -a -l -f…

machinarium
- 203
- 1
- 2
- 6
4
votes
2 answers
pgrep search multiple words
I'm using pgrep to find running processes having some words
> pgrep -f "otp"
2345
2343
More than one process is identified. There is another word in the command line that would help me zero in to the exact process. So, I want to search for two…

Nikhil VJ
- 161
- 1
- 6
4
votes
2 answers
puppet onlyif with pgrep does not work
I want to use an exec in puppet onlyif its process is NOT running
exec { "execute me":
onlyif => "pgrep -fc 'ruby execute.rb'",
command => "execute me",
}
So on the above case, if the process 'ruby execute.rb' is already running, the…

Spyros Lambrinidis
- 636
- 7
- 8
3
votes
2 answers
pgrep wget: what is the details of process id?
when typing pgrep wget, it show process id 10144
but how to know what is the details of this process id

kopeklan
- 169
- 2
- 2
- 6
1
vote
1 answer
The ssh-agent process is not visible to the user who created it but is visible to root
I have adopted the following snippet from Visual Studio Code's documentaion to create an ssh-agent on login:
if [ -z "$SSH_AUTH_SOCK" ]; then
# Check for a currently running instance of the agent
RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' |…

Matt
- 111
- 4
0
votes
1 answer
How can I find a specific PHP process with pgrep (monit related)
I've got a number of php processes that I'm running in the background, with monit as the manager for them. My current config for monit looks like:
check process myprocess1
matching "process1.php"
start program = "/usr/bin/php…

Jim Miller
- 713
- 2
- 11
- 23