Home All Groups Group Topic Archive Search About

Check to see if a server is running

Author
9 Aug 2006 2:01 AM
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

Author
10 Aug 2006 7:16 PM
dotNetDave
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


Show quoteHide quote
"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
>
>
>
Author
10 Aug 2006 10:29 PM
tshad
"dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
Show quoteHide quote
>
> ======================================
> 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
>>
>>
>>
Author
14 Aug 2006 8:39 PM
dotNetDave
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.

Show quoteHide quote
"tshad" wrote:

> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
> >>
> >>
> >>
>
>
>
Author
14 Aug 2006 11:30 PM
tshad
"dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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

Show quoteHide quote
> "tshad" wrote:
>
>> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
>> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
>> >>
>> >>
>> >>
>>
>>
>>
Author
16 Aug 2006 7:42 PM
dotNetDave
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/PermaLink,guid,3f5e9cc0-d6a6-45a1-9f59-5e844c55ff27.aspx

Show quoteHide quote
"tshad" wrote:

> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
> news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in message
> >> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Author
17 Aug 2006 12:38 AM
tshad
"dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
news:BE93B10C-C1F2-4C33-998E-B9EA5010DB3C@microsoft.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/PermaLink,guid,3f5e9cc0-d6a6-45a1-9f59-5e844c55ff27.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
Show quoteHide quote
>
> "tshad" wrote:
>
>> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
>> news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in message
>> >> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
Author
17 Aug 2006 8:26 PM
dotNetDave
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.

Show quoteHide quote
"tshad" wrote:

> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
> news:BE93B10C-C1F2-4C33-998E-B9EA5010DB3C@microsoft.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/PermaLink,guid,3f5e9cc0-d6a6-45a1-9f59-5e844c55ff27.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" <dotNetD***@discussions.microsoft.com> wrote in message
> >> news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in message
> >> >> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Author
18 Aug 2006 3:52 PM
tshad
"dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
news:F1825A54-FC15-40B5-9176-D243A722B6DC@microsoft.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

Show quoteHide quote
>
> "tshad" wrote:
>
>> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
>> news:BE93B10C-C1F2-4C33-998E-B9EA5010DB3C@microsoft.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/PermaLink,guid,3f5e9cc0-d6a6-45a1-9f59-5e844c55ff27.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" <dotNetD***@discussions.microsoft.com> wrote in message
>> >> news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in
>> >> >> message
>> >> >> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
Author
18 Aug 2006 9:01 PM
tshad
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

Show quoteHide quote
"tshad" <tscheider***@ftsolutions.com> wrote in message
news:%23qbPN5twGHA.4596@TK2MSFTNGP05.phx.gbl...
> "dotNetDave" <dotNetD***@discussions.microsoft.com> wrote in message
> news:F1825A54-FC15-40B5-9176-D243A722B6DC@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in message
>>> news:BE93B10C-C1F2-4C33-998E-B9EA5010DB3C@microsoft.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/PermaLink,guid,3f5e9cc0-d6a6-45a1-9f59-5e844c55ff27.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" <dotNetD***@discussions.microsoft.com> wrote in message
>>> >> news:BD77A2BA-977A-4424-B25B-835D1827756E@microsoft.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" <dotNetD***@discussions.microsoft.com> wrote in
>>> >> >> message
>>> >> >> news:7F4E279C-9BAC-495D-9F8E-68B58BE1C078@microsoft.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
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>> >>
>>>
>>>
>>>
>
>