Last active
August 26, 2025 17:08
-
-
Save timmyreilly/47cf3c162eb2286094dc19642a21d043 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Unix | |
| echo "=== Quick System Check ===" && top -bn1 | grep "Cpu" | awk '{print "CPU Used: " 100-$8 "%"}' && free -h | grep "Mem" | awk '{print "Memory: " $3 "/" $2 " (" int($3/$2*100) "%)"}' && echo "Load: $(uptime | awk -F'load average:' '{print $2}')" | |
| # Windows Powershell | |
| $cpu = (Get-CimInstance Win32_Processor | Measure-Object LoadPercentage -Average).Average; $mem = Get-CimInstance Win32_OperatingSystem; $memPct = [math]::Round(($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / $mem.TotalVisibleMemorySize * 100, 1); Write-Host "CPU: $cpu% | Mem: $memPct% | Uptime: $((Get-Date) - $mem.LastBootUpTime | ForEach-Object {"$($_.Days)d $($_.Hours)h"})" -ForegroundColor Cyan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment