pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by frymaster on Sun 22nd Mar 20:22
download | new post

  1. #### ZFS ####
  2. extend . zpool_name /bin/bash -c "/usr/bin/sudo /sbin/zpool list -H -o name"
  3. extend . zpool_snap /bin/bash -c "/usr/bin/sudo /sbin/zpool list -Ho name|for zpool in `xargs`;do /usr/bin/sudo /sbin/zfs get -rHp -o value usedbysnapshots $zpool|awk -F: '{sum+=$1} END{print sum}';done"
  4. extend . zpool_used /bin/bash -c "/usr/bin/sudo /sbin/zpool list -Ho name|xargs /usr/bin/sudo /sbin/zfs get -Hp -o value used"
  5. extend . zpool_data_used /bin/bash -c "/usr/bin/sudo /sbin/zpool list -Ho name|for zpool in `xargs`;do snap=`/usr/bin/sudo /sbin/zfs get -rHp -o value usedbysnapshots $zpool|awk -F: '{sum+=$1} END{print sum}'`;pool=`/usr/bin/sudo /sbin/zfs get -Hp -o value used $zpool`; echo $pool $snap|awk '{print ($1-$2);}';done"
  6. extend . zpool_available /bin/bash -c "/usr/bin/sudo /sbin/zpool list -Ho name|xargs /usr/bin/sudo /sbin/zfs get -Hp -o value available"
  7. extend . zpool_capacity /bin/bash -c "/usr/bin/sudo /sbin/zpool list -H -o capacity"
  8. #ARC Usage
  9. extend . arc_meta_max /bin/bash -c "grep arc_meta_max /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  10. extend . arc_meta_used /bin/bash -c "grep arc_meta_used /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  11. extend . arc_size /bin/bash -c "grep -m 1 size /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  12. extend . arc_meta_limit /bin/bash -c "grep arc_meta_limit /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  13. extend . arc_meta_c_max /bin/bash -c "grep c_max /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  14. #ARC Stats
  15. extend . arc_hits /bin/bash -c "grep -m 1 hits /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  16. extend . arc_misses /bin/bash -c "grep misses /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  17. #L2ARC Stats
  18. extend . arc_l2_hits /bin/bash -c "grep l2_hits /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"
  19. extend . arc_l2_misses /bin/bash -c "grep l2_misses /proc/spl/kstat/zfs/arcstats |awk -F' ' '{print $(NF)}'"#VFS IOPS
  20. #Zpool iostat
  21. extend . zpool_iostat_name /bin/bash -c "cd /proc/spl/kstat/zfs; /usr/bin/find  -maxdepth 1 -type d -printf '%f\\n' | /bin/grep -v '^\.$' | /usr/bin/sort"
  22. extend . zpool_iostat_read_bytes /bin/bash -c "/usr/bin/tail -qn1 /proc/spl/kstat/zfs/*/io | /usr/bin/awk '{print $1}'"
  23. extend . zpool_iostat_write_bytes /bin/bash -c "/usr/bin/tail -qn1 /proc/spl/kstat/zfs/*/io | /usr/bin/awk '{print $2}'"
  24. extend . zpool_iostat_read_num /bin/bash -c "/usr/bin/tail -qn1 /proc/spl/kstat/zfs/*/io | /usr/bin/awk '{print $3}'"
  25. extend . zpool_iostat_write_num /bin/bash -c "/usr/bin/tail -qn1 /proc/spl/kstat/zfs/*/io | /usr/bin/awk '{print $4}'"

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@

Remember my settings