Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Windows 7 Forum Vista Tutorials Tags

Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

powergadget : detect service is down

Reply
 
LinkBack Thread Tools Display Modes
Old 01-14-2008   #1 (permalink)
IT Staff
Guest


 
 

powergadget : detect service is down

I know how to write a script that detects whether service is up or down.

What gadget shld i use to display service is up or down ?

i just want to detect one single service ....




My System SpecsSystem Spec
Old 01-14-2008   #2 (permalink)
Marco Shaw [MVP]
Guest


 
 

Re: powergadget : detect service is down

IT Staff wrote:
Quote:

> I know how to write a script that detects whether service is up or down.
>
> What gadget shld i use to display service is up or down ?
>
> i just want to detect one single service ....
>
>
>
Good question. One possibility is a "traffic light" gadget I developed:
http://powergadgets.com/csPg/forums/...hread.aspx#604

If you check the PG built-in samples, there's also a demo using
computers to indicate their status by either red or green (or similar).

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Old 01-14-2008   #3 (permalink)
IT Staff
Guest


 
 

Re: powergadget : detect service is down

traffic_light gadget not working.

does not display any color ...is there anything i did wrong ?


"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:uWPANipVIHA.2000@xxxxxx
Quote:

> IT Staff wrote:
Quote:

>> I know how to write a script that detects whether service is up or down.
>>
>> What gadget shld i use to display service is up or down ?
>>
>> i just want to detect one single service ....
>>
>>
>>
>
> Good question. One possibility is a "traffic light" gadget I developed:
> http://powergadgets.com/csPg/forums/...hread.aspx#604
>
> If you check the PG built-in samples, there's also a demo using computers
> to indicate their status by either red or green (or similar).
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
> http://www.microsoft.com/mvp
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com

My System SpecsSystem Spec
Old 01-14-2008   #4 (permalink)
IT Staff
Guest


 
 

Re: powergadget : detect service is down

actually traffic light may not be necessary, how about using digital panel
to state "1" as service is uo, "0" means service down ?





"IT Staff" <jkklim@xxxxxx> wrote in message
news:eXzv0rxVIHA.5132@xxxxxx
Quote:

> traffic_light gadget not working.
>
> does not display any color ...is there anything i did wrong ?
>
>
> "Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
> news:uWPANipVIHA.2000@xxxxxx
Quote:

>> IT Staff wrote:
Quote:

>>> I know how to write a script that detects whether service is up or down.
>>>
>>> What gadget shld i use to display service is up or down ?
>>>
>>> i just want to detect one single service ....
>>>
>>>
>>>
>>
>> Good question. One possibility is a "traffic light" gadget I developed:
>> http://powergadgets.com/csPg/forums/...hread.aspx#604
>>
>> If you check the PG built-in samples, there's also a demo using computers
>> to indicate their status by either red or green (or similar).
>>
>> Marco
>>
>> --
>> Microsoft MVP - Windows PowerShell
>> http://www.microsoft.com/mvp
>>
>> PowerGadgets MVP
>> http://www.powergadgets.com/mvp
>>
>> Blog:
>> http://marcoshaw.blogspot.com
>
>

My System SpecsSystem Spec
Old 01-14-2008   #5 (permalink)
Marco Shaw [MVP]
Guest


 
 

Re: powergadget : detect service is down

IT Staff wrote:
Quote:

> traffic_light gadget not working.
>
> does not display any color ...is there anything i did wrong ?
You tried to change anything at all in the zip file to get it to run?

Marco
My System SpecsSystem Spec
Old 01-14-2008   #6 (permalink)
IT Staff
Guest


 
 

Re: powergadget : detect service is down

no ...

there is no cmdlet get-random ...


"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:%23d9jKFyVIHA.4712@xxxxxx
Quote:

> IT Staff wrote:
Quote:

>> traffic_light gadget not working.
>>
>> does not display any color ...is there anything i did wrong ?
>
> You tried to change anything at all in the zip file to get it to run?
>
> Marco

My System SpecsSystem Spec
Old 01-14-2008   #7 (permalink)
Marco Shaw [MVP]
Guest


 
 

Re: powergadget : detect service is down

IT Staff wrote:
Quote:

> no ...
>
> there is no cmdlet get-random ...
>
Oops! That comes from www.codeplex.com/powershellcx.

I can either:
1. Provide you .NET code to call from PowerShell to do the same thing.
or
2. Help you do that digital gauge that might just say "UP" or "DOWN".

Pick #1 or #2 or both!
My System SpecsSystem Spec
Old 01-14-2008   #8 (permalink)
IT Staff
Guest


 
 

Re: powergadget : detect service is down

both.

i would like to learn from you, mr MVP :-)

"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:eG5CjPyVIHA.4448@xxxxxx
Quote:

> IT Staff wrote:
Quote:

>> no ...
>>
>> there is no cmdlet get-random ...
>>
>
> Oops! That comes from www.codeplex.com/powershellcx.
>
> I can either:
> 1. Provide you .NET code to call from PowerShell to do the same thing.
> or
> 2. Help you do that digital gauge that might just say "UP" or "DOWN".
>
> Pick #1 or #2 or both!

My System SpecsSystem Spec
Old 01-15-2008   #9 (permalink)
Marco Shaw [MVP]
Guest


 
 

Re: powergadget : detect service is down

Quote:

> I can either:
> 1. Provide you .NET code to call from PowerShell to do the same thing.
> 2. Help you do that digital gauge that might just say "UP" or "DOWN".
#1:
PSH> ./ping|out-gauge -type digital
PSH> get-content ping.ps1
$computer="localhost"

$ping= new-object System.Net.NetworkInformation.Ping
$response=$ping.send($computer)

if ($response.Status -eq "Success")
{
$computer+" is up"
}
else
{
$computer+" is down"
}

#2:
Using .NET to get a random number:
PSH> $rand=new-object System.Random
PSH> $rand.Next(0,5) <--Gives a random number, only 0,1,2,3 or 4
3
PSH> $rand.Next(0,5)
4
PSH> $rand.Next(0,5)
1
My System SpecsSystem Spec
Old 01-16-2008   #10 (permalink)
IT Staff
Guest


 
 

Re: powergadget : detect service is down

yeap i got the concepts.

If i have a list of computers to ping, can i have a *group gadget* or one
gadget for every single machine ?



"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:ePaekS3VIHA.5348@xxxxxx
Quote:

>
Quote:

>> I can either:
>> 1. Provide you .NET code to call from PowerShell to do the same thing.
>> 2. Help you do that digital gauge that might just say "UP" or "DOWN".
>
> #1:
> PSH> ./ping|out-gauge -type digital
> PSH> get-content ping.ps1
> $computer="localhost"
>
> $ping= new-object System.Net.NetworkInformation.Ping
> $response=$ping.send($computer)
>
> if ($response.Status -eq "Success")
> {
> $computer+" is up"
> }
> else
> {
> $computer+" is down"
> }
>
> #2:
> Using .NET to get a random number:
> PSH> $rand=new-object System.Random
> PSH> $rand.Next(0,5) <--Gives a random number, only 0,1,2,3 or 4
> 3
> PSH> $rand.Next(0,5)
> 4
> PSH> $rand.Next(0,5)
> 1

My System SpecsSystem Spec
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Powergadget version IT Staff PowerShell 3 01-25-2008 06:30 AM
Powergadget : get-content of directory IT Staff PowerShell 7 01-08-2008 07:36 PM
powergadget administrator scenarios IT Staff PowerShell 1 01-08-2008 04:22 AM
Grouping by patches using powergadget IT Staff PowerShell 2 01-01-2008 09:20 PM
Powergadget - Out-Line IT Staff PowerShell 1 12-23-2007 11:58 PM


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53