0

We have 10 Windows 7 PC's which are mainly used for builds

We have some issue that the server is shutting down by itself due to reasons which we cannot identify. In the event viewer I see the "Kernel power down" events. Not lot of information here

I did a RAM test using Mem86 and there are no errors.

I am looking of a monitoring mechanism which would inform me (email) when the PC is shut down.

I have following ideas/options

  • Ping all the machines and any one of them is down, send email
  • Write a file to a location with uptime every 10 mins

Are there any other fail proof methods to monitor the heartbeat?

I don't have the privilege to install any 3rd party software

6
  • you can always write a script to monitor your machines. or use a slew of monitoring products. Moving to the cloud (AWS for example) would get you this monitoring for free
    – CMag
    Dec 10 '13 at 16:31
  • well these machines are in our corporate intranet. So scripting is my only option I guess
    – KK99
    Dec 10 '13 at 16:32
  • there is a slew of monitoring products... something simple like nagios/icinga/datadog/copperegg/appdynamics? Take my advice with a grain of salt. have not had to use windows in over a decade
    – CMag
    Dec 10 '13 at 16:35
  • 1
    1. What does this mean: "We have 10 Windows 7 PC's which are mainly used for builds"? What are these builds and how are they relevant to the problem? 2. What does this mean: "We have some issue that the server is shutting down by itself"? What does the server have to do with the workstations? 3. What does this mean: "Are there any other fail proof methods to monitor the heartbeat"? What heartbeat are you referring to?
    – joeqwerty
    Dec 10 '13 at 16:51
  • 1
    When your software usage restrictions prevent you from doing your job, then it is time to get rid of the software usage restrictions. Dec 10 '13 at 17:51
2

You can always use Powershell:

$computerArray = "PCOne", "PCTwo"  #List of Computers to check
Foreach ($computer in $computerArray)
    {
        If (!(Test-Connection $computer -Quiet)) #test if the computer responds to a ping
            {Send-MailMessage -To address@place.com -Subject "$computer is down"} #If not, send an email            
    }

Fill in your email information and put the script in a scheduled task and you should be good to go.

1
  • tried in Perl but able to ping only Linux machines. Windows machines always returns 0 #!/usr/bin/perl -w use strict; use warnings; use Net::Ping; my $host; my @host_array; my $p; open my $fh, "<", "server_config.ini" or die "Could not open file"; @host_array=readline($fh); close $fh; chomp @host_array; $p = Net::Ping->new(); #print $p->ping($machine_to_ping); my $retval; foreach $host (@host_array) { print "$host is "; print "NOT " unless $p->ping($host); print " reachable.\n"; }
    – KK99
    Dec 11 '13 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.