Added utilities

This commit is contained in:
Gal@Shefet 2023-07-11 23:18:28 -04:00
parent 469c5345ac
commit 9860c9a2d6
2 changed files with 18 additions and 0 deletions

3
get-queue.sh Executable file
View File

@ -0,0 +1,3 @@
#! /usr/bin/env bash
midclt call core.get_jobs | jq -r '.[] | select( .time_finished == null ) | "\(.id) - \(.arguments[0])"'

15
release-mem.sh Executable file
View File

@ -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