Date: Tue, 27 May 2008 16:20:57 +0400 From: Michael Lednev <michaek@mail.ru> To: freebsd-questions@FreeBSD.ORG, michaek@mail.ru Subject: Re: strange ps behaviour Message-ID: <483BFCA9.9060705@mail.ru> In-Reply-To: <200805271137.m4RBba1j036652@lurza.secnetix.de> References: <200805271137.m4RBba1j036652@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme пишет: > Michael Lednev wrote: > > Oliver Fromme ?????: > > > Michael Lednev wrote: > > > > Oliver Fromme ?????: > > > > > Michael Lednev wrote: > > > > > > # pgrep radiusd > > > > > > 1105 > > > > > > 33738 > > > > > > # ps ax | grep radiusd > > > > > > 1105 ?? Ss 2:35,76 /usr/local/sbin/radiusd > > > > > > # ps 33738 > > > > > > PID TT STAT TIME COMMAND > > > > > > > > > > It seems that the second matching process exited before > > > > > the ps command was executed. > > > > > > > > It's repeatable. > > > > > > That means that the radiusd process kept forking short- > > > lived child processes, for whatever reason. > > > > keeping constant PID for children? > > OK, you didn't mention that it is the same PID every time. > In that case my first suspicion would be a bug in pgrep. > If it happens again, I suggest you use pgrep -lf. Maybe > the output gives a hint. > It happened again. # pgrep -lf radiusd 74847 /usr/local/sbin/radiusd 93248 radiusd There is no /proc/93248 directory, so I assume there's surely no such process. Am I right? > (Also note that ps cuts after 80 columns. Sometimes the > information you're looking for is after column 80, so I > recommend to always use -ww, especially when the output > is used for matching in scripts.) I use pgrep in my script. If I need ps I always use ww, but thanks for suggestion anyway.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?483BFCA9.9060705>