Paste
Create
Recent
Log in
Sign up
Command Execution 230228
created by
FredInAZ
will expire in
6 days
Copy link to clipboard
Raw
Moved pwrstatd to /usr/local/bin Adjusted pwrstatd.service to /usr/local/bin ------ [Unit] Description=The monitor UPS software. After=network.target network-online.target nss-lookup.target [Service] Type=forking ExecStart=/usr/local/bin/pwrstatd start ExecStop=/usr/local/bin/pwrstatd stop ExecReload=/usr/local/bin/pwrstatd restart [Install] WantedBy=multi-user.target ------ Moved all pwrstatd other files to /usr/local/pwrstatd/ ------ freda@localhost.heavy1] ~ $ ls /usr/local/pwrstatd hibernate.sh pwrstatd.ckey pwrstatd-lowbatt.sh pwrstatd.cacrt pwrstatd.conf pwrstatd-powerfail.sh pwrstatd.ccrt pwrstatd-email.sh shutdown.sh freda@localhost.heavy1] ~ $ ------ Ran systemctl daemon-reload Shutdown pwrstatd daemon ------ localhost:~ # pwrstat -status Daemon service is not found. localhost:~ # ------ * pwrstatd.service - The monitor UPS software. Loaded: loaded (/etc/systemd/system/pwrstatd.service; disabled; vendor preset: disabled) Active: inactive (dead) Feb 26 13:42:41 localhost.heavy1 systemd[1]: Starting The monitor UPS software.... Feb 26 13:42:41 localhost.heavy1 pwrstatd[12185]: Starting pwrstatd 1.4.1..done Feb 26 13:42:41 localhost.heavy1 systemd[1]: Started The monitor UPS software.. Feb 28 11:44:30 localhost.heavy1 systemd[1]: Stopping The monitor UPS software.... Feb 28 11:44:32 localhost.heavy1 pwrstatd[15423]: Shutting down pwrstatd 1.4.1..done Feb 28 11:44:32 localhost.heavy1 systemd[1]: pwrstatd.service: Deactivated successfully. Feb 28 11:44:32 localhost.heavy1 systemd[1]: Stopped The monitor UPS software.. ------ Initiated Service Change The following services(1) will be configured to start after booting: pwrstatd Apply all changes? click yes Writing the configuration failed: Could not set 'pwrstatd' to be started on boot. Would you like to continue editing? click continue Status returned to prior status ------ As ROOT localhost:~ # pwrstatd start & [1] 21248 localhost:~ # pwrstat -status The UPS information shows as following: Properties: Model Name................... CP1500PFCLCD Firmware Number.............. CR01002H8S1 Rating Voltage............... 120 V Rating Power................. 900 Watt Current UPS status: State........................ Normal Power Supply by.............. Utility Power Utility Voltage.............. 125 V Output Voltage............... 125 V Battery Capacity............. 100 % Remaining Runtime............ 69 min. Load......................... 108 Watt(12 %) Line Interaction............. None Test Result.................. Passed at 2023/02/22 21:45:39 Last Power Event............. None localhost:~ # echo $PATH /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin llocalhost:~ # ------ Stopped pwrstatd via kill -sigterm -- multiple occurances Verified all pwrstatd not executing Using Servises Manager (YAST) Clicked Start for pwrstatd and Apply ------ * pwrstatd.service - The monitor UPS software. Loaded: loaded (/etc/systemd/system/pwrstatd.service; disabled; vendor preset: disabled) Active: active (running) since Tue 2023-02-28 12:26:18 MST; 5min ago Process: 589 ExecStart=/usr/local/bin/pwrstatd start (code=exited, status=0/SUCCESS) Main PID: 596 (pwrstatd) Tasks: 1 (limit: 4915) CGroup: /system.slice/pwrstatd.service `- 596 /usr/sbin/pwrstatd Feb 28 12:26:18 localhost.heavy1 systemd[1]: Starting The monitor UPS software.... Feb 28 12:26:18 localhost.heavy1 pwrstatd[589]: Starting pwrstatd 1.4.1..done Feb 28 12:26:18 localhost.heavy1 systemd[1]: Started The monitor UPS software.. ------ localhost:~ # ps -e | grep pwrstat 596 ? 00:00:00 pwrstatd localhost:~ # pwrstat -status The UPS information shows as following: Properties: Model Name................... CP1500PFCLCD Firmware Number.............. CR01002H8S1 Rating Voltage............... 120 V Rating Power................. 900 Watt Current UPS status: State........................ Normal Power Supply by.............. Utility Power Utility Voltage.............. 125 V Output Voltage............... 125 V Battery Capacity............. 100 % Remaining Runtime............ 68 min. Load......................... 108 Watt(12 %) Line Interaction............. None Test Result.................. Passed at 2023/02/22 21:45:39 Last Power Event............. None localhost:~ #