We recently had a problem on a server since one of its services was randomly experiencing spikes in CPU load that required restarting the service. Such event was happening once in a while and only required a restart. While we were tracking the problem down, we needed a temporary solution that didn’t require us to manually restart the service. Luckily Powershell came to the rescue with a simple script:
$interval = 30 #seconds $counterSample = Get-Counter '\Processor(_Total)\% Processor Time' -SampleInterval $interval $avgLoad = $counterSample.CounterSamples.CookedValue Write-Output "Average CPU load : $avgLoad"The tricky thing is that we didn’t want to measure [...]
Windows 10 è appena stato rilasciato e si puĂ² iniziare a scoprire tutte le funzionalitĂ che il nuovo sistema si porta dietro, alcune molto note, altre molte meno. E’ il caso di PackageManagement, un nome poco fantasioso che nasconde perĂ² il debutto sulle versioni client di Windows di un package manager che a molti ricorderĂ il famoso apt-get disponibile su molte distribuzioni Linux. In realtĂ sarebbe meglio definirlo un super package manager perchĂ© unifica le funzionalitĂ di tutti i diversi sistemi di installazione e gestione applicazioni disponibili su Windows e sviluppati nel corso degli anni, oltre che rappresentare un sistema di inventoring e discovery. Basato su [...]