htop
htop copied to clipboard
PCP: add File Descriptor Meter
You can get the same info from /proc/sys/fs/file-nr
on a Linux system (#990).
BSD has sysctl kern.maxfiles
and sysctl kern.openfiles
.
Why not implement it to work outside PCP as well?
You can get the same info from
/proc/sys/fs/file-nr
on a Linux system (#990). BSD hassysctl kern.maxfiles
andsysctl kern.openfiles
. Why not implement it to work outside PCP as well?
I'm not sure what you mean @fasterit ... ? @BenBE has already implemented it "outside of PCP" for Linux, and has started on the BSD code AIUI - meanwhile this code from @smalinux using the (existing) PCP metrics looks on the right path to me for the PCP backend.
@fasterit That is a good idea, but the problem with this way is that it always assumes that the information will be available live all the time. In the PCP case, on the other hand, it does not assume that. PCP could read this data from some archive logs or be read from another target machine. That's the power of PCP: https://pcp.readthedocs.io/en/latest/UAG/IntroductionToPcp.html
@smalinux looks like you have a build failure there?
@natoscott yes, because #990 is still not merged yet and there is no FileDescriptorMeter.ch I tested it and after adding it to myhtopsources will work perfectly :)
You can get the same info from
/proc/sys/fs/file-nr
on a Linux system (#990). BSD hassysctl kern.maxfiles
andsysctl kern.openfiles
. Why not implement it to work outside PCP as well?I'm not sure what you mean @fasterit ... ? @BenBE has already implemented it "outside of PCP" for Linux, and has started on the BSD code AIUI - meanwhile this code from @smalinux using the (existing) PCP metrics looks on the right path to me for the PCP backend.
I meant to make sure we have the same meter on all (supported) platforms.
@natoscott yes, because #990 is still not merged yet […]
Just rebase onto my branch …
@natoscott yes, because #990 is still not merged yet […]
Just rebase onto my branch …
Done.
This PR was closed by #990 (https://github.com/htop-dev/htop/commit/bdb63a497beeb4b317296ca123c507233a2af889)