Need HELP with Grid Junction script!
Page 1 of 1

Author:  overthehill [ Sat Sep 08, 2018 7:19 pm ]
Post subject:  Need HELP with Grid Junction script!

I would like to use Grid Junction to shut down a Win7 computer on my network. I think at one time there was a sample script on the Grid Junction website showing how to do that, but of course that website is gone. i have searched here as well, but can only find discussions that reference the Grid Junction example.

Can anyone post a script that will do this?


Author:  Ruben Rocha [ Sun Sep 09, 2018 2:48 pm ]
Post subject:  Re: Need HELP with Grid Junction script!

Never heard of such a thing.
with grid junction you plug the ups into the server and or pc.
Then you have one usb plug in the ups to communicate to a device
Usually the server since you use grid junction.
This tells the server when to shut down when battery power is low.
Or use a ups with the usb cable plugged into the pc which tells the pc to shut down when battery is low.

I know there was a script feature coming once but never saw any examples.

But youycan start with: ... ndows-pcs/

Author:  overthehill [ Tue Sep 11, 2018 6:47 pm ]
Post subject:  Re: Need HELP with Grid Junction script!

There is an "Actions" tab in Grid Junction that allows you to set the remaining power level at which the server is shutdown. That same page also has a "Custom Action" section that executes user created scripts for certain power conditions. Grid Junction's website apparently had a collection of sample scripts that could be copied and used by Grid Junction users. One of those scripts would shutdown a computer on the network. I managed to find an a screen shot on the internet that shows a portion of that script, but not enough to help me. VB is greek to me.

I managed to cobble together a script that works, but I'm sure it would give anyone who can program with VB a great big laugh. Unfortunately, my scrip works with tow of the three computers on my network, but not the one I want. The reason I am sure has to do with account name and password. A well-written script probably deals with that issue.

Just in case you are interested in why I want to do this. I live in a area where short power interuptions are all too common. The server is on a small UPS that rides through the short outages, and shuts down the server when a longer one happens. My PC is an always on Win7 PC with a raid array. It is just not happy with abrupt shutdowns. I've added a ups on it also, but unlike the server, I have no way of shutting it down safely during longer power outages. If I'm not at home, or if I'm sleeping a longer power outage leaves the PC waiting for the ups battery to die.

I was hoping maybe someone on this forum might have a copy of the original Grid Junction script. Unfortunately, there is not much discussion about Grid Junction here and even less about its scripting feature. And sadly, the Grid Junction site is totally gone.

Author:  Comp1962 [ Wed Sep 12, 2018 4:51 am ]
Post subject:  Re: Need HELP with Grid Junction script!

Most UPS manufacturers will provide UPS Software where you can have the software shut down the computer they are connected to after a period of time or by battery capacity. Batteries only last 3-5 yrs. So keep that in mind.

Author:  overthehill [ Wed Sep 12, 2018 5:13 pm ]
Post subject:  Re: Need HELP with Grid Junction script!

Both my UPS's are from APC. I've replaced batteries a few times already. Their software s PowerChute, I downloaded it to see if it is an alternative solution. The install fails because it can't see the UPS. I went to the Internet to see if anyone else had the problem, and how did they fix it. One trip to the net was enough to tell me PowerChute is not the answer. Lots of people with the same issue, and most never resolved the problem, not even with help from APC. I'm not even sure it has the ability to shutdown an attached computer since I was not able to install it. Apparently
APC is good at building battery back-ups, but not nearly so good at writing software.

Author:  Comp1962 [ Thu Sep 13, 2018 4:29 am ]
Post subject:  Re: Need HELP with Grid Junction script!

I have run into the issue one time with the APC Software not so much about not seeing the UPS but more so the software not being compatible with the OS. On the older UPS's that use and rely on the older serial port utilizing their software it was somewhat a PITA and my rack mount UPS's utilize serial port connectivity.

I have never had an issue with any server or computer seeing the UPS using the APC provided USB cable. If the software does not see the device then either the cable is not working or the ports on one side or the other are not functioning properly

As for shutting things down it really comes down to the runtime settings. I set all my units up to Preserver Batter Power which provides you with 1-5 mins of run time. Based on power consumption and available run time this should not exceed 20% of the available runtime. If you keep the device running for as long as possible you could stress the battery whereby you may not have enough power left in the battery to provide ample time for a shut down and the thing just cuts the power because the batteries did not have sufficient capacity to actually stay alive during a shut dowm.

I have a server running WHS2011 at work that has an APC UPS connected to it and I will unplug the power to see if it shuts the server down properly after 1 min of run time just to verify the Power Chute Software is working properly and let you know what I find out.

Author:  overthehill [ Fri Sep 14, 2018 4:15 pm ]
Post subject:  Re: Need HELP with Grid Junction script!

Your message describes one issue I had not thought about, i.e. in my setup, the PC is connected to its own APC Smart_UPS 750. I have no software installed at the moment to shutdown either device. A prolonged outage ( probably less than ten minutes) in my absence will drain the UPS of every morsel or power. I had not thought about the impact of that on the health of the battery.

A few comments on the compatibility issue. I am not using an APC supplied USB cord between the UPS and PC. The one I am using came from Amazon and seems to be good quality. Furthermore, I have used a utility program recommended by APC to test the USB connection between the UPS and PC. That program is USBSDeview. It is freeware available on line. It reports back that my connectivity between the two devices is active with no errors. So, I am assuming my cable is not the issue.

I do not know if the USB cable between my UPS and Mediasmart server is an APC cable, but I doubt it. That cable has been working fine for years, but of course there I am using Grid Junction not Powerchute.

I'm beginning to wonder if my original idea using the Grid Junction script is the total solution. Since I have never seen the script I don't know how it works, but I am assuming it sends a shutdown command to the remote PC, but it may not shutdown the UPS, which leaves me with the problem discussed above, i.e. a stone dead UPS.

Author:  Ruben Rocha [ Fri Sep 21, 2018 3:43 pm ]
Post subject:  Re: Need HELP with Grid Junction script!

I will state grid junction gives a nice history log in whs1 to display brownouts and momentary outages.
But the third party scripts became vaporware to shut down other devices.

If you have multiple ups units.
I would suggest to shut down the pc before the server shuts down.
Should be simple to do just set the time to shorter than the addin in the server.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group