comparison usr/src/test/zfs-tests/include/libtest.shlib @ 25465:2c417db70a87

3525 Persistent L2ARC Portions contributed by: Saso Kiselkov <skiselkov@gmail.com> Portions contributed by: Jorgen Lundman <lundman@lundman.net> Portions contributed by: Brian Behlendorf <behlendorf1@llnl.gov> Portions contributed by: Alexander Motin <mav@FreeBSD.org> Portions contributed by: Jason King <jason.king@joyent.com> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
author George Amanakis <gamanakis@gmail.com>
date Thu, 30 Jul 2020 18:40:44 -0500
parents 06c80fdd502b
children 6e6fa6693b95
comparison
equal deleted inserted replaced
25464:5cc24028580a 25465:2c417db70a87
2904 echo "Cannot calculate SHA256 digest" 2904 echo "Cannot calculate SHA256 digest"
2905 return 1 2905 return 1
2906 fi 2906 fi
2907 return 0 2907 return 0
2908 } 2908 }
2909
2910 function get_arcstat # stat
2911 {
2912 if is_linux; then
2913 typeset stat=$1
2914 typeset zfs_arcstats="/proc/spl/kstat/zfs/arcstats"
2915 [[ -f "$zfs_arcstats" ]] || return 1
2916 grep $stat $zfs_arcstats | awk '{print $3}'
2917 return $?
2918 else
2919 kstat -p zfs::arcstats:$1 | awk '{ print $2 }'
2920 return $?
2921 fi
2922 }