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

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