1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00
2021-03-18 20:07:25 +01:00

24 lines
772 B
Bash
Executable File

#!/bin/bash
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version. Please see LICENSE.txt at the top level of
# the source code distribution for details.
# @author SvennD <svennd@svennd.be>
# required
# shellcheck disable=SC1091
source /etc/profile.d/sge-binaries.sh;
QSTAT="/opt/gridengine/bin/linux-x64/qstat"
RUNNING_JOBS=$($QSTAT -u "*" -s r | wc -l)
PENDING_JOBS=$($QSTAT -u "*" -s p | wc -l)
SUSPEND_JOBS=$($QSTAT -u "*" -s s | wc -l)
ZOMBIE_JOBS=$($QSTAT -u "*" -s z | wc -l)
echo "$RUNNING_JOBS";
echo "$PENDING_JOBS";
echo "$SUSPEND_JOBS";
echo "$ZOMBIE_JOBS";