echo ""
echo "LOGGED IN CLIENTS"
redis-cli -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^redis.host" -m 1 | sed 's/^.*=//'` SMEMBERS c:li | xargs -0 echo | tr -cd '[[a-f][0-9]]\n' | xargs -I % mysql -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.host" -m 1 | sed 's/^.*=//'` -u`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.username" -m 1 | sed 's/^.*=//'` `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.dbname" -m 1 | sed 's/^.*=//'` -p`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.password" -m 1 | sed 's/^.*=//'` -e "SELECT ui.user_ID, ui.type, ui.userIdentifier, ut.clientId, ut.lastLogin FROM UserIdentifier ui, UserToken ut WHERE ut.clientId='%' AND ui.user_ID=ut.user_ID;"

echo ""
echo "LOGGED IN USERS"
redis-cli -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^redis.host" -m 1 | sed 's/^.*=//'` SMEMBERS c:li | xargs -0 echo | tr -cd '[[a-f][0-9]]\n' | xargs -I % redis-cli -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^redis.host" -m 1 | sed 's/^.*=//'` GET c:% | tr -cd '[[a-f][\-][0-9]]\n' | xargs -I % mysql -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.host" -m 1 | sed 's/^.*=//'` -u`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.username" -m 1 | sed 's/^.*=//'` `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.dbname" -m 1 | sed 's/^.*=//'` -p`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseAuth.password" -m 1 | sed 's/^.*=//'` -e "SELECT user_ID, type, userIdentifier FROM UserIdentifier WHERE user_ID='%';"

echo ""
echo "LOGGED IN PERSONS"
redis-cli -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^redis.host" -m 1 | sed 's/^.*=//'` SMEMBERS c:li | xargs -0 echo | tr -cd '[[a-f][0-9]]\n' | xargs -I % redis-cli -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^redis.host" -m 1 | sed 's/^.*=//'` GET c:% | tr -cd '[[a-f][\-][0-9]]\n' | xargs -I % mysql -h `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseProject.host" -m 1 | sed 's/^.*=//'` -u`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseProject.username" -m 1 | sed 's/^.*=//'` `sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseProject.dbname" -m 1 | sed 's/^.*=//'` -p`sed '/^\#/d' /etc/pfserver/env.properties | grep "^databaseProject.password" -m 1 | sed 's/^.*=//'` -e "SELECT DISTINCT(ID), firstName, lastName FROM Person WHERE userId='%';"