[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killed wrong proc!

From: Sven Mueller
Subject: Re: Killed wrong proc!
Date: Wed, 22 Sep 2004 17:54:02 +0200
User-agent: Thunderbird 0.7.3 (Windows/20040803)

Sven Mueller [u] wrote on 22/09/2004 14:04:

Chip Seraphine [u] wrote on 22/09/2004 13:45:

OK, thanks, Mark. I see that now. I thought it was matching only on arg0, but it's just a pattern match against the entire line of 'ps' output...

So what's the canonical workaround? I'm sure almost everybody has the similar problem from time to time, right?

"^[^ ]postfix "
in your case.

I would guess ;-)

OK, here is a better guess. cfengine seems to match against the full line "ps auxw" or similar returns. In my case for syslog-ng, that line looks like this:

syslog 12067 0.0 0.0 1748 868 ? S Sep18 0:00 /usr/sbin/syslog-ng -u syslog -g audit


syslog 12067 0.0 0.0 1748 868 ? S Sep18 0:00 syslog-ng -u syslog -g audit

All on one line of course.

So the regexp I ended up using is:

"[0-9]:[0-9][0-9] [^ ]*syslog-ng "

I use the time information before ARGV[0] as an anchor. Another possibility would be some regexp that tries to fetch all the field before ARGV[0] to make sure there is no match of that regexp after ARGV[0].

All of which aren't really nice.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]