i've used the following:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"select name from domains where status<256" | awk '$1!="name"{print $1}' | xargs -i /usr/local/psa/bin/domain_pref -i {} | egrep "limits\:|Expiration" | awk 'BEGIN{x=0};{if(x==1){x=0;print y" "$3","$4$5}else{y=$2;x++;}}'...