Closed BinSquare closed 6 months ago
This can already be accomplished with process-exporter: https://github.com/ncabatoff/process-exporter#open_filedesc-gauge
@dswarbrick For sure. Is it reasonable to consider that an additional data point for incorporating such feature into procfs itself?
Seems trivial enough to implement in the caller, don't feel like we need to implement that here
ACK, in that case, I think this can be closed now.
Often times when debugging for a fd leak - it is not clear which process is the root cause of such leak and having the exact count instance wide would be really helpful.
The implementation can be done fairly straight-forwardly using fs.AllProcs() and proc.FileDescriptorsLen() that looks something like below in https://github.com/prometheus/procfs/blob/ff0ad85f7e8bcd5c677d99143f14a2a3aab533aa/proc.go#L245:
Can implement it if procfs team thinks it's worthwhile to be part of the project