Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84244members
353343posts

Cannot Get Command File to Run after Runtime Below Threshold

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

cgsm
Crewman
Crewman
0 Likes
9
303

Cannot Get Command File to Run after Runtime Below Threshold

I have 2x identical UPSs running the "left" and "right" sides of my rack.  All equipment in the rack is powered by both PSUs.  The UPSs currently have 1h 50m of runtime and 35m of runtime just based on the current load distribution.

 

I am trying to configure a command file to run when my runtime is below a set value.  Is the threshold based on the sum of the runtimes from both UPSs?  Or is the threshold based on the lower of the two runtimes remaining?

 

I tested my command file by setting the threshold to a huge value (3 hours, 10,8000 seconds), pulling one the UPSs AC supply cables, and nothing...the command file would not run.  The command file does run if triggered manually.  I don't see anything in the event logs that provides any help.  What am I doing wrong here?

 

The end-goal is to have two command files:

  1. The first, to run a command file that shuts down some less important stuff (via UPS on battery event, say after 5 minutes of on-battery time).
  2. The second, to run a command file that shuts down highly important stuff (via the Runtime remaining below threshold, say 20 minutes remaining).

 

For reference:

  • Low Battery Duration is 20 minutes.  
  • Basic Low Battery Duration is 120 seconds.
  • Sleep Time is 0.0 hours.
  • PowerChute 4.4.1.
  • NMC3 AP9640

 

I would appreciate any help.

 

 

Tags (1)
9 Replies 9
BillP
Administrator Administrator
Administrator
0 Likes
8
282

Re: Cannot Get Command File to Run after Runtime Below Threshold

@cgsm 

 

I assume you have configured PCNS with redundant UPS? If so, they both would be required to fall below the threshold before the command file runs. 

Tags (1)
cgsm
Crewman
Crewman
0 Likes
7
241

Re: Cannot Get Command File to Run after Runtime Below Threshold

@BillP 

 

Yes, I have set up PCNS with redundant UPS.

 

If I understand you correctly, both UPSes would need to independently, not combined, reach the threshold I define for the command script to run.  Is this correct?

 

In this case, how do you suggest testing PCNS and the events/command scripts?  I was simply pulling the AC supply plug to the UPS to try and trip the event.  Based on your comment, the event will never get triggered.  Obviously, pulling the AC supply to both UPSes is not exactly ideal.  Thus, I ask, how do I test PCNS events to make sure the command scrips run?

 

Thanks

Tags (1)
BillP
Administrator Administrator
Administrator
0 Likes
6
228

Re: Cannot Get Command File to Run after Runtime Below Threshold

@cgsm 

 

If you want to test the UPS on battery event, you need to switch each UPS to run on battery. Just disable shutdown when UPS is on battery, so the shutdown is not triggered but leaves the command file enabled. Or, if you just want to test to verify PCNS will trigger the script, edit the pcnsconfig.ini file and add the command file to

 

event_MonitoringStarted_enableCommandFile = true
event_MonitoringStarted_commandFilePath = /opt/APC/PowerChute/user_files/myscript.sh

 

Once pcnsconfig.ini has been edited, stop the PowerChute service. The command is systemctl stop PowerChute. Wait 30 seconds and restart systemctl start PowerChute. The PowerChute service will start, monitoring will start, and the script will be triggered.

 

Once PowerChute has run the script it will add cmdfile.log to /opt/APC/PowerChute/group1

Tags (1)
cgsm
Crewman
Crewman
0 Likes
5
204

Re: Cannot Get Command File to Run after Runtime Below Threshold

@BillP 

 

Wow, is testing more convoluted than I expect.  I would have thought there was a "test command file" or "test event" functionality in the web GUI.  There should be!  Anyway, testing via the manner you provided does work even if it is a bit "hacky".

 

 

Back to my original question about "threshold".  Is the threshold of runtime remaining a sum of both UPSs?  Is the threshold the lesser of the two?  Is the threshold the greater of two?  The two, redundantly set up, UPSs could have unbalanced loads and therefore unequal runtimes remaining so I do not understand how to set the threshold, in seconds, for the event.

Tags (1)
BillP
Administrator Administrator
Administrator
0 Likes
4
191

Re: Cannot Get Command File to Run after Runtime Below Threshold

@cgsm 

 

When you configure "Runtime remaining below threshold" to trigger a shutdown, the shutdown process will begin when the UPS runtime falls below the set number. Example: threshold has been set at 900 seconds. The shutdown process will start when the runtime falls below 900 seconds (15 minutes).

When configuring with redundant UPS, both UPSs runtime would need to fall below the set threshold for the shutdown process to begin.

 

Tags (1)
cgsm
Crewman
Crewman
0 Likes
2
188

Re: Cannot Get Command File to Run after Runtime Below Threshold

@BillP 

 

Thanks for the help.  Let me see if I understand you correctly:

 

Normal, on AC running state: UPS 1 has 35min of runtime, UPS 2 has 1:15min of runtime.

Runtime reaming below threshold is set to 20min, 1200 seconds.

 

AC power is lost, batteries start draining.

AC power remains down, UPS 1 hits 19min of runtime remaining, UPS 2 hits 59min of runtime.  Event will not be triggered.

AC power remains down, UPS 1 dies, UPS 2 hits 40 min of runtime.  Event will not be triggered.

AC power remains down, UPS 2 hits 19min of runtime.  Event will be triggered.

 

Is my understanding correct?

Tags (1)
cgsm
Crewman
Crewman
0 Likes
0
121

Re: Cannot Get Command File to Run after Runtime Below Threshold

@BillP bump

Tags (1)
BillP
Administrator Administrator
Administrator
0 Likes
1
116

Re: Cannot Get Command File to Run after Runtime Below Threshold

 

Correct. 

 

If your UPSs have switched outlets, you can use the load shedding feature to trigger the PCNS shutdown and the outlet group/UPS shutdown. That way, the outlet group/UPS can be powered off. Doing that would save the battery from draining. When the second UPS takes over the entire load, it will drain faster, and with that UPS, you could set the load shedding threshold higher so the shutdown will be triggered sooner.

  

Example: UPS one has a runtime remaining threshold of 20 minutes. UPS two has a runtime remaining threshold of 60 minutes. UPS one powers down, UPS two reaches 59 minutes of runtime and triggers PCNS to shut the system/s down.

 

Outlet Group Config w-loadshedding.png

 

In the example above, I set the minimum return time to 15 minutes to allow time for the load to power on and off cleanly if an outage happens while the load is coming online.

You should set the outlet off delay on the longest running UPS to a significant enough time to allow PowerChute to shut everything down cleanly.

Tags (1)
cgsm
Crewman
Crewman
0 Likes
0
102

Re: Cannot Get Command File to Run after Runtime Below Threshold

@BillP 

 

I bit wordier and more advanced of an answer then I was looking for, but I think I understand what you are saying. 

 

I do not care about saving any battery runtime in case of a "power comes back on, stuff starts booting up, and power goes back our before battery is recharged".  I am going to run my batteries until near dead, taking into account shutting everything down cleanly with a command script.  This is why I am questioning at how the threshold works: I just want 20 minutes to shut everything down, and the 20 mins should be based upon both UPSs.

 

That being said, I plan on simply setting up the NMCs the same and setting the PCNS threshold to 20 minutes.  I just wish there was a way to test all this without having to pull the AC supply cords!

 

Tags (1)