hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.84k stars 581 forks source link

Add ZFS cache awareness to memory meters. #976

Open zielmicha opened 4 years ago

zielmicha commented 4 years ago

Fixes #44

This is #153, but rebased to be mergable with the current head.

natoscott commented 4 years ago

@zielmicha I believe this PR will need to be reworked to fit in with the code from https://github.com/hishamhm/htop/pull/920

It should simplify the changes needed here immensely - the arcstats file parsing is done and there's no need for configure.ac changes, so most of this PR goes away (put not all AFAICT).

We're creating a community 3.0.0 htop release, it'd be great to have this functionality included for Linux ZFS. [ https://github.com/hishamhm/htop/issues/992 ]

I notice the FreeBSD code (freebsd/FreeBSDProcessList.c) already handles the memory accounting adjustments you're making here - but from my understanding of the code in both PRs, I believe the functionality you seek here will still be missing for Linux.

Please see https://github.com/htop-dev/htop for a tree with #920 merged - if someone with ZFS filesystems could create a new PR ASAP for the htop-dev repo, it'd be great to include this in that new release. Thanks!