Sqlpj is an command-line sql monitor implemented in perl, but using JDBC for database connectivity.