From 05095f16fbb3b72b2209d39b5a8995d977d7faee Mon Sep 17 00:00:00 2001 From: Quotengrote <38253905+quotengrote@users.noreply.github.com> Date: Sat, 29 Aug 2020 11:01:20 +0200 Subject: [PATCH] Parameter watch-Scripte erweitert und ausgeschrieben (#17) --- roles/mgrote.install_packages/templates/hddtemps.sh | 2 +- roles/mgrote.install_packages/templates/systemtemps.sh | 2 +- roles/mgrote.zfs_tools/tasks/main.yml | 2 +- roles/mgrote.zfs_tools/templates/zfs-free.sh | 2 ++ roles/mgrote.zfs_tools/templates/zfs-free.sh.j2 | 3 --- 5 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 roles/mgrote.zfs_tools/templates/zfs-free.sh delete mode 100644 roles/mgrote.zfs_tools/templates/zfs-free.sh.j2 diff --git a/roles/mgrote.install_packages/templates/hddtemps.sh b/roles/mgrote.install_packages/templates/hddtemps.sh index bac98cfe..6a13a6f5 100644 --- a/roles/mgrote.install_packages/templates/hddtemps.sh +++ b/roles/mgrote.install_packages/templates/hddtemps.sh @@ -1,2 +1,2 @@ #!/bin/bash -watch -c -n 5 -t "hddtemp /dev/disk/by-id/ata-* | grep -v "part" | sed -r 's#(/dev/disk/by-id/ata-)([^:]+).*: ([0-9]{1,3}°C)#\3\t\2#g' | sort -n -r" +watch --interval 10 --differences --color --no-title "hddtemp /dev/disk/by-id/ata-* | grep -v "part" | sed -r 's#(/dev/disk/by-id/ata-)([^:]+).*: ([0-9]{1,3}°C)#\3\t\2#g' | sort -n -r" diff --git a/roles/mgrote.install_packages/templates/systemtemps.sh b/roles/mgrote.install_packages/templates/systemtemps.sh index 2d249fb4..449ad12c 100644 --- a/roles/mgrote.install_packages/templates/systemtemps.sh +++ b/roles/mgrote.install_packages/templates/systemtemps.sh @@ -1,2 +1,2 @@ #!/bin/bash -watch -n 10 --color --no-title "ipmitool sensor | cut -d '|' -f 1-3 | grep -i "degrees" | sort -k2 -r | sed -r 's/degrees C/°C/'" +watch --interval 10 --differences --color --no-title "ipmitool sensor | cut -d '|' -f 1-3 | grep -i "degrees" | sort -k2 -r | sed -r 's/degrees C/°C/'" diff --git a/roles/mgrote.zfs_tools/tasks/main.yml b/roles/mgrote.zfs_tools/tasks/main.yml index 2ce31627..cb29b37e 100644 --- a/roles/mgrote.zfs_tools/tasks/main.yml +++ b/roles/mgrote.zfs_tools/tasks/main.yml @@ -81,5 +81,5 @@ become: yes template: mode: 0555 - src: zfs-free.sh.j2 + src: zfs-free.sh dest: /usr/local/bin/zfs-free.sh diff --git a/roles/mgrote.zfs_tools/templates/zfs-free.sh b/roles/mgrote.zfs_tools/templates/zfs-free.sh new file mode 100644 index 00000000..3f0be813 --- /dev/null +++ b/roles/mgrote.zfs_tools/templates/zfs-free.sh @@ -0,0 +1,2 @@ +#! /bin/bash +watch --interval 60 --differences --color --no-title "zfs list -o space | grep -v /" diff --git a/roles/mgrote.zfs_tools/templates/zfs-free.sh.j2 b/roles/mgrote.zfs_tools/templates/zfs-free.sh.j2 deleted file mode 100644 index 79029f5a..00000000 --- a/roles/mgrote.zfs_tools/templates/zfs-free.sh.j2 +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - -zfs list -o space | grep -v /