You have not specified your O/S or PostgreSQL version, but if you are running on a Linux O/S, you can run the attached current_queries.sh, which loops every 5 seconds by default.
Note the usage options below:
usage() {
echo "Usage: $0 [-s <sleeptime> -d <dbname> -h <host> -U <user> -p <port> -x -i]"
echo "-x will exit after 1 iteration"
echo "-i will exclude <IDLE> queries"
exit 1
}