From 9860c9a2d6672da3260f9b56b235675e03573880 Mon Sep 17 00:00:00 2001 From: "Gal@Shefet" Date: Tue, 11 Jul 2023 23:18:28 -0400 Subject: [PATCH] Added utilities --- get-queue.sh | 3 +++ release-mem.sh | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 get-queue.sh create mode 100755 release-mem.sh diff --git a/get-queue.sh b/get-queue.sh new file mode 100755 index 0000000..0163a75 --- /dev/null +++ b/get-queue.sh @@ -0,0 +1,3 @@ +#! /usr/bin/env bash +midclt call core.get_jobs | jq -r '.[] | select( .time_finished == null ) | "\(.id) - \(.arguments[0])"' + diff --git a/release-mem.sh b/release-mem.sh new file mode 100755 index 0000000..8d36741 --- /dev/null +++ b/release-mem.sh @@ -0,0 +1,15 @@ +#! /usr/bin/env bash +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +USER_HOME=$HOME +[[ -n "${SUDO_USER}" ]] && USER_HOME="$(eval "echo ~${SUDO_USER}")" +. ${SHRC_D:-$SCRIPT_DIR}/01_util.functions + +set -e + +require_root + +echo 1 > /proc/sys/vm/drop_caches +echo 2 > /proc/sys/vm/drop_caches +echo 3 > /proc/sys/vm/drop_caches; +sync +