diff --git a/archive/server_setup/acctStatusChecks.sh b/archive/server_setup/acctStatusChecks.sh index 6c346387..6665041a 100644 --- a/archive/server_setup/acctStatusChecks.sh +++ b/archive/server_setup/acctStatusChecks.sh @@ -4,10 +4,22 @@ here="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" cd $here -sudo ls -1 /var/sftp > done.txt +sudo ls -1 /var/sftp > moved.txt +grep batchs /home/ubuntu/prod/data/reports/stationlogins.txt |awk '{print $3}'| sort > switched.txt grep ukmonh /home/ubuntu/prod/data/reports/stationlogins.txt |awk '{print $3}'| sort > pending.txt ssh ukmonhelper2 "~/prod/server_setup/get-nbd.sh" | while read i ; do echo $i | awk -F"/" '{print $4}' ; done > not-being-done.txt ssh ukmonhelper2 "~/prod/server_setup/get-all.sh" | while read i ; do echo $i | awk -F"/" '{print $4}' ; done > all-accounts.txt python ~/src/ukmda-dataprocessing/archive/server_setup/checkSftpAccounts.py + +echo "Moved: $(wc -l moved.txt | awk '{print $1}')" +echo "Switched: $(wc -l switched.txt | awk '{print $1}')" +echo "Pending: $(wc -l pending.txt | awk '{print $1}')" +echo "Total: $(wc -l still-live.txt | awk '{print $1}')" +echo "" +echo "Not Live: $(wc -l not_live.txt | awk '{print $1}')" +echo "Not Upl: $(wc -l not_uploading.txt | awk '{print $1}')" +echo "" +echo "Dead: $(wc -l not-being-done.txt | awk '{print $1}')" +echo "" diff --git a/archive/server_setup/checkSftpAccounts.py b/archive/server_setup/checkSftpAccounts.py index 8149c018..6e4f5e90 100644 --- a/archive/server_setup/checkSftpAccounts.py +++ b/archive/server_setup/checkSftpAccounts.py @@ -56,7 +56,7 @@ for cam in not_live: outf.write(','.join(cam) + '\n') -donelist = open('done.txt', 'r').readlines() +donelist = open('moved.txt', 'r').readlines() donelist = [x.strip() for x in donelist] with open('todo.txt', 'w') as outf: for nam in livenames: