Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- arcSummary="$(python /usr/local/www/freenasUI/tools/arc_summary.py)"
- pools="$(zpool list -H -o name)"
- echo ""
- echo "[LIST]"
- echo "[*]Put your data type(s) here..."
- echo "[*]$(uptime)"
- for pool in $pools
- do
- used="$(zpool list -H -o allocated ${pool})"
- total="$(zpool list -H -o size ${pool})"
- echo "[*]${used}iB / ${total}iB (${pool})"
- done
- arc="$(echo "${arcSummary}" | grep -m 1 "ARC Size:" | awk '{print $4 $5}')"
- sizeMRU="$(echo "${arcSummary}" | grep "Recently Used Cache Size:" | awk '{print $6 $7}')"
- sizeMFU="$(echo "${arcSummary}" | grep "Frequently Used Cache Size:" | awk '{print $6 $7}')"
- ram="$(echo "${arcSummary}" | grep "Real Installed:" | awk '{print $3 $4}')"
- hit="$(echo "${arcSummary}" | grep "Cache Hit Ratio:" | awk '{print $4}')"
- pre="$(echo "${arcSummary}" | grep "Data Prefetch Efficiency:" | awk '{print $4}')"
- hitMRU="$(echo "${arcSummary}" | grep "Most Recently Used:" | awk '{print $4}')"
- hitMFU="$(echo "${arcSummary}" | grep "Most Frequently Used:" | awk '{print $4}')"
- hitMRUG="$(echo "${arcSummary}" | grep "Most Recently Used Ghost:" | awk '{print $5}')"
- hitMFUG="$(echo "${arcSummary}" | grep "Most Frequently Used Ghost:" | awk '{print $5}')"
- echo "[*]${arc} (MRU: ${sizeMRU}, MFU: ${sizeMFU}) / ${ram}"
- echo "[*]Hit ratio -> ${hit} (higher is better)"
- echo "[*]Prefetch -> ${pre} (higher is better)"
- echo "[*]Hit MFU:MRU -> ${hitMFU}:${hitMRU} (higher ratio is better)"
- echo "[*]Hit MRU Ghost -> ${hitMRUG} (lower is better)"
- echo "[*]Hit MFU Ghost -> ${hitMFUG} (lower is better)"
- echo "[/LIST]"
- echo ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement