Skip to content
Open
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions util/iostat/iostat.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ func Run(ctx context.Context, interval int, receiver chan DeviceStats) {
stat := DeviceStats{}
var err error
for i, field := range fields {
if i >= len(data) {
Comment thread
bragaigor marked this conversation as resolved.
// Some iostat builds emit a header with more columns than a data row
// (e.g. trailing header tokens without values). Skip the rest of the header.
Comment thread
InoMurko marked this conversation as resolved.
Outdated
break
}
Comment thread
bragaigor marked this conversation as resolved.
switch field {
case "Device", "Device:":
stat.DeviceName = data[i]
Expand Down
Loading