PC 1: the read-only Power Helper state job for the update-return lane (helper.log, cmd.txt, helper.alive, the task, processes, event logs, versions, the app log)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
0e689e5798
commit
1eb953aa68
1 changed files with 31 additions and 0 deletions
31
tools/ca3-v4-amend/pc1-helper-read.ps1
Normal file
31
tools/ca3-v4-amend/pc1-helper-read.ps1
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# PC 1, read only (the update-return lane's content, 7 October 2026, 22:3x BST, through the shipper): the Power Helper's state
|
||||
# for its owner. Under the signed-in user, nothing written, nothing set, nothing posted to the app, no prompt. (1) helper.log tail
|
||||
# 60, cmd.txt, helper.alive, the sweep folder listing with LastWriteTime; (2) schtasks /query /v /fo list; (3) every igneum
|
||||
# process with its path, parent and creation time; (4) Application log events 1000/1001/1026 naming igneum; (5) the Task
|
||||
# Scheduler operational events naming the task; (6) --version of the task's exe and of the install folder's exe; (7) the app's
|
||||
# log lines about the helper, power cap, power control and tune since 21:00 UTC. Every line printed as RESULT text.
|
||||
$ErrorActionPreference = 'Continue'
|
||||
function Stamp { (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') }
|
||||
function Say([string] $tag, [string] $text) { foreach ($l in ($text -split "`r?`n")) { if ($l.Trim()) { "RESULT $tag $l" } } }
|
||||
"RESULT start $(Stamp)"
|
||||
$sweep = Join-Path $env:LOCALAPPDATA 'igneum\app\sweep'
|
||||
foreach ($f in @('helper.log', 'cmd.txt', 'helper.alive')) { $p = Join-Path $sweep $f; if (Test-Path -LiteralPath $p) { $t = if ($f -eq 'helper.log') { (Get-Content -LiteralPath $p -Tail 60) -join "`n" } else { Get-Content -LiteralPath $p -Raw }; Say "1-$f" $t } else { "RESULT 1-$f absent" } }
|
||||
if (Test-Path -LiteralPath $sweep) { foreach ($i in (Get-ChildItem -LiteralPath $sweep -Force)) { "RESULT 1-dir $($i.Name) bytes=$($i.Length) mtime=$($i.LastWriteTimeUtc.ToString('yyyy-MM-ddTHH:mm:ssZ'))" } } else { 'RESULT 1-dir sweep folder absent' }
|
||||
Say '2-schtasks' ((& schtasks /query /tn "Igneum Power Helper" /v /fo list 2>&1 | Out-String))
|
||||
$taskExe = $null; $tr = (& schtasks /query /tn "Igneum Power Helper" /v /fo list 2>&1 | Out-String) -split "`r?`n" | Where-Object { $_ -match '^Task To Run:' } | Select-Object -First 1
|
||||
if ($tr -and $tr -match '^Task To Run:\s*(.+)$') { $cmd = $Matches[1].Trim(); if ($cmd -match '^"([^"]+)"') { $taskExe = $Matches[1] } elseif ($cmd -match '^(\S+\.exe)') { $taskExe = $Matches[1] } }
|
||||
foreach ($p in (Get-CimInstance Win32_Process -ErrorAction SilentlyContinue | Where-Object { $_.CommandLine -like '*igneum*' })) { $c = ''; try { $c = $p.ConvertToDateTime($p.CreationDate).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') } catch { }; "RESULT 3-proc pid=$($p.ProcessId) parent=$($p.ParentProcessId) name=$($p.Name) path=$($p.ExecutablePath) created=$c cmd=$($p.CommandLine)" }
|
||||
try { $ev = @(Get-WinEvent -FilterHashtable @{ LogName = 'Application'; Id = 1000, 1001, 1026 } -MaxEvents 40 -ErrorAction Stop | Where-Object { $_.Message -like '*igneum*' }); if ($ev.Count -eq 0) { 'RESULT 4-apperr none of 1000/1001/1026 name igneum in the last 40' }; foreach ($e in $ev) { "RESULT 4-apperr $($e.TimeCreated.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')) id=$($e.Id) $(($e.Message -replace '\s+', ' '))" } } catch { "RESULT 4-apperr unreadable: $(($_ | Out-String).Trim() -replace '\s+', ' ')" }
|
||||
try { $ev = @(Get-WinEvent -LogName 'Microsoft-Windows-TaskScheduler/Operational' -MaxEvents 200 -ErrorAction Stop | Where-Object { $_.Message -like '*Igneum Power Helper*' }); if ($ev.Count -eq 0) { 'RESULT 5-sched no events naming the task in the last 200 (the operational log may be off)' }; foreach ($e in ($ev | Sort-Object TimeCreated)) { "RESULT 5-sched $($e.TimeCreated.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')) id=$($e.Id) $(($e.Message -replace '\s+', ' '))" } } catch { "RESULT 5-sched unreadable: $(($_ | Out-String).Trim() -replace '\s+', ' ')" }
|
||||
if ($taskExe -and (Test-Path -LiteralPath $taskExe)) { $f = Get-Item -LiteralPath $taskExe; "RESULT 6-taskexe path=$taskExe mtime=$($f.LastWriteTimeUtc.ToString('yyyy-MM-ddTHH:mm:ssZ')) bytes=$($f.Length) sha256=$((Get-FileHash -Algorithm SHA256 -LiteralPath $taskExe).Hash.ToLower())"; try { "RESULT 6-taskexe --version: $((& $taskExe --version 2>&1 | Out-String).Trim() -replace '\s+', ' ')" } catch { "RESULT 6-taskexe --version failed: $_" } } else { "RESULT 6-taskexe not found (Task To Run: $tr)" }
|
||||
$inst = Join-Path $env:LOCALAPPDATA 'Programs\Igneum Miner\igneum-app.exe'
|
||||
if (Test-Path -LiteralPath $inst) { $f = Get-Item -LiteralPath $inst; "RESULT 6-installexe path=$inst mtime=$($f.LastWriteTimeUtc.ToString('yyyy-MM-ddTHH:mm:ssZ')) bytes=$($f.Length) sha256=$((Get-FileHash -Algorithm SHA256 -LiteralPath $inst).Hash.ToLower())"; try { "RESULT 6-installexe --version: $((& $inst --version 2>&1 | Out-String).Trim() -replace '\s+', ' ')" } catch { "RESULT 6-installexe --version failed: $_" } } else { "RESULT 6-installexe absent at $inst" }
|
||||
$logs = Join-Path $env:LOCALAPPDATA 'igneum\app\logs'
|
||||
$since = (Get-Date).ToUniversalTime().Date.AddHours(21)
|
||||
foreach ($lf in (Get-ChildItem -Path (Join-Path $env:LOCALAPPDATA 'igneum\app') -Recurse -Filter '*.log' -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTimeUtc -ge $since.AddMinutes(-5) -and $_.Name -notmatch '^helper' } | Sort-Object LastWriteTime -Descending | Select-Object -First 3)) {
|
||||
$hits = @(Select-String -LiteralPath $lf.FullName -Pattern 'helper|power cap|power control|tune|Power Helper' -ErrorAction SilentlyContinue | Select-Object -Last 60)
|
||||
"RESULT 7-applog file=$($lf.FullName) hits=$($hits.Count)"
|
||||
foreach ($h in $hits) { "RESULT 7-applog $(($h.Line -replace '\s+', ' ').Substring(0, [math]::Min(260, ($h.Line -replace '\s+', ' ').Length)))" }
|
||||
}
|
||||
'SUMMARY {"job":"pc1-helper-read","status":"done"}'
|
||||
exit 0
|
||||
Loading…
Reference in a new issue