I wrote a pretty simple Perl script which outputs a list of open user sessions in an Ingres installation (remote or local). This information can also be retrieved using Ingres utilities iinamu and iimonitor, but not in a very straigth-forward fashion. The script is also a decent example how to access an Ingres database using Perl scripting language and Database Interface (DBI).
The script uses DBD-Ingres driver to access the imadb database, which is part of the Ingres Management Architecture (IMA). The script retrieves the necessary data from the imadb and then prints it. A short, concise list of open sessions is printed first with a more verbose listing (“iimonitor show user sessions formatted” alike) following.
The version 1.0 of the script is available at http://pauli.borodulin.fi/misc/ingres/ima_sessions-v1.0.pl. The requirements for running the script are listed in the beginning of the script.