mirror_zfs/cmd
Matthew Ahrens 7b232e9354
arcstat: add 'avail', fix 'free'
The meaning of the `free` field is currently `zfs_arc_sys_free`, which
is the target amount of memory to leave free for the system, and is
constant after booting.

This commit changes the meaning of `free` to arc_free_memory(), the
amount of memory that the ARC considers to be free.

It also adds a new arcstat field `avail`, which tracks
`arc_available_memory()`.

Since `avail` can be negative, it also updates the arcstat script to
pretty-print negative values.

example output:

  $ arcstat -f time,miss,arcsz,c,grow,need,free,avail 1
      time  miss  arcsz     c  grow  need  free  avail
  15:03:02   39K   114G  114G     0     0  2.4G  407M
  15:03:03   42K   114G  114G     0     0  2.1G  120M
  15:03:04   40K   114G  114G     0     0  1.8G  -177M
  15:03:05   24K   113G  112G     0     0  1.7G  -269M
  15:03:06   29K   111G  110G     0     0  1.6G  -385M
  15:03:07   27K   110G  108G     0     0  1.4G  -535M
  15:03:08   13K   108G  108G     0     0  2.2G  239M
  15:03:09   33K   107G  107G     0     0  1.3G  -639M
  15:03:10   16K   105G  102G     0     0  2.6G  704M
  15:03:11  7.2K   102G  102G     0     0  5.1G  3.1G
  15:03:12   42K   103G  102G     0     0  4.8G  2.8G

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10494
2020-06-26 18:05:28 -07:00
..
arc_summary Fixes for make dist 2020-06-26 14:20:02 -07:00
arcstat arcstat: add 'avail', fix 'free' 2020-06-26 18:05:28 -07:00
dbufstat Fix check for sed --in-place 2020-06-24 18:19:59 -07:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs mount: use the mount syscall directly 2020-05-20 18:02:41 -07:00
raidz_test Mark functions as static 2020-06-18 12:20:38 -07:00
vdev_id Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zdb Add block histogram to zdb 2020-06-26 15:09:20 -07:00
zed Fixes for make dist 2020-06-26 14:20:02 -07:00
zfs zfs allow/unallow should work with numeric uid/gid 2020-06-19 10:38:43 -07:00
zfs_ids_to_path Mark functions as static 2020-06-18 12:20:38 -07:00
zgenhostid bash scripts: use /usr/bin/env for bash shebangs 2020-02-10 13:13:46 -08:00
zhack File incorrectly zeroed when receiving incremental stream that toggles -L 2020-06-09 10:41:01 -07:00
zinject Mark functions as static 2020-06-18 12:20:38 -07:00
zpool Remove dead code 2020-06-18 12:21:18 -07:00
zstream Fixed LDADD library links in Makefiles for cross compilation builds 2020-05-09 10:17:08 -07:00
zstreamdump Minor zstream redup command fixes 2020-04-10 21:10:09 -07:00
ztest Remove unnecessary terminology from error-injection in ztest 2020-06-22 09:48:36 -07:00
zvol_id OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am Small program that converts a dataset id and an object id to a path 2020-05-20 10:05:33 -07:00