summaryrefslogtreecommitdiff
path: root/roles/elevate/media/templates/dstat.sh.j2
blob: 2ff572fb18f7e7cfdb77059329b273459f33b2c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

SSD=$(readlink -f {{ install.disks.primary }} | xargs basename)
declare -a ZPOOL_DISKS
{% for disk in zfs_pools.storage.create_vdevs | split | select('ne', 'raidz') %}
ZPOOL_DISKS+=($(readlink -f {{ disk }} | xargs basename))
{% endfor %}

DISKS="$SSD"$(printf ",%s" "${ZPOOL_DISKS[@]}")
if [ -n "$1" ]; then
  DISKS="$DISKS,$1"
fi

exec dstat -cymnd -D "$DISKS" --top-io --top-bio