We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!
Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.
Long time user- first time posting. Here's one I finally got working today that shows the percentage of use of just the top core. We have a standard INI for all our client servers that showed each cores' usage, but with the number of cores on some servers it was starting to overflow the screen!
The PS1 file needs to be in the same dir as your executable. The only thing I couldn't figure out was displaying single digits with a leading zero (so 5 would be 05). It must be something to do with PowerShell as i'm able to do it on other lines with [2.0d]% being in the display options.
Anyway- here's the line. If someone has a better option, I'd be glad to hear it.
CMD=text:Top Core Usage,interval:3,file:powershell.exe -NoProfile -ExecutionPolicy Bypass -File GetTopCore.ps1,multirow:0,display:%4[2.0d]%,regex:\|
i guess because %4 is treated as text. The string format may be useful although it pads with spaces. %4[w.ps]
Wow, my first reply and it's from the Man himself! Nice to finally meet you! I'll give that a try later and let you know.
Sadly, no love on %4[w.ps]
Appears to act the same as the previous %4[2.0d] and doesn't add the leading zero. Not a show stopper though- I'll continue to mess with it.
-File GetTopCore.ps1,multirow:0,display:%4[2.0s]%,regex:\|
I'm thinking it might be useful to add an option to the 's' format so we can specify what character it pads with.
Well, I'm a network/server guy so you don't want to take any programming advice from me, but I'd assume the default would be a 0. I'm just assume it was something to do with the weird way I had to get the number out of PowerShell.
The default is a space because it's working with text. The purpose is for building aligned columns of text.
However, it would make sense to modify the 'd' format to try to force the returned text to a number so it can format it.
Ah. Makes sense. I'll be looking for it in 3.13.1. 🙂
so does the script return just the usage of whichever core is most in use. does it show the core number as well?
It can show which core it is- I think the value is %2 for core number. %4 is the usage, but I'm only worried which is maxing. I had a few instances where a memory leak caused one core to spike while overall usage was still low. This is our standard for servers. We have a different one for workstations that's a little more trimmed down. I also have a fancy one for my workstation: