<div dir="ltr">HI<div>in centos: C="/usr/bin/upssched-cmd" <div><br></div><div>here is the output of that file:</div><div><br></div><div><div># more /tmp/NUT.report</div><div>        NUT configuration        2016-05-10 03:02:20 UTC</div><div><br></div><div>        ########### /etc/ups/nut.conf ###########</div><div>MODE=netserver</div><div><br></div><div>        ########### /etc/ups/ups.conf ###########</div><div>[cyberpower]</div><div><span class="" style="white-space:pre">      </span>#driver = powerpanel</div><div><span class="" style="white-space:pre">       </span>#port = auto</div><div><span class="" style="white-space:pre">       </span>driver = usbhid-ups</div><div><span class="" style="white-space:pre">        </span>port = auto</div><div><span class="" style="white-space:pre">        </span>vendorid = 0764</div><div><span class="" style="white-space:pre">    </span>desc = " My main server 19"</div><div><br></div><div>        ########### /etc/ups/upsd.conf ###########</div><div>LISTEN 127.0.0.1 3493</div><div>LISTEN 192.168.1.19 3493</div><div>LISTEN ::1 3493</div><div><br></div><div>        ########### /etc/ups/upsd.users ###########</div><div>[admin]</div><div><span class="" style="white-space:pre">  </span>password = *********</div><div><span class="" style="white-space:pre">       </span>actions = SET</div><div><span class="" style="white-space:pre">      </span>instcmds = ALL</div><div>[upsmon]</div><div><span class="" style="white-space:pre">      </span>password = *********</div><div><span class="" style="white-space:pre">       </span>upsmon master</div><div>[upsmonslave]</div><div><span class="" style="white-space:pre">  </span>password = *********</div><div><span class="" style="white-space:pre">       </span>upsmon slave </div><div><br></div><div>        ########### /etc/ups/upsmon.conf ###########</div><div>MONITOR cyberpower@localhost 1 upsmon ********* master</div><div>MINSUPPLIES 1</div><div>SHUTDOWNCMD "/sbin/shutdown -hP +0"</div><div>POLLFREQ 5</div><div>POLLFREQALERT 5</div><div>HOSTSYNC 15</div><div>DEADTIME 15</div><div>POWERDOWNFLAG /etc/killpower</div><div>NOTIFYMSG LOWBATT<span class="" style="white-space:pre"> </span>"UPS %s battery is low"</div><div>NOTIFYMSG FSD<span class="" style="white-space:pre">             </span>"UPS %s: forced shutdown in progress"</div><div>NOTIFYMSG SHUTDOWN<span class="" style="white-space:pre">  </span>"Auto logout and shutdown proceeding"</div><div>NOTIFYMSG REPLBATT<span class="" style="white-space:pre">  </span>"UPS %s battery needs to be replaced"</div><div>NOTIFYMSG NOCOMM<span class="" style="white-space:pre">    </span>"UPS %s is unavailable"</div><div>NOTIFYMSG NOPARENT<span class="" style="white-space:pre">        </span>"upsmon parent process died - shutdown impossible"</div><div>NOTIFYFLAG LOWBATT<span class="" style="white-space:pre">     </span>SYSLOG+WALL</div><div>NOTIFYFLAG SHUTDOWN<span class="" style="white-space:pre">     </span>SYSLOG+WALL</div><div>NOTIFYFLAG REPLBATT<span class="" style="white-space:pre">     </span>SYSLOG+WALL</div><div>NOTIFYFLAG NOCOMM<span class="" style="white-space:pre">       </span>SYSLOG+WALL</div><div>NOTIFYFLAG NOPARENT<span class="" style="white-space:pre">     </span>SYSLOG+WALL</div><div>RBWARNTIME 43200</div><div>NOCOMMWARNTIME 300</div><div>FINALDELAY 5</div><div><br></div><div>        ########### /etc/ups/upssched.conf ###########</div><div>CMDSCRIPT /usr/bin/upssched-cmd</div><div><br></div><div>        ########### /usr/bin/upssched-cmd ###########</div><div>case $1 in</div><div><span class="" style="white-space:pre">   </span>upsgone)</div><div><span class="" style="white-space:pre">           </span>logger -t upssched-cmd "The UPS has been gone for awhile"</div><div><span class="" style="white-space:pre">                </span>;;</div><div><span class="" style="white-space:pre"> </span>*)</div><div><span class="" style="white-space:pre">         </span>logger -t upssched-cmd "Unrecognized command: $1"</div><div><span class="" style="white-space:pre">                </span>;;</div><div>esac</div><div><br></div><div>        ########### /etc/hosts.allow ###########</div><div><br></div><div>        ########### ps aux ###########</div><div>nut       2651  0.0  0.0  43396  1116 ?        Ss   May07   0:08 /usr/sbin/upsd</div><div>root      2654  0.0  0.0  39116  1172 ?        Ss   May07   0:00 /usr/sbin/upsmon</div><div>nut       2655  0.0  0.0  41208  1300 ?        S    May07   0:03 /usr/sbin/upsmon</div><div><br></div><div>        ########### Ownership and permissions ###########</div><div>-rwxr-xr-x. 1 root root 64824 May 15  2013 /usr/sbin/upsd*</div><div>-rwxr-xr-x. 1 root root 44296 May 15  2013 /usr/sbin/upsmon*</div><div>-rwxr-xr-x. 1 root root 28816 May 15  2013 /usr/sbin/upssched*</div><div>-rw-r-----. 1 root nut   1554 Mar 22  2014 /etc/ups/nut.conf</div><div>-rw-r-----. 1 root nut   3797 Mar 22  2014 /etc/ups/ups.conf</div><div>-rw-r-----. 1 root nut   2807 Mar 22  2014 /etc/ups/upsd.conf</div><div>-rw-r-----. 1 root nut   2294 May  7 14:28 /etc/ups/upsd.users</div><div>-rw-r-----. 1 root root  2131 Mar 22  2014 /etc/ups/upsd.users.orig</div><div>-rw-r-----. 1 root nut  11948 May 11  2014 /etc/ups/upsmon.conf</div><div>-rw-r-----. 1 root root 11913 Mar 22  2014 /etc/ups/upsmon.conf.orig</div><div>-rw-r-----. 1 root nut   3891 May 15  2013 /etc/ups/upssched.conf</div></div><div><br></div></div><div><br></div><div>min</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 9, 2016 at 6:00 AM, Roger Price <span dir="ltr"><<a href="mailto:roger@rogerprice.org" target="_blank">roger@rogerprice.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, 8 May 2016, Min Wang wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
centos 6.3 uses traditional SysV script ( not systemctl)<br>
<br>
here is the /etc/init.d/ups ( script) assuming it similar to nutshutdown<br>
</blockquote>
<br></span>
File /etc/init.d/ups is an administrative script which is used to set up the nut daemon - I was looking for a run-time script called by systemd, but since there is no systemd, could you run the attached Bash script which will prepare a report on your NUT configuration for you to post. Perhaps this will show what is not sending the "upsdrvctl shutdown" order.<br>
<br>
Check the address C="/usr/sbin/upssched-cmd" You may not have a file upssched-cmd, or CentOS may put this somewhere else.<br>
<br>
Roger<br>
<br>
#!/bin/bash<br>
# Report NUT configuration<br>
# Remove comments, blank lines and passwords<br>
<br>
C="/usr/sbin/upssched-cmd" # Please check !!<br>
D="/etc/ups"               # Where does CentOS hide the UPC configuration?<br>
T=`mktemp`                 # Temporary file<br>
R="/tmp/NUT.report"        # T without passwords<br>
<br>
echo -e "        NUT configuration        `date --utc '+%Y-%m-%d %T %Z'`" > $T<br>
<br>
# Configuration files, remove comments and empty lines<br>
RE="^#.*$|^[[:space:]]*$"<br>
for F in $D/nut.conf $D/ups.conf $D/upsd.conf $D/upsd.users $D/upsmon.conf $D/upssched.conf $C<br>
 do echo -e "\n        ########### $F ###########" >> $T<br>
   if [[ -f "$F" && -r "$F" ]] ; then<br>
      cat $F | grep -v -E "$RE" >> $T<br>
   else echo "Cannot access $F" >> $T<br>
   fi<br>
 done<br>
