From a65338a8bf4724245d9b5fbd825dc76770db6b10 Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Thu, 25 Apr 2019 17:34:23 -0400 Subject: [PATCH] * Added "wgo" (what's going on) to check the status of processes on login node. Currently supposed to be used for Turing only. --- turing/admin/wgo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 turing/admin/wgo diff --git a/turing/admin/wgo b/turing/admin/wgo new file mode 100755 index 0000000..f95b43c --- /dev/null +++ b/turing/admin/wgo @@ -0,0 +1,19 @@ +#!/bin/bash + +DATETIME=$(date +"%Y%m%d-%H%M%S") +LOGDIR=$HOME/admin/login-patrol/turing + +whats_going_on () { + date + echo + top -b -n 1 | head -n 60 | tee $LOGDIR/top-${DATETIME} + echo + ps fuxa > $LOGDIR/ps-fuxa-${DATETIME} + cat $LOGDIR/ps-fuxa-${DATETIME} +} + +if test -t 1; then + whats_going_on | less +else + whats_going_on +fi