473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Check to see if a server is running

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
Aug 9 '06 #1
9 1705
You can always just ping it. This is easily done with the new class in .NET
2.0.

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:
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
Aug 10 '06 #2
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microsof t.com...
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
>
======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:
>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

Aug 10 '06 #3
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.

"tshad" wrote:
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microsof t.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:
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


Aug 14 '06 #4
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@microsof t.com...
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
"tshad" wrote:
>"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microso ft.com...
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
>
======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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



Aug 14 '06 #5
I can do better than that! I have given 4 talks on WMI at various Code Camps
around the western part of the US this year. Below is a link to my slides and
sample code. Enjoy!

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx

"tshad" wrote:
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@microsof t.com...
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
"tshad" wrote:
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microsof t.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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



Aug 16 '06 #6
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BE**********************************@microsof t.com...
>I can do better than that! I have given 4 talks on WMI at various Code
Camps
around the western part of the US this year. Below is a link to my slides
and
sample code. Enjoy!

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx
Looks pretty good.

Are you in the picture?:)

I loaded the project but can't open it. Says there is no project file - I
am using VS 2003.

Thanks,

Tom
>
"tshad" wrote:
>"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@microso ft.com...
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
"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microso ft.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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




Aug 17 '06 #7
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.

"tshad" wrote:
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BE**********************************@microsof t.com...
I can do better than that! I have given 4 talks on WMI at various Code
Camps
around the western part of the US this year. Below is a link to my slides
and
sample code. Enjoy!

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx

Looks pretty good.

Are you in the picture?:)

I loaded the project but can't open it. Says there is no project file - I
am using VS 2003.

Thanks,

Tom

"tshad" wrote:
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@microsof t.com...
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

"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:7F**********************************@microsof t.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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




Aug 17 '06 #8
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
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
>
"tshad" wrote:
>"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BE**********************************@microso ft.com...
>I can do better than that! I have given 4 talks on WMI at various Code
Camps
around the western part of the US this year. Below is a link to my
slides
and
sample code. Enjoy!

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx

Looks pretty good.

Are you in the picture?:)

I loaded the project but can't open it. Says there is no project file -
I
am using VS 2003.

Thanks,

Tom
>
"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@microso ft.com...
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

"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in
message
news:7F**********************************@microso ft.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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





Aug 18 '06 #9
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

"tshad" <ts**********@ftsolutions.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
>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
>>
"tshad" wrote:
>>"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BE**********************************@micros oft.com...
I can do better than that! I have given 4 talks on WMI at various Code
Camps
around the western part of the US this year. Below is a link to my
slides
and
sample code. Enjoy!

http://blog.davidmccarter.net/PermaL...44c55ff27.aspx

Looks pretty good.

Are you in the picture?:)

I loaded the project but can't open it. Says there is no project file -
I
am using VS 2003.

Thanks,

Tom

"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in message
news:BD**********************************@micros oft.com...
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

"tshad" wrote:

"dotNetDave" <do********@discussions.microsoft.comwrote in
message
news:7F**********************************@micros oft.com...
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

======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485
"tshad" wrote:

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





Aug 18 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason Miles | last post by:
Hi, I wrote this little script to check to see if our Lotus Notes servers are running, and from the command line it works fine if I type perl notescheck.pl When I invoke the script from a web...
4
by: Si | last post by:
Hi Guys I am using this code to execute an Access VBA function from ASP: strDbName = strDataSource & "data\webjobs.mdb" Set objAccess = Server.CreateObject("Access.Application")...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
4
by: Dr. StrangeDub | last post by:
I am part of a group that has developed an ASP.Net web application. I am looking for a way to determine whether or not the browser is actually running on the web server. For this case (when...
8
by: Nikolay Petrov | last post by:
How could I check if my app is running. I would like to check if my app is running for specified user, because it is used in Terminal Server. I want the program to somehow check if another...
12
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
12
by: Shadlan | last post by:
Hi. I need to know if a service is running on my server. Is there any PHP instruction that I can use to do this?
0
by: Gordon | last post by:
On Oct 23, 9:43 am, Curtis <dye...@gmail.comwrote: if ($handle = fsockopen ('localhost', 80, $errnum, $errmsg, 1)) { echo ('A web server is running on this system<br>'); fclose ($handle); }...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.