Re: Any programmatically way to detect if an application is launched in Unix on another computer ?

From: Joel Reicher (joel_at_panacea.null.org)
Date: 09/21/04


Date: Tue, 21 Sep 2004 14:18:24 GMT

Karsten Kruse <tecneeq@tecneeq.de> writes:

> Add this to /etc/inetd.conf:
> 56789 stream tcp nowait nobody /bin/ps ps aux
>
> Start inetd.
>
> On the Clientside do this in /bin/sh:
>
> telnet hostname 56789 2>/dev/null | grep apache >/dev/null \
> || echo "Apache not running"

It would be better for the `server' to check for the presence (and
contents) of something like httpd.pid, which might be in /var/run or
/usr/local/apache/logs, rather than run ps and give back the output.

Checking for .pid files will almost always be better than `parsing'
the output of ps, which was never intended to be `parsed'.

Cheers,

        - Joel



Relevant Pages

  • Root .profile $PS prompts showing for all telnet connections from all users ?
    ... Following wrong method when restarting inetd (seems ... The server I am working on is a V880 with Solaris 8 and recent patching. ... My main problem is when -ANY- user logs-in to my Solaris 8 server over telnet, ... I do not see this problem using any other remote connection utility like ...
    (SunManagers)
  • Re: Postfix smtpd DNS lookup delay
    ... a secondary isn't going to do the server any good. ... The DNS/postfix box is in fact only on a private subnet, ... Err am not running an mail system under inetd. ... postfix has some real good facilities or logging. ...
    (alt.os.linux.suse)
  • Re: inetd wierd behaviour with instances limit
    ... > If I try to connect to the server usint netcat, ... > $ nc neptune countd ... Because now inetd has closed the listening socket. ...
    (comp.unix.programmer)
  • RE: starting daemons at server start
    ... Super server. ... But instead of an daemon running for telnet ... Inetd runs and listens on the ports where those ... spawned an telnet server session. ...
    (freebsd-questions)
  • Re: ProFTPd installation / configuration help needed
    ... it will be started by the inetd daemon upon connection. ... > # example entry for the optional nntp server ... > # example entry for the optional uucpd server ... > # samba configuration tool. ...
    (freebsd-questions)