After searching the web for many hours there is no alternative than using CGO.
It looks like the only tool build into macOS is fs_usage -f diskio -t 1 But this displays I/O per process. (I also guess this is used by Activity Monitor in the background).
Tools like iosnoop or iotop depanding on dtrace which is disabled on modern macOS systems.
After searching the web for many hours there is no alternative than using CGO. It looks like the only tool build into macOS is
fs_usage -f diskio -t 1
But this displays I/O per process. (I also guess this is used by Activity Monitor in the background).Tools like
iosnoop
oriotop
depanding ondtrace
which is disabled on modern macOS systems.We will continue using gopsutil which is based on https://github.com/lufia/iostat. This is also used by the Prometheus node_exporter: https://github.com/prometheus/node_exporter/blob/v1.1.2/collector/diskstats_darwin.go#L22