How to check if the PowerChute Network Shutdown daemon is running on Unix/Linux systems?
PowerChute Network Shutdown
Once the PowerChute Network Shutdown(PCNS) daemon starts, a file named pcns.pid should be created in the directory where the program is installed. Once the PowerChute daemon stops, the pcns.pid file should be gone. This file stores the PowerChute daemon pid (process id).
Notes :The default installation directory for PowerChute Network Shutdown 2.2.X and higher is /opt/APC/PowerChute/group1 and the default installation directory for PowerChute Network Shutdown2.1.x and PowerChute Network Shutdown 2.0.x is /bin/PowerChute. Unix are case sensitive.
To check if the PowerChute daemon is running on Unix/Linux system, you will need to do as follows:
step 1: get PowerChute daemon pid
The command "cat" or "more" can be used to display the contents of the file pcns.pid .You can also use vi which is full screen editor to open the pcns.pid file to display the PCNS daemon pid. The command need to be entered is shown below :
# cat <installation directory>/pcns.pid
# more <installation directory>/pcns.pid
# vi <installation directory>/pcns.pid
Note:where installation directory is the directory that PowerChute is installed.
The command will display the PowerChute daemon pid on the screen.
step 2:grep for the PowerChute daemon
use the following command to grep the PowerChute daemon
# ps -ef | grep pid
Note where pid is the PowerChute daemon pid you get in step 1.
If the PowerChute daemon is running on the system, the command will return something similar to the following:
root 12728 1 0 14:26:04 pts/3 0:11 /opt/java/jre/bin ../bin/PARISC/green_threads/jre -cp .
root 13168 3993 1 14:28:59 pts/2 00:00 grep 12728
Please note that PowerChute is a Java process and only Java related information is returned.
If the PowerChute daemon is not running or not running normally, the command will only return one line that stands for the grep process itself.