diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/elevate/media/templates/dstat.sh.j2 | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/roles/elevate/media/templates/dstat.sh.j2 b/roles/elevate/media/templates/dstat.sh.j2 index 1fb84dfd..fe1848da 100644 --- a/roles/elevate/media/templates/dstat.sh.j2 +++ b/roles/elevate/media/templates/dstat.sh.j2 @@ -1,9 +1,14 @@ #!/bin/bash -SSD=$(readlink -f /dev/disk/by-id/ata-Samsung_SSD_840_Series_S14GNEACC92243K) -RAID_DISK0=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N6PJ1CSJ) -RAID_DISK1=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVLUE) -RAID_DISK2=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N2AYHY8E) -RAID_DISK3=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N2AYH7RF) +SSD=$(readlink -f /dev/disk/by-id/ata-Samsung_SSD_840_Series_S14GNEACC92243K | xargs basename) +RAID_DISK0=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N6PJ1CSJ | xargs basename) +RAID_DISK1=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVLUE | xargs basename) +RAID_DISK2=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N2AYHY8E | xargs basename) +RAID_DISK3=$(readlink -f /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N2AYH7RF | xargs basename) -exec dstat -cymnd -D $SSD,$RAID_DISK0,$RAID_DISK1,$RAID_DISK2,$RAID_DISK3 --top-io --top-bio +DISKS="$SSD,$RAID_DISK0,$RAID_DISK1,$RAID_DISK2,$RAID_DISK3" +if [ -n "$1" ]; then + DISKS="$DISKS,$1" +fi + +exec dstat -cymnd -D "$DISKS" --top-io --top-bio |