Custom HPC software & tools from Wirawan. Primarily tailored toward ODU HPC sytems.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DATETIME=$(date +"%Y%m%d-%H%M%S")
|
|
|
|
|
|
|
|
CLUSTER=$(cat /etc/cluster)
|
|
|
|
|
|
|
|
case "$CLUSTER" in
|
|
|
|
turing)
|
|
|
|
LOGDIR=$HOME/admin/login-patrol/turing
|
|
|
|
;;
|
|
|
|
wahab)
|
|
|
|
LOGDIR=$HOME/admin/login-patrol/wahab
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Error: unsupported cluster: $CLUSTER" >&2
|
|
|
|
exit 2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
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
|