mharsch / arcstat

uses Perl to extract, format, and display kstats from the ZFS ARC
67 stars 31 forks source link

Removal of recycle_miss #17

Closed jalavoy closed 6 years ago

jalavoy commented 6 years ago

Running arcstat.pl triggers a division by uninitialized value. This is caused on line 332, where the script attempts to divide $d{"recycle_miss"} by $int.

abrams arcstat # arcstat.pl time read miss miss% dmis dm% pmis pm% mmis mm% arcsz c Use of uninitialized value in division (/) at /usr/bin/arcstat.pl line 332. 00:30:18 97 0 0 0 0 0 0 0 0 8.0G 8.0G

recycle_miss does not exist in /proc/spl/kstat/zfs/arcstats (at least on my version of spl).

abrams arcstat # grep -ic recycle /proc/spl/kstat/zfs/arcstats 0

Since this data doesn't appear to be used in the output unless manually specified by the user, it should be safe to remove it entirely.

Just in case this is a weirdness with my version, I'm currently running SPL 0.7.10-1.

I don't have an illumos box sitting around. If this is a specific issue to ZoL feel free to close.

mharsch commented 6 years ago

I think you probably want to use the arcstat that comes with zfsonlinux. This issue and others have been addressed there. https://github.com/zfsonlinux/zfs/blob/master/cmd/arcstat/arcstat.py

Alternatively, the illumos version has also addressed this https://github.com/illumos/illumos-gate/commits/master/usr/src/cmd/stat/arcstat/arcstat.pl

See the readme.md about how this repo is just left here for historical record.

jalavoy commented 6 years ago

Will do. Apologies for wasting your time.