# Get upsd rules out of hosts.allow<br>
HA="/etc/hosts.allow"<br>
echo -e "\n        ########### $HA ###########" >> $T<br>
if [[ -f "$HA" && -r "$HA" ]] ; then<br>
    grep -v -E "^#.*$|^[[:space:]]*$" < $HA |<br>
    while read L || [[ -n "$L" ]]<br>
    do if [[ "$L" =~ ^.*(upsd.*)$ ]]<br>
       then TRIM=$L  # Bash removes unwanted white space<br>
            echo $TRIM >> $T<br>
       fi<br>
    done<br>
else echo "Cannot access $HA" >> $T<br>
fi<br>
<br>
# Processes<br>
echo -e "\n        ########### ps aux ###########" >> $T<br>
ps aux | grep "/ups" | grep -v "grep" >> $T<br>
<br>
# Ownership and permissions<br>
echo -e "\n        ########### Ownership and permissions ###########" >> $T<br>
ls -alF /usr/sbin/ups* >> $T<br>
ls -alF /etc/ups/* | grep -v -E "~|stats|set" >> $T<br>
<br>
# Remove password from report<br>
L=`grep password $T | tr -d " \t\n\r"`<br>
if [[ "$L" =~ ^.*=(.+)$ ]]<br>
then PASS="${BASH_REMATCH[1]}"<br>
      sed "s/$PASS/*********/" < $T > $R<br>
else # Could not find a password<br>
      cat $T > $R<br>
fi<br>
<br>
echo "I have created file \"$R\" with a summary of your NUT configuration."<br>
echo "Passwords have been removed."<br>
rm $T;<br>
exit<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@lists.alioth.debian.org" target="_blank">Nut-upsuser@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><a href="http://www.comrite.com" target="_blank">http://www.comrite.com</a><br>Yellow pages, Ads and Search <br><br><a href="http://www.meidongnet.com" target="_blank">http://www.meidongnet.com</a><br>News, Ads, Free Online dating, Games for Chinese Community in NY, NJ, PA</div>
</div>