Check to see if a server is running

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

This is similar to another post I did where I would like to check one server
from another server programmatically (from a service) to see if it is
running and then act accordingly if it isn't. Send an email, for instance.

Is there an easy way to do this?

Thanks,

Tom
 
dotNetDave said:
You can always just ping it. This is easily done with the new class in
.NET
2.0.

Unfortunately, I am on VS 2003 and not running 2.0 yet.

Also, pings are turned of on this machine for security.

Thanks,

Tom
 
Then use WMI. You can get all kinds of info from any server as long as you
have a user name and password for that server.
 
dotNetDave said:
Then use WMI. You can get all kinds of info from any server as long as you
have a user name and password for that server.
Do I need to Load anthing special to use WMI? Add any references?

I am running on an XP Pro using VS 2003 and the servers are W2K3 servers. I
will be building Windows services to run on all those machines.

Thanks,

Tom
 
Yes, I am in the picture :-) The project is written in VS.2005. You could
just look at the .vb files to see how I wrote the code.
 
dotNetDave said:
Yes, I am in the picture :-) The project is written in VS.2005. You could
just look at the .vb files to see how I wrote the code.

I figured that since opening the .vbproj file gave me an error saying it
couldn't read the project file and that it was invalid.

Just wanted to make sure I didn't miss something.

I was looking at the code. Looks pretty straight forward.

Thanks,

Tom
 
BTW - Do I need to load anything on an XP Pro or W2k3 Server to use this?

What about a reference from VS2003 - do I need to reference anything?

Thanks,

Tom
 
Back
Top