From cdcc2548ed2b99bdef8c22e206bc003f7c4e785a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 4 Aug 2022 21:13:43 +0200 Subject: nice dstat.sh script for ch-promethues and ch-epimetheus --- chaos-at-home/ch-epimetheus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'chaos-at-home/ch-epimetheus.yml') diff --git a/chaos-at-home/ch-epimetheus.yml b/chaos-at-home/ch-epimetheus.yml index 98eab3e2..148cda82 100644 --- a/chaos-at-home/ch-epimetheus.yml +++ b/chaos-at-home/ch-epimetheus.yml @@ -58,8 +58,11 @@ mode: 0755 content: | #!/bin/bash + {% set disk_variables = [] %} disk_primary=$(basename $(realpath '{{ install.disks.primary }}')) + {{ disk_variables.append('$disk_primary') -}} {% for name,volume in luks_volumes.items() %} disk_{{ name | replace('-', '_') }}=$(basename $(realpath '{{ volume.device }}')) + {{ disk_variables.append('$disk_'+(name | replace('-', '_'))) -}} {% endfor %} - exec dstat -cnd -N {{ network.primary.name }} -D "$disk_primary,$disk_{{ luks_volumes | map('replace', '-', '_') | join(',$disk_') }}" --disk-util --top-io --top-bio + exec dstat -cnd -N {{ network.primary.name }} -D "{{ disk_variables | join(',') }}" --disk-util --top-io --top-bio -- cgit v1.2.3