PC Review


Reply
Thread Tools Rate Thread

Detect Remote Shutdown

 
 
Chris Johnson
Guest
Posts: n/a
 
      17th Jan 2006
Hey all,

I have a small app I have developed that periodically pings a list of server
and returns their status. Given my environment I have setup the program such
that a server can be down 4 minutes before I get an alert.

My problem now is that is a server is rebooted, it will be back up before
the 4 minute window and I will not be aware that it has rebooted.

I am looking for a way (as an administrator, or not, if possible) to detect
the reboot of a remote machine. I have found code to initiate a local and
remote reboot, but not a way to detect one is happening, can anyone shed
some light here for me?

Thanks!
chrisj


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      17th Jan 2006
You should be able to get the server boottime using WMI.. Try :
http://msdn.microsoft.com/library/de...management.asp
(how long a computer has been running).

--
Patrice

"Chris Johnson" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> Hey all,
>
> I have a small app I have developed that periodically pings a list of

server
> and returns their status. Given my environment I have setup the program

such
> that a server can be down 4 minutes before I get an alert.
>
> My problem now is that is a server is rebooted, it will be back up before
> the 4 minute window and I will not be aware that it has rebooted.
>
> I am looking for a way (as an administrator, or not, if possible) to

detect
> the reboot of a remote machine. I have found code to initiate a local and
> remote reboot, but not a way to detect one is happening, can anyone shed
> some light here for me?
>
> Thanks!
> chrisj
>
>



 
Reply With Quote
 
Chris Johnson
Guest
Posts: n/a
 
      17th Jan 2006
Patrice,

Not a bad idea. I will try that one for now. If anyone has a way to actually
detect the shutdown even I am also still interested in that.

Thanks again Patrice for the quick response!
chrisj

"Patrice" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You should be able to get the server boottime using WMI.. Try :
> http://msdn.microsoft.com/library/de...management.asp
> (how long a computer has been running).
>
> --
> Patrice
>
> "Chris Johnson" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
>> Hey all,
>>
>> I have a small app I have developed that periodically pings a list of

> server
>> and returns their status. Given my environment I have setup the program

> such
>> that a server can be down 4 minutes before I get an alert.
>>
>> My problem now is that is a server is rebooted, it will be back up before
>> the 4 minute window and I will not be aware that it has rebooted.
>>
>> I am looking for a way (as an administrator, or not, if possible) to

> detect
>> the reboot of a remote machine. I have found code to initiate a local and
>> remote reboot, but not a way to detect one is happening, can anyone shed
>> some light here for me?
>>
>> Thanks!
>> chrisj
>>
>>

>
>



 
Reply With Quote
 
Richy
Guest
Posts: n/a
 
      18th Jan 2006
Just an idea, you could write a service as that has an OnStop handler, and
will be stopped when the server reboots. In the OnStop Handler you could
send a message via IP Socket to the app running to detect the shut down.



"Chris Johnson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Patrice,
>
> Not a bad idea. I will try that one for now. If anyone has a way to
> actually detect the shutdown even I am also still interested in that.
>
> Thanks again Patrice for the quick response!
> chrisj
>
> "Patrice" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> You should be able to get the server boottime using WMI.. Try :
>> http://msdn.microsoft.com/library/de...management.asp
>> (how long a computer has been running).
>>
>> --
>> Patrice
>>
>> "Chris Johnson" <(E-Mail Removed)> a écrit dans le message de
>> news:(E-Mail Removed)...
>>> Hey all,
>>>
>>> I have a small app I have developed that periodically pings a list of

>> server
>>> and returns their status. Given my environment I have setup the program

>> such
>>> that a server can be down 4 minutes before I get an alert.
>>>
>>> My problem now is that is a server is rebooted, it will be back up
>>> before
>>> the 4 minute window and I will not be aware that it has rebooted.
>>>
>>> I am looking for a way (as an administrator, or not, if possible) to

>> detect
>>> the reboot of a remote machine. I have found code to initiate a local
>>> and
>>> remote reboot, but not a way to detect one is happening, can anyone shed
>>> some light here for me?
>>>
>>> Thanks!
>>> chrisj
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Chris Johnson
Guest
Posts: n/a
 
      18th Jan 2006
Thats the direction Im going with the project next. Im currently writting my
"jr." application to report into the parent. Might throw some more questions
out once I get a bit farther but thanks for the hint!

chrisj

"Richy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Just an idea, you could write a service as that has an OnStop handler, and
> will be stopped when the server reboots. In the OnStop Handler you could
> send a message via IP Socket to the app running to detect the shut down.
>
>
>
> "Chris Johnson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Patrice,
>>
>> Not a bad idea. I will try that one for now. If anyone has a way to
>> actually detect the shutdown even I am also still interested in that.
>>
>> Thanks again Patrice for the quick response!
>> chrisj
>>
>> "Patrice" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> You should be able to get the server boottime using WMI.. Try :
>>> http://msdn.microsoft.com/library/de...management.asp
>>> (how long a computer has been running).
>>>
>>> --
>>> Patrice
>>>
>>> "Chris Johnson" <(E-Mail Removed)> a écrit dans le message de
>>> news:(E-Mail Removed)...
>>>> Hey all,
>>>>
>>>> I have a small app I have developed that periodically pings a list of
>>> server
>>>> and returns their status. Given my environment I have setup the program
>>> such
>>>> that a server can be down 4 minutes before I get an alert.
>>>>
>>>> My problem now is that is a server is rebooted, it will be back up
>>>> before
>>>> the 4 minute window and I will not be aware that it has rebooted.
>>>>
>>>> I am looking for a way (as an administrator, or not, if possible) to
>>> detect
>>>> the reboot of a remote machine. I have found code to initiate a local
>>>> and
>>>> remote reboot, but not a way to detect one is happening, can anyone
>>>> shed
>>>> some light here for me?
>>>>
>>>> Thanks!
>>>> chrisj
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect logoff/shutdown j Microsoft Outlook Program Addins 1 21st Jul 2009 02:42 PM
Detect Shutdown from .NET Adnan Hebibovic Microsoft Dot NET 6 29th Mar 2005 02:38 AM
detect shutdown of other application =?Utf-8?B?Z2VvcmcgYW5kZXJzc29u?= Microsoft Dot NET Framework 1 25th Nov 2004 07:59 AM
remote application start, remote shutdown, remote dialogue Hansi Microsoft Dot NET 0 20th Nov 2003 09:49 AM
How to Detect Improper Shutdown birju jani Windows XP Customization 0 16th Aug 2003 12:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 AM.