search for: getupsstatus

Displaying 14 results from an estimated 14 matches for "getupsstatus".

2020 Aug 03
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...commands?  I’ve been > looking at the manual and see that you have to escape the internal “ but am > still a little confused on how to do this exactly. This assumes that you use the Bash shell in your default environment. It will need adaption if you use Dash. In .bashrc define function getUPSstatus # Update variable UPSstatus and export to environment # Usage getUPSstatus <myups> function getUPSstatus { export UPSstatus="[$( upsc $1 ups.status 2>/dev/null )]:$( upsc $1 battery.charge 2>/dev/null )" } The SHUTDOWNCMD declaration now simplifies to SHUTDOWN...
2020 Aug 04
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...> the IP address of the NUT Server/Synology?  I’m assuming I would use this > version for use in Dash with Ubuntu, correct? Yes, you replace <myups> with the address of your UPS, for example "ups at 192.168.x.y". Are you using Dash or Bash? If it's Dash, the function getUPSstatus probably goes into .profile . Test on the command line before modifying SHUTDOWNCMD by typing the commands getUPSstatus <myups> echo "UPS status is $UPSstatus" You should see "UPS status is [OL]:100". Roger
2020 Aug 04
0
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...; looking at the manual and see that you have to escape the internal “ but am > > still a little confused on how to do this exactly. > > This assumes that you use the Bash shell in your default environment. It will > need adaption if you use Dash. > > In .bashrc define function getUPSstatus > > # Update variable UPSstatus and export to environment > # Usage getUPSstatus <myups> > function getUPSstatus { > export UPSstatus="[$( upsc $1 ups.status 2>/dev/null )]:$( upsc $1 battery.charge 2>/dev/null )" > } > > The SHUTDOWNCMD declaration now...
2020 Aug 07
4
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...19:44 proton upsmon[1552]: Executing automatic power-fail shutdown So proton is a slave, and is being made to shut down. > Aug  6 19:19:45 proton upsmon[1552]: Auto logout and shutdown proceeding > Aug  6 19:19:50 proton upsmon.conf: UPS status is  The variable USPstatus set by getUPSstatus was not in the environment for the echo command. To get this to work, you'll have to put the upsc commands directly in SHUTDOWNCMD, or create a short script and call the script in SHUTDOWNCMD. > Aug  6 19:19:59 proton upsmon[1545]: UPS: ups at 192.168.1.70 (slave) (power value 1)...
2020 Aug 08
4
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...ee servers. In nut.conf I changed MODE to > "MODE=netclient".  I then added my MONITOR line in upsmon.conf. on all three.  > Looks something like this:   > > MONITOR ups at 192.168.1.70 1 monuser secret slave > > My SHUTDOWNCMD looks like this: > SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0"   >From your previous reports it looks as if getUPSstatus does not work in a SHUTDOWNCMD declaration since the shell variable it creates gets lost. It probably better to declare som...
2020 Aug 04
0
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...of the NUT Server/Synology?  I’m assuming I would use this > > version for use in Dash with Ubuntu, correct? > > Yes, you replace <myups> with the address of your UPS, for example > "ups at 192.168.x.y". Are you using Dash or Bash? If it's Dash, the function > getUPSstatus probably goes into .profile . > > Test on the command line before modifying SHUTDOWNCMD by typing the commands > > getUPSstatus <myups> > echo "UPS status is $UPSstatus" > > You should see "UPS status is [OL]:100". > > Roger > ________________...
2020 Aug 04
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...of the NUT Server/Synology? I’m assuming I would use this > version for use in Dash with Ubuntu, correct? > > > Yes, you replace <myups> with the address of your UPS, for example > "ups at 192.168.x.y". Are you using Dash or Bash? If it's Dash, the function > getUPSstatus probably goes into .profile . > > Test on the command line before modifying SHUTDOWNCMD by typing the > commands > > getUPSstatus <myups> > echo "UPS status is $UPSstatus" > > You should see "UPS status is [OL]:100". > > Roger > ___________...
2020 Aug 08
0
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...anged MODE to > > "MODE=netclient".  I then added my MONITOR line in upsmon.conf. on all three. > > Looks something like this: > > > > MONITOR ups at 192.168.1.70 1 monuser secret slave > > > > My SHUTDOWNCMD looks like this: > > SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0" > > From your previous reports it looks as if getUPSstatus does not work in a > SHUTDOWNCMD declaration since the shell variable it creates gets lost. It > probably better to...
2020 Aug 07
0
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...uot;. I then installed NUT on all three servers. In nut.conf I changed MODE to "MODE=netclient". I then added my MONITOR line in upsmon.conf. on all three. Looks something like this: MONITOR ups at 192.168.1.70 1 monuser secret slave My SHUTDOWNCMD looks like this: SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0" Would that not work? I believe that's what you told me to put there. I think I've definitely made a mistake though, in that I have not set RUN_AS_USER in upsmon.conf and set up...
2020 Aug 04
3
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
Right, but I don't know what NUT script is actually calling it. I don't know how else I would check. On Tue, Aug 4, 2020 at 10:21 AM Manuel Wolfshant <wolfy at nobugconsulting.ro> wrote: > On 8/4/20 4:16 PM, Todd Benivegna wrote: > > Ok, so now that I think of it, that might not actually work when it is > > not run by me. I guess that it all confirms that it works
2020 Aug 05
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...23 11:02 /bin/sh -> dash* Also I did "echo $SHELL" in a terminal window and got "/bin/bash”.  So what I found earlier is true; Bash is used in the Terminal app and Dash is used for scripts. So anyway, I guess that means that it is using Dash then, correct? Ok, so I copied the getUPSstatus function in .profile as well.  So it has been added to both .bashrc and .profile and I have added... SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0" …to my upsmon.conf.  So I think I should be go to go...
2020 Aug 08
1
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...MODE=netclient".  I then added my MONITOR line in upsmon.conf. on all three. > > > Looks something like this: > > > > > > MONITOR ups at 192.168.1.70 1 monuser secret slave > > > > > > My SHUTDOWNCMD looks like this: > > > SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0" > > > > From your previous reports it looks as if getUPSstatus does not work in a > > SHUTDOWNCMD declaration since the shell variable it creates gets lost. It > >...
2020 Aug 08
3
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
...on all three servers. In nut.conf I changed MODE to "MODE=netclient".  I then added my MONITOR line in upsmon.conf. on all three.  Looks something like this: > > MONITOR ups at 192.168.1.70 1 monuser secret slave > > My SHUTDOWNCMD looks like this: > > SHUTDOWNCMD "getUPSstatus ups at 192.168.1.70 ; logger -t upsmon.conf \"UPS status is $UPSstatus\" ; /sbin/shutdown -h +0" > > Would that not work?  I believe that's what you told me to put there. > > I think I've definitely made a mistake though, in that I have not set RUN_AS_USER in upsm...
2020 Aug 05
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
> grep nut /etc/passwd nut:x:129:134::/var/lib/nut:/usr/sbin/nologin > In your manual test do you restore utility power after 3-5 seconds? Yes, I have tried that.  I have also tried less than one second.  I’ve tried for 1-2 minutes, for 3-5 minutes, I’ve tried just about every length of time and all appears Ok when I manually test. -- Todd Benivegna // todd at benivegna.com On Aug 5,