jceel / py-libzfs

Python libzfs bindings
16 stars 8 forks source link

Size, Allocation for vdevs #11

Closed rmehta closed 8 years ago

rmehta commented 8 years ago

Where can I size, allocation etc for vdevs like I get in zpool list -v

Tried looking into the code but did not help. Is this implemented or WIP?

[frappe@freebsd-test ~/frappe-bench]$ zpool list -v
NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
p1           160M  1010K   159M         -     1%     0%  1.00x  ONLINE  -
  mirror      80M   968K  79.1M         -     2%     1%
    ada1        -      -      -         -      -      -
    ada2        -      -      -         -      -      -
  mirror      80M  41.5K  80.0M         -     1%     0%
    ada3        -      -      -         -      -      -
    ada4        -      -      -         -      -      -
zroot       14.5G  2.68G  11.8G         -    14%    18%  1.00x  ONLINE  -
  ada0p3    14.5G  2.68G  11.8G         -    14%    18%
jceel commented 8 years ago

It's now implemented: you can access those metrics via vdev.stats.allocated, vdev.stats.size, etc.