TIP: ps -ax | grep (was Re: syslog daemon is dying)
On Wed, 20 Nov 1996, Branden Robinson wrote:
> ./etc/init.d/sysklogd restart; ps -ax | grep syslogd; ps -ax | grep klogd
>
quick tip (totally unrelated to the syslogd problem, but useful anyway):
instead of the above line, use
./etc/init.d/sysklogd restart; ps -axc | grep syslogd\\\|klogd
or
./etc/init.d/sysklogd restart; ps -axc | grep "syslogd\|klogd"
e.g.
$ ps -axc | grep syslogd\\\|klogd
266 ? S 1:07 syslogd
268 ? S 0:00 klogd
it will run faster because it only has to run one instance each of ps and
grep rather than two each.
The "-c" option to 'ps' tells ps to display just the command and not
the arguments, which eliminates the need for a clumsy "grep -v grep"
pipe to get rid of the grep line in ps' output.
Craig
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: