Read written bytes instead of read bytes

This commit is contained in:
Michael Schwarz 2025-07-02 13:38:24 +02:00 committed by Thomas Gruber
parent 0a2a85f2ce
commit aa6181a018

View File

@ -278,7 +278,7 @@ func (m *GpfsCollector) Read(interval time.Duration, output chan lp.CCMessage) {
output <- y
}
if m.config.SendBandwidths {
if lastBytesWritten := m.lastState[filesystem].bytesRead; lastBytesWritten >= 0 {
if lastBytesWritten := m.lastState[filesystem].bytesWritten; lastBytesWritten >= 0 {
bwWrite := float64(bytesWritten-lastBytesWritten) / timeDiff
if y, err :=
lp.NewMessage(