Issue probably with `top` and Uncompressed ARC display

Dmitriy M. endo.mulo at gmail.com
Sun Aug 26 20:05:44 UTC 2018


> On Sun, 26 Aug 2018 at 04:47, Dmitriy M. <endo.mulo at gmail.com> wrote:
> >
> > Hi all,
> >
> > Got issue with displaying Uncompressed ARC in `top` (K Uncompressed and
> > negative Ratio) :
> ...
>
> I don't want to be the person that just asks you to test on HEAD but
> in this case, top(1) has been extensively modified in head/-current.
> You should be able to test by just doing this
>
> svn co svn://svn.freebsd.org/base/head/usr.bin/top
> cd top
> make
> $(make -V.OBJDIR)/top
>
> If its still an issue I'll look deeper.
>

Yes, issue still there:

ARC: 360G Total, 56G MFU, 267G MRU, 187M Anon, 8007M Header, 23G Other
     275G Compressed, K Uncompressed, -5.87:1 Ratio

But to get `top` work I did some code skip in sysctl reading because
my stable system says 'sysctl: unknown oid ', hope this is acceptable
for my issue:

--- machine.c   (revision 338331)
+++ machine.c   (working copy)
@@ -473,8 +473,8 @@
                GETSYSCTL("vm.stats.vm.v_laundry_count", memory_stats[2]);
                GETSYSCTL("vm.stats.vm.v_wire_count", memory_stats[3]);
                GETSYSCTL("vm.stats.vm.v_free_count", memory_stats[5]);
-               GETSYSCTL("vm.stats.vm.v_swappgsin", nspgsin);
-               GETSYSCTL("vm.stats.vm.v_swappgsout", nspgsout);
+               //GETSYSCTL("vm.stats.vm.v_swappgsin", nspgsin);
+               //GETSYSCTL("vm.stats.vm.v_swappgsout", nspgsout);
                /* convert memory stats to Kbytes */
                memory_stats[0] = pagetok(memory_stats[0]);
                memory_stats[1] = pagetok(memory_stats[1]);
@@ -522,11 +522,11 @@
                GETSYSCTL("kstat.zfs.misc.arcstats.hdr_size", arc_stat);
                GETSYSCTL("kstat.zfs.misc.arcstats.l2_hdr_size", arc_stat2);
                arc_stats[4] = (arc_stat + arc_stat2) >> 10;
-               GETSYSCTL("kstat.zfs.misc.arcstats.bonus_size", arc_stat);
+               //GETSYSCTL("kstat.zfs.misc.arcstats.bonus_size", arc_stat);
                arc_stats[5] = arc_stat >> 10;
-               GETSYSCTL("kstat.zfs.misc.arcstats.dnode_size", arc_stat);
+               //GETSYSCTL("kstat.zfs.misc.arcstats.dnode_size", arc_stat);
                arc_stats[5] += arc_stat >> 10;
-               GETSYSCTL("kstat.zfs.misc.arcstats.dbuf_size", arc_stat);
+               //GETSYSCTL("kstat.zfs.misc.arcstats.dbuf_size", arc_stat);
                arc_stats[5] += arc_stat >> 10;
                si->arc = arc_stats;
        }


More information about the freebsd-stable mailing list