Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to retrieve the actual arguments being used in the sendmail daemon

10 views
Skip to first unread message

BILL

unread,
Jul 22, 2012, 11:45:26 PM7/22/12
to
On Linux, ps -ef |grep sendmail, it returns something like this:

root 1920 1 0 10:13 ? 00:00:00 sendmail: accepting connections
smmsp 19211 1 0 10:13 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

I know the "sendmail: accepting connections" is for displaying purpose. Do we have a way to retrive the real arguments for a running process if the arg[0] is set to something else in the end of the program?
Thanks.

BILL

unread,
Jul 25, 2012, 10:28:08 AM7/25/12
to
On Sunday, July 22, 2012 11:45:26 PM UTC-4, BILL wrote:
> On Linux, ps -ef |grep sendmail, it returns something like this:
>
> root 1920 1 0 10:13 ? 00:00:00 sendmail: accepting connections
> smmsp 19211 1 0 10:13 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
>
> I know the "sendmail: accepting connections" is for displaying purpose. Do we have a way to retrive the real arguments for a running process if the arg[0] is set to something else in the end of the program?
> Thanks.


Someone in the sendmail group replied:

cat `grep '^O PidFile=' /etc/mail/se*cf | sed -e 's/^.*=//'`

as sendmail keep a PidFile to record the actually command the arguments. Now the question becomes a more OS-related... if the arg[] is set to a displaying title (which will be what ps -ef shows), and the program doesn't keep a PidFile, do we still have the info somewhere in the kernel?

0 new messages