469,348 Members | 1,266 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

Detect Remote Shutdown

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
Jan 17 '06 #1
4 2604
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" <ra*****@gmail.com> a écrit dans le message de
news:OK*************@TK2MSFTNGP15.phx.gbl...
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

Jan 17 '06 #2
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" <no****@nowhere.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
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" <ra*****@gmail.com> a écrit dans le message de
news:OK*************@TK2MSFTNGP15.phx.gbl...
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


Jan 17 '06 #3
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" <ra*****@gmail.com> wrote in message
news:eQ**************@TK2MSFTNGP15.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
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" <ra*****@gmail.com> a écrit dans le message de
news:OK*************@TK2MSFTNGP15.phx.gbl...
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



Jan 18 '06 #4
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" <su**********@crosskeysonline.co.uk> wrote in message
news:11***************@ernani.logica.co.uk...
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" <ra*****@gmail.com> wrote in message
news:eQ**************@TK2MSFTNGP15.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
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" <ra*****@gmail.com> a écrit dans le message de
news:OK*************@TK2MSFTNGP15.phx.gbl...
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



Jan 18 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tim Gosselin | last post: by
2 posts views Thread by Austin | last post: by
2 posts views Thread by Austin | last post: by
6 posts views Thread by Adnan Hebibovic | last post: by
1 post views Thread by Jerry Camel | last post: by
13 posts views Thread by Shailesh Humbad | last post: by
reply views Thread by Christian Jacob | last post: by
3 posts views Thread by joja15 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.