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
- Next message: gopher2: "netbsd /sparc"
- Previous message: Neha: "NetBSD installation"
- In reply to: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Next in thread: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Reply: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: gopher2: "netbsd /sparc"
- Previous message: Neha: "NetBSD installation"
- In reply to: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Next in thread: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Reply: Karsten Kruse: "Re: Any programmatically way to detect if an application is launched in Unix on another computer ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|