It is currently Sun Sep 23, 2018 9:54 pm

All times are UTC - 7 hours [ DST ]

Recent News:



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Sep 08, 2018 7:19 pm 
Offline
Newbie
Newbie

Joined: Sun May 27, 2018 11:02 am
Posts: 8
Thanks: 3
Thanked: 0 time in 0 post
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?

Thx


Top
 Profile  
Thanks  

Attention Guest: Remove this ad by Registering with the MediaSmartServer.net Forums. It's Free!
PostPosted: Sun Sep 09, 2018 2:48 pm 
Offline
Max Contributor
Max Contributor

Joined: Tue Jan 05, 2010 9:29 am
Posts: 1194
Thanks: 5
Thanked: 150 times in 149 posts
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:
https://www.howtogeek.com/109655/how-to ... ndows-pcs/

_________________
EX-490
WHS v1
VGA/PS2 Keyboard/PS2 Mouse/Serial debug board
Q9450s CPU
Stock Ram
ESATA Sansdigital Towerraid TR5M-B
Popcorn C-200
Popcorn A-200
Dune HD Connect
Rasberry PI OSMC(KODI)
ReadyNAs RN316


Top
 Profile  
Thanks  
PostPosted: Tue Sep 11, 2018 6:47 pm 
Offline
Newbie
Newbie

Joined: Sun May 27, 2018 11:02 am
Posts: 8
Thanks: 3
Thanked: 0 time in 0 post
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.


Top
 Profile  
Thanks  
PostPosted: Wed Sep 12, 2018 4:51 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Oct 17, 2009 7:10 pm
Posts: 5157
Location: Georgia, USA
Thanks: 86
Thanked: 703 times in 682 posts
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.

_________________
Exploring the possibilities!

Migrated from WHS2011 to WS2012E: HIGHLANDER

~ Norco 4220 Enclosure
~ Gigabyte GA-990FXA-UD5
~ AMD Phenom II X4 995 3.2 GHz
~ 8 GB Corsair Vengeance DDR3 1600 (PC3 12800)
~ 3 Supermicro AOC-SASLP-MV8


Top
 Profile  
Thanks  
PostPosted: Wed Sep 12, 2018 5:13 pm 
Offline
Newbie
Newbie

Joined: Sun May 27, 2018 11:02 am
Posts: 8
Thanks: 3
Thanked: 0 time in 0 post
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.


Top
 Profile  
Thanks  
PostPosted: Thu Sep 13, 2018 4:29 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Oct 17, 2009 7:10 pm
Posts: 5157
Location: Georgia, USA
Thanks: 86
Thanked: 703 times in 682 posts
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.

_________________
Exploring the possibilities!

Migrated from WHS2011 to WS2012E: HIGHLANDER

~ Norco 4220 Enclosure
~ Gigabyte GA-990FXA-UD5
~ AMD Phenom II X4 995 3.2 GHz
~ 8 GB Corsair Vengeance DDR3 1600 (PC3 12800)
~ 3 Supermicro AOC-SASLP-MV8


Top
 Profile  
Thanks  
PostPosted: Fri Sep 14, 2018 4:15 pm 
Offline
Newbie
Newbie

Joined: Sun May 27, 2018 11:02 am
Posts: 8
Thanks: 3
Thanked: 0 time in 0 post
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.


Top
 Profile  
Thanks  
PostPosted: Fri Sep 21, 2018 3:43 pm 
Offline
Max Contributor
Max Contributor

Joined: Tue Jan 05, 2010 9:29 am
Posts: 1194
Thanks: 5
Thanked: 150 times in 149 posts
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.

_________________
EX-490
WHS v1
VGA/PS2 Keyboard/PS2 Mouse/Serial debug board
Q9450s CPU
Stock Ram
ESATA Sansdigital Towerraid TR5M-B
Popcorn C-200
Popcorn A-200
Dune HD Connect
Rasberry PI OSMC(KODI)
ReadyNAs RN316


Top
 Profile  
Thanks  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group