mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-16 18:06:45 +02:00
Updated some scripts
This commit is contained in:
parent
5c8f29a255
commit
65275c7ca5
@ -13,7 +13,7 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Write-Progress "Measuring DNS resolution..."
|
#Write-Progress "Measuring DNS resolution..."
|
||||||
$table = Import-CSV "$PSScriptRoot/../data/popular-domains.csv"
|
$table = Import-CSV "$PSScriptRoot/../data/popular-domains.csv"
|
||||||
$numRows = $table.Length
|
$numRows = $table.Length
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ try {
|
|||||||
}
|
}
|
||||||
[float]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
[float]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||||
|
|
||||||
Write-Progress -completed " "
|
#Write-Progress -completed "Measuring DNS resolution..."
|
||||||
$average = [math]::round($numRows / $elapsed, 1)
|
$average = [math]::round($numRows / $elapsed, 1)
|
||||||
if ($average -lt 10.0) {
|
if ($average -lt 10.0) {
|
||||||
Write-Host "⚠️ DNS resolves $average domains per second only"
|
Write-Host "⚠️ DNS resolves $average domains per second only"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script queries the GPU status and prints it.
|
This PowerShell script queries the GPU status and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-gpu.ps1
|
PS> ./check-gpu.ps1
|
||||||
✅ NVIDIA Quadro P400 GPU (2GB RAM, 3840x2160 pixels, 32-bit, 59Hz, driver 31.0.15.1740, status OK)
|
✅ NVIDIA Quadro P400 GPU (2GB RAM, 3840x2160 pixels, 32-bit, 59Hz, driver 31.0.15.1740): status OK
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -37,7 +37,7 @@ try {
|
|||||||
$RefreshRate = $Details.CurrentRefreshRate
|
$RefreshRate = $Details.CurrentRefreshRate
|
||||||
$DriverVersion = $Details.DriverVersion
|
$DriverVersion = $Details.DriverVersion
|
||||||
$Status = $Details.Status
|
$Status = $Details.Status
|
||||||
Write-Host "✅ $Model GPU ($(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $($BitsPerPixel)-bit, $($RefreshRate)Hz, driver $DriverVersion, status $Status)"
|
Write-Host "✅ $Model GPU ($(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $($BitsPerPixel)-bit, $($RefreshRate)Hz, driver $DriverVersion): status $Status"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script queries the status of the SSD/HDD devices (supporting S.M.A.R.T.) and prints it.
|
This PowerShell script queries the status of the SSD/HDD devices (supporting S.M.A.R.T.) and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-smart-devices.ps1
|
PS> ./check-smart-devices.ps1
|
||||||
✅ 1TB Samsung SSD 970 EVO via NVMe (37°C, 2388 hours, 289x on/off, v2B2QEXE7, selftest passed)
|
✅ 1TB Samsung SSD 970 EVO via NVMe (37°C, 2388 hours, 289x on/off, v2B2QEXE7): selftest OK
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -81,13 +81,13 @@ try {
|
|||||||
$powerOn = "$($details.power_cycle_count)x on/off"
|
$powerOn = "$($details.power_cycle_count)x on/off"
|
||||||
}
|
}
|
||||||
if ($details.smart_status.passed) {
|
if ($details.smart_status.passed) {
|
||||||
$selftest = "selftest passed"
|
$selftest = "selftest OK"
|
||||||
} else {
|
} else {
|
||||||
$selftest = "selftest FAILED"
|
$selftest = "selftest FAILED"
|
||||||
$status = "⚠️"
|
$status = "⚠️"
|
||||||
}
|
}
|
||||||
$firmwareVersion = $details.firmware_version
|
$firmwareVersion = $details.firmware_version
|
||||||
Write-Host "$status $capacity$modelName via $protocol ($temp, $hours, $powerOn, $selftest, v$firmwareVersion)"
|
Write-Host "$status $capacity$modelName via $protocol ($temp, $hours, $powerOn, v$firmwareVersion): $selftest"
|
||||||
}
|
}
|
||||||
#Write-Progress -completed "Done."
|
#Write-Progress -completed "Done."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
Loading…
x
Reference in New Issue
Block a user