How to check if the PowerChute Network Shutdown daemon is running on Unix/Linux systems
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: