getStatus.sh 426 Bytes
#!/bin/bash


PORTS="20000 9004 9000 9001 11000 11000 11001 10001 20001 10009 20009 10010 20010 10023 20023 10021 10020 10018 10022 10004 10024 10034 10013 10014 10015 10019 10007 10027 10028 10029 10008 10012 10016 10017"


ALL_UP=1

for PORT in $PORTS
do
    ss -l | grep ":"$PORT > /dev/null  2>&1
    if [ $? == 1 ]
    then
        ALL_UP=0
        echo `date` ": Port $PORT is not listening"
        #break
    fi
done