About…

Mini Blog: Checking processor performance

I haven’t been blogging alot lately, mostly due to renovating at home and having very large projects in the office. To compensate I’ve decided to write some quick mini blogs to make sure I don’t lose the magic 🙂

I’ve found with some application monitoring I’ve been setting up it was required to make a quick snapshot of how heavy the processor was being used during my scripts, as the application made some SQL queries it could create spikes in the CPU that I wanted to avoid.

To take a quick snapshot of the current values of the processor status, I’ve used the get-counter cmdlet and retrieved the cooked value of this to query it further;

$CPUQueueLength = (get-counter -counter "\System\Processor Queue Length").countersamples.cookedvalue

$CPUUSerTime = (get-counter -counter "\Processor(*)\% User Time").countersamples.cookedvalue

$CPUPrivTime = (get-counter -counter "\Processor(*)\% Privileged Time").countersamples.cookedvalue

Happy scripting 🙂

Mini-Blog: finding the windows search database location.

I haven’t been blogging alot lately, mostly due to renovating at home and having very large projects in the office. To compensate I’ve decided to write some quick mini blogs to make sure I don’t lose the magic 🙂

One thing I’ve found is that my Windows Search EBD blog about the CoreCount registry key is one of the most visited blogs. Some people like automating defrag jobs or monitoring the size in their monitoring systems.

to quickly find the location of the Windows Search EBD, you can use the following Powershell v2+ command:

$CurrentLoc = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Search\" -name DataDirectory

Happy Powershelling!