On my system OpenZFS 2.4.1 zarcstat in continuous scroll mode (e.g. zarcstat 1 for one update per second) is oblivious to changes in the number of terminal lines (i.e. stty size). It’s meant to re-print the column header just as the old header scrolls out of view.
The output of stty size is accurate and picks up changes on-the-fly. So I reckon my terminal app + session are OK here.
If this is truly a bug I figure something so obvious would’ve been caught a long time ago? Anyway, can someone please try zarcstat 1 with a very short terminal window and let me know if the header reprints as intended? Trying to not annoy OpenZFS devs unless there’s a genuine problem.
If you DO reproduce this bug, can you try again with a copy of /usr/bin/zarcstat where lines 466+467 are edited from:
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
sz = struct.unpack('hh', data)
…to…
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, b'\x00' * 8)
sz = struct.unpack('hhhh', data)
I think the script’s except Exception: pass may be covering (i.e. silent fail) for a technique that worked in older Python.
Thanks!
