[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Most Pathetic Request Of The Day
On Sat, Jul 12, 2003 at 05:19:43PM +0100, Alec Melling wrote:
> Hi,
>
> I want to check to see if spamd is running on my system. To do it I understand
> that I need to run the following command(s)
>
> ps -ef grep spamd or ps aux grep spamd
>
> Both commands require a vertical line before 'grep'.
That's the 'pipe' symbol.
>
> Told you this was pathetic... I am going mad trying to type the vertical line.
> I can see it on the keyboard, on a key that seems to have three functions " `
> ¬ " being two of them. How the hell do you get it to type the vertical line?
>
That works, but my main pipe key is next to my 'Z' key, between that and
the shift key.
> Pathetic - yes... But I have been good, I have gone on the net, found out what
> I need to do to speed up spamassassin and am ready to do it. But I am stumped
> by this **** key and I have feeling that I am going to have to use it again.
Oh yes, it's one of the main keys used to pipe the output from one
command to another.
If you really can't get it, you can use files for the job.
ps aux > tempfile
grep spamd < tempfile
Would work in a pinch.
Another excelent command is pgrep. It's like ps aux and grep rolled into
one.
Type
pgrep spamd
And you get back the pid of the process(s) if they're running, or
nothing if they're not.
Example.
matthew@taz:/usr/home/matthew$ ps ax | grep httpd
499 ? S 0:00 /usr/local/apache/bin/httpd
11644 ? S 0:03 /usr/local/apache/bin/httpd
11663 ? S 0:06 /usr/local/apache/bin/httpd
11720 ? S 0:03 /usr/local/apache/bin/httpd
12294 ? S 0:03 /usr/local/apache/bin/httpd
12861 ? S 0:03 /usr/local/apache/bin/httpd
14240 ? S 0:02 /usr/local/apache/bin/httpd
14241 ? S 0:03 /usr/local/apache/bin/httpd
15312 ? S 0:01 /usr/local/apache/bin/httpd
16039 pts/0 R 0:00 grep httpd
matthew@taz:/usr/home/matthew$ pgrep httpd
499
11644
11663
11720
12294
12861
14240
14241
15312
Hope this helps!
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.