Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/drain-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ body:
id: events
attributes:
label: Events JSON
description: Output of `berth events --json` captured around the scenario, pasted whole
description: Output of `berth events --format json` captured around the scenario, pasted whole
validations:
required: true

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ bin/

# OME boards stay local; this repo is public
.ome/

# the binary a plain `go build` leaves at the root: untracked, it marks every later build +dirty
/berth
/berth.exe
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ has a matching GitHub release whose body comes from its section below.
one WARN line. A relative path fails `berth config check`, and `berth prefetch MODEL` makes the
same ask by hand.

### Fixed

- The Windows check kit (`contrib/windows/check.ps1`): the per-process rows render again, the label and
the MiB figure computed before the row list, and the status reads the keys it actually has
(`squatters`, `unprotected`, `leases`; there is no `holders`). `berth events` is called with
`--format json`, and a berth that answers nothing leaves its stderr in the report instead of
a silent "returned nothing".

## [v0.3.2] - 2026-10-20

Fixes from the first Windows testers, and four contributions. On Windows, the Epic Games
Expand Down
2 changes: 1 addition & 1 deletion contrib/chaos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ Use the [drain report issue form](https://github.com/T-Crypt/berth/issues/new?te
It collects: which scenario, pass / fail / other, the GPU and its VRAM, the
driver version (`nvidia-smi` prints it), the OS, the engines on the card,
the berth version (`berth version`) and the event log around the run
(`berth events --json`). Capture the events output before you restart
(`berth events --format json`). Capture the events output before you restart
anything, and paste it whole.
2 changes: 1 addition & 1 deletion contrib/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ collects, so a report takes one run instead of a dozen screenshots.
unexpected one for a misbehaving engine.
- When you give it a CUDA app, one run of it under `berth run --as hog`,
its output and its exit code.
- The event log around the run (`berth events --json`, the last 200 lines).
- The event log around the run (`berth events --format json`, the last 200 lines).
It is captured before you restart anything.

## What it needs
Expand Down
39 changes: 25 additions & 14 deletions contrib/windows/check.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Note($text) {
}

Note "berth windows check - $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
Note "machine: $env:COMPUTERNAME, user: $env:USERNAME, powershell: $PSVersionTable.PSVersion.ToString()"
Note "machine: $env:COMPUTERNAME, user: $env:USERNAME, powershell: $($PSVersionTable.PSVersion.ToString())"

# 1. The berth version and the node it talks to.
Note ""
Expand Down Expand Up @@ -91,24 +91,33 @@ else {
Note "PID NAME BERTH(MiB) DRIVER(MiB)"
$berthPids = @{}
$rows = @()
if ($null -ne $stat.holders) {
foreach ($h in $stat.holders) {
$berthPids[$h.pid] = $true
$d = "-"
if ($driverMiB.ContainsKey($h.pid)) { $d = "$($driverMiB[$h.pid])" }
$rows += ,@($h.pid, "holder " + $h.name, $h.used / 1MB, $d)
}
}
# The label and the MiB figure go into variables first: in PowerShell the
# comma binds tighter than + and /, so inside a @(...) list they split
# one element into two and shift every column after it.
if ($null -ne $stat.squatters) {
foreach ($s in $stat.squatters) {
$berthPids[$s.pid] = $true
$d = "-"
if ($driverMiB.ContainsKey($s.pid)) { $d = "$($driverMiB[$s.pid])" }
$rows += ,@($s.pid, "stowaway " + $s.name, $s.used / 1MB, $d)
$label = "stowaway " + $s.name
$mib = [string][math]::Round([double]$s.used / 1MB)
$rows += ,@($s.pid, $label, $mib, $d)
}
}
# Unprotected runs: the daemon stopped keeping them, so status has no
# berth figure for them; the driver's counter is the check of the run.
if ($null -ne $stat.unprotected) {
foreach ($u in $stat.unprotected) {
if ($u.pid -le 0) { continue }
$berthPids[$u.pid] = $true
$d = "-"
if ($driverMiB.ContainsKey($u.pid)) { $d = "$($driverMiB[$u.pid])" }
$label = "unprotected " + $u.engine
$rows += ,@($u.pid, $label, "-", $d)
}
}
foreach ($r in $rows) {
Note ("{0,-8} {1,-24} {2,9} {3,12}" -f $r[0], $r[1], [math]::Round($r[2]), $r[3])
Note ("{0,-8} {1,-24} {2,9} {3,12}" -f $r[0], $r[1], $r[2], $r[3])
}
if ($rows.Count -eq 0) {
Note "(no process on the card that berth knows)"
Expand Down Expand Up @@ -146,15 +155,17 @@ if ($App -ne "") {
# 6. The event log around the run, the form's last field. Capture it before
# you restart anything.
Note ""
Note "== berth events --json (last 200 lines)"
$events = & $Berth events --json 2>$null
Note "== berth events --format json (last 200 lines)"
# stderr rides along in the capture, so a berth that answers nothing still
# leaves its error in the report instead of a silent "returned nothing".
$events = & $Berth events --format json 2>&1
if ($null -ne $events) {
$events | Select-Object -Last 200 | ForEach-Object {
if ($null -ne $_ -and "$_" -ne "") { Note $_ }
}
}
else {
Note "berth events returned nothing"
Note "berth events wrote nothing (exit code $LASTEXITCODE)"
}

[System.IO.File]::WriteAllLines($Report, $lines, (New-Object System.Text.UTF8Encoding($false)))
Expand Down
Loading