SilverTech Posted March 8, 2007 Report Share Posted March 8, 2007 Hi there. How do i get a gauge that shows me how many processes that are running i have tried this $temp = { $ps = ps $ps.count } &$temp | out-gauge -type digital -refresh 0:0:1 It almost work but it won't refresh Link to comment Share on other sites More sharing options...
SilverTech Posted March 8, 2007 Author Report Share Posted March 8, 2007 I figured ut out. The command line loks like this: get-wmiobject Win32_Process | group-object -property group | out-gauge -value count -type digital -refresh 0:0:1 -float Link to comment Share on other sites More sharing options...
marco.shaw Posted March 8, 2007 Report Share Posted March 8, 2007 http://community.softwarefx.com/forums/t/9227.aspx You should put your logic to get the process count in a ps1 script and pass that to out-gauge, then the refresh should work. A shortcut you can use is just $(ps).count... Link to comment Share on other sites More sharing options...
SilverTech Posted March 8, 2007 Author Report Share Posted March 8, 2007 oh thanks that was a bit easyer. Im still learning how ps works but im wery greatfull of all the help. Link to comment Share on other sites More sharing options...
SAPIENScripter Posted March 8, 2007 Report Share Posted March 8, 2007 I have to start using PowerGadgets more. This is pretty slick. This is what works for me: (ps).count | out-gauge -type digital -float -style 10 -refresh 0:0:2 -size 64,64 There's no reason to use Get-WMIObject for the local system. I just wish there was a way to have the gauge float but still be able to add text somewhere so I can remember what the gauge is showing. Link to comment Share on other sites More sharing options...
marco.shaw Posted March 8, 2007 Report Share Posted March 8, 2007 There's a -tooltip "foo" arg for out-gauge. I'm pretty sure there's another flag to embed text directly in the gauge, but I can't find it/remember it right now. Link to comment Share on other sites More sharing options...
JuanC Posted March 8, 2007 Report Share Posted March 8, 2007 You can get a title by doing this (ps).count | out-gauge -type digital -float -style 10 -refresh 0:0:2 -size 64,64 -titles_0_text "#Proc" -titles_0_layout_target AnchorPoint -titles_0_layout_anchorpoint 0.2,0.7 The key here is that by setting the target layout to be AnchorPoint you can control exactly where the title is located (coordinates a from 0 to 1) JuanC Link to comment Share on other sites More sharing options...
SAPIENScripter Posted March 8, 2007 Report Share Posted March 8, 2007 Man, that's a lot of typing [], but it gets the job done. Link to comment Share on other sites More sharing options...
IGSFX Posted March 8, 2007 Report Share Posted March 8, 2007 You can also use the Template Creator (out-gauge -config) to decide the best location with the mouse and also avoid some typing [] You will finally invoke something like this: (ps).count | out-gauge -template MyTemplate -refresh 0:0:2 You can even make the refresh rate part of the template if you want. IvanGPowerGadgets Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.