Skip to content
Snippets Groups Projects
q 625 B
Newer Older
#!/bin/bash
# q -- created 2017-02-15, Renato Alves

if [ -f "$(which squeue 2>/dev/null)" ]; then
    if [ "$#" == "0" ]; then
        squeue -u "$(whoami)" -o "%.24i %.9P %.25j %.2t %.7c %.7m %.5D %.6q %.10f %.10b %.11l %.11M %.30R"
        squeue -o "%.24i %.9P %.25j %.2t %.10u %.10g %.7c %.7m %.5D %.6q %.10f %.10b %.11l %.11M %.30R" "$@"
    fi
elif [ -f "$(which bjobs 2>/dev/null)" ]; then
    bjobs "$@"
elif [ -f "$(which qstat 2>/dev/null)" ]; then
    if [ "$#" == "0" ]; then
        qstat -u '*'
    else
        qstat "$@"
    fi
else
    echo >&2 "No queueing system found. Giving up."
    exit 1
fi