From dda0e1b7adc8cd20533b7110706b2ee36a4cd24b Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Tue, 26 Jan 2021 10:59:44 -0500 Subject: [PATCH] * ARCHIVE: Imported some tools from my stats work back in 2016. Warning: These tools are obsolete, and may or may not work. Orig-cwd: TURING:/home/wpurwant/hpc-explore/turing-hw/tests20160826 Sigs: # -rwx------ 1 wpurwant users 214 2016-09-13 11:58:21 show-disabled-nodes2.awk # -rwx------ 1 wpurwant users 111 2016-08-26 13:10:14 show-disabled-nodes.sh # -rwx------ 1 wpurwant users 122 2016-08-26 10:25:16 show-node-summary.sh # -rwx------ 1 wpurwant users 153 2016-08-26 12:06:25 show-non-full-nodes.sh # 71c64a7e6cd9df34ca6a9348ebc44ab1 show-disabled-nodes.sh # 8a3570829d132c526cc44adf72212887 show-disabled-nodes2.awk # ebbc0642cd29a1575670c86629d89c72 show-node-summary.sh # 5eee777a8380333654d3a06e3482f38e show-non-full-nodes.sh # dfb36573c6d758bc675f70247ff0befe9ddbe365 show-disabled-nodes.sh # d1995fc91d402c9dcc30adc0b461e2beaa25ab67 show-disabled-nodes2.awk # 3267d169b476396d66f6127e1343bd7c23b37e1f show-node-summary.sh # 18673a78914d9cce47c95d4fd5146805fc227416 show-non-full-nodes.sh --- sge/show-disabled-nodes.sh | 3 +++ sge/show-disabled-nodes2.awk | 23 +++++++++++++++++++++++ sge/show-node-summary.sh | 4 ++++ sge/show-non-full-nodes.sh | 4 ++++ 4 files changed, 34 insertions(+) create mode 100755 sge/show-disabled-nodes.sh create mode 100755 sge/show-disabled-nodes2.awk create mode 100755 sge/show-node-summary.sh create mode 100755 sge/show-non-full-nodes.sh diff --git a/sge/show-disabled-nodes.sh b/sge/show-disabled-nodes.sh new file mode 100755 index 0000000..1c7a95d --- /dev/null +++ b/sge/show-disabled-nodes.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./show-node-summary.sh | grep -v -e '^ed-' -e '^timed-' -e '^queuename' | awk '$6 != "" {print}' diff --git a/sge/show-disabled-nodes2.awk b/sge/show-disabled-nodes2.awk new file mode 100755 index 0000000..d1b4e6d --- /dev/null +++ b/sge/show-disabled-nodes2.awk @@ -0,0 +1,23 @@ +#!/bin/bash + +{ + if [ "$1" = "" ]; then + qstat -f + else + cat "$1" + fi +} \ + | awk ' + +/^queuename/ { next } +/^ed-/ || /^timed-/ { next } + +$1 ~ /^[a-z]+@/ && $6 ~ /^[a-z]+/ { + print + getline + print +} + +' + + diff --git a/sge/show-node-summary.sh b/sge/show-node-summary.sh new file mode 100755 index 0000000..81b743e --- /dev/null +++ b/sge/show-node-summary.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# ignore ed- and timed- queues. +egrep 'BIP *[0-9]+/[0-9]+/[0-9]+' qstat-f.txt | grep -v -e 'ed-' -e 'timed-' diff --git a/sge/show-non-full-nodes.sh b/sge/show-non-full-nodes.sh new file mode 100755 index 0000000..b8a8548 --- /dev/null +++ b/sge/show-non-full-nodes.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# only for main group +./show-node-summary.sh | grep '^main' | awk '$NF !~ /d[a-z]*/ {print}' | sort -k 3 | egrep -v '16/16 |20/20 |32/32 '