cmd/utils: log path used when checking disk space (#26212)
This change logs the path checked when encountering low disk space.
This commit is contained in:
parent
6975f09998
commit
64dccf7aa4
@ -125,11 +125,11 @@ func monitorFreeDiskSpace(sigc chan os.Signal, path string, freeDiskSpaceCritica
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if freeSpace < freeDiskSpaceCritical {
|
if freeSpace < freeDiskSpaceCritical {
|
||||||
log.Error("Low disk space. Gracefully shutting down Geth to prevent database corruption.", "available", common.StorageSize(freeSpace))
|
log.Error("Low disk space. Gracefully shutting down Geth to prevent database corruption.", "available", common.StorageSize(freeSpace), "path", path)
|
||||||
sigc <- syscall.SIGTERM
|
sigc <- syscall.SIGTERM
|
||||||
break
|
break
|
||||||
} else if freeSpace < 2*freeDiskSpaceCritical {
|
} else if freeSpace < 2*freeDiskSpaceCritical {
|
||||||
log.Warn("Disk space is running low. Geth will shutdown if disk space runs below critical level.", "available", common.StorageSize(freeSpace), "critical_level", common.StorageSize(freeDiskSpaceCritical))
|
log.Warn("Disk space is running low. Geth will shutdown if disk space runs below critical level.", "available", common.StorageSize(freeSpace), "critical_level", common.StorageSize(freeDiskSpaceCritical), "path", path)
|
||||||
}
|
}
|
||||||
time.Sleep(30 * time.Second)
|
time.Sleep(30 * time.Second)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user