Create a script that can be run via cron to periodically gather info about user counts. This can be useful for helping diagnose connection pools that are not releasing their connections.
Set the following variables according to your environment:
ORACLE_SID, ORACLE_HOME, PROJDIR
Note: The Backslash contained in the v$session reference is so the $ character is escaped properly. If you repurpose this script keep in mind any $ symbols in the text passed to SQLPLUS from the shell script must be escaped in the manner.