Re: apache run status: how to tell as non-root user (on *nix)?

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

 



the existence of the PID file only gives a hint; its contents (the PID of the process) should then be checked to see if that particular process is indeed (still) running.


Citeren Rainer Canavan <rainer.canavan@xxxxxxxxxxxx>:

On Tue, Feb 21, 2017 at 2:53 PM, Tom Browder <tom.browder@xxxxxxxxx> wrote:
I need to programatically determine whether httpd is running or not, whether
I'm root or not. The only reliable way I have found is to use the system
command 'ps -C httpd' and grep the results.

Is there a better way?
If you know where the .pid file is, you can read that and check if the
process is
running, e.g. via ps --pid `cat /var/run/apache2.pid`


rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.orgFor additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux