Projet

Général

Profil

Révision 60600d6b

ID60600d6b63bf526648f9f1676bd765c506c3cbcd
Parent d7c353b9
Enfant a68ed9a1

Ajouté par Tim Connors il y a environ 4 ans

zfs list -t filesystem,volume to suppress snapshots

zfs list might list a bunch of transient snapshots if `zpool
listsnapshots=on` and something like zfs-auto-snapshot is used. It's
also not useful to graph them since they're unchanging in time, and
the parent volume is graphed anyway. Limit zfs list to
"filesystem,volume" instead of "all" including snapshots

Voir les différences:

plugins/zfs/zfs_list
31 31
fi
32 32

  
33 33
if [ "$1" = "config" ]; then
34
	for i in `zfs list -Hp | awk '{print $1}'`; do
34
	for i in `zfs list -Hp -t filesystem,volume | awk '{print $1}'`; do
35 35
		values=( $(zfs get -p usedbydataset,usedbychildren,usedbysnapshots,usedbyrefreservation,available,quota $i | awk 'BEGIN {total=0;} { if( NR==1 ) next; } !/quota/ {total=total+$3;} {print $3} END{print total;}') )
36 36
		fsname=$(clean_fieldname $(echo "$i" | sed 's/\//__/g'))
37 37

  
......
75 75
	exit 0
76 76
fi
77 77

  
78
for i in `zfs list -Hp | awk '{print $1}'`; do
78
for i in `zfs list -Hp -t filesystem,volume | awk '{print $1}'`; do
79 79
	values=( $(zfs get -p usedbydataset,usedbychildren,usedbysnapshots,usedbyrefreservation,available,quota $i | awk 'BEGIN {total=0;} { if( NR==1 ) next; } !/quota/ {total=total+$3;} {print $3} END{print total;}') )
80 80
	fsname=$(clean_fieldname $(echo "$i" | sed 's/\//__/g'))
81 81

  

Formats disponibles : Unified diff