Bug 195460 - [patch] systat to display zfs arc cache status/info
Summary: [patch] systat to display zfs arc cache status/info
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-28 03:58 UTC by ota
Modified: 2015-11-14 13:11 UTC (History)
2 users (show)

See Also:


Attachments
systat -zarc (3.37 KB, patch)
2014-11-28 03:58 UTC, ota
no flags Details | Diff
This one contains new file, zarc.c, properly (10.11 KB, patch)
2014-12-07 21:42 UTC, ota
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ota 2014-11-28 03:58:18 UTC
Created attachment 149947 [details]
systat -zarc

Added "zarc" command to display arc cache usage and hit/miss statistics.  It is similar to zfs-mon but light weight as unlike zfs-mon, systat directly calls sysctl.

% systat -zarc
                       Total     MFU     MRU    Anon     Hdr   L2Hdr   Other
     ZFS ARC            206M     63M    136M    826K   1102K      0K   5251K

                                rate    hits  misses   total hits total misses
     arcstats                  : 75%    1183     388        23721         4202
     arcstats.demand_data      :  0%       0       0          528            0
     arcstats.demand_metadata  : 76%    1007     308        21441         2757
     arcstats.prefetch_data    :  0%       0       0            0            0
     arcstats.prefetch_metadata: 68%     176      80         1752         1445
     zfetchstats               : 44%     954    1204        26410        25482
     arcstats.l2               :  0%       0       0            0            0
     vdev_cache_stats          :  0%       0       0            0            0
Comment 1 ota 2014-12-07 21:42:02 UTC
Created attachment 150324 [details]
This one contains new file, zarc.c, properly
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-09-27 09:16:18 UTC
A commit references this bug:

Author: mr
Date: Sun Sep 27 09:15:56 UTC 2015
New revision: 288306
URL: https://svnweb.freebsd.org/changeset/base/288306

Log:
  Add support to systat to display zfs arc cache status/info

  PR:		195460
  Submitted by:	ota

Changes:
  head/usr.bin/systat/Makefile
  head/usr.bin/systat/cmdtab.c
  head/usr.bin/systat/extern.h
  head/usr.bin/systat/main.c
  head/usr.bin/systat/systat.1
  head/usr.bin/systat/systat.h
  head/usr.bin/systat/zarc.c
Comment 3 Michael Reifenberger freebsd_committer freebsd_triage 2015-09-27 09:21:48 UTC
Hi,
I've commited the patch after adding appropriate systat.1 additions.

This PR will be closed if no complaints will arise...

Thanks for sending the addition.
Comment 4 Michael Reifenberger freebsd_committer freebsd_triage 2015-11-14 13:11:41 UTC
No complaints after commit.