19.5.8. The connection_events view

Note

The structure of these database tables may change in future PSM versions.

For terminal connections, this view collects the commands issued in a connection. For graphical connections, this view collects the window titles detected in the connection. The view is defined as follows:

select
  channels._connection_channel_id as id,
  events.event,
  events.printable
from channels,
     events
where channels.id = events.channel_id;

Querying the table (for example, select * from connection_events limit 10;) will return results similar to the following:

 id |                                         event             | printable
----+-------------------------------------------------------------+-----------
 1  | [user@exampleserver ~]$ ls                                  | t
 1  | [user@exampleserver ~]$ exit                                | t
 2  | [user@exampleserver ~]$ su -                                | t
 2  | Password:                                                   | t
 2  | [root@exampleserver ~]#                                     | t
 2  | [root@exampleserver ~]# ifconfig                            | t
 2  | [root@exampleserver ~]# ifconfig                            | t
 2  | [root@exampleserver ~]# ifconfig                            | t
 4  | [user@exampleserver ~]$                                     | t
 4  | [user@exampleserver ~]$                                     | t

The the connection_events view has the following columns.

ColumnTypeDescription
event text The command executed, or the window title detected in the channel (for example, ls, exit, or Firefox).
id integer The unique ID number of the entry.
printable boolean Set to 1 if every character of the command can be displayed.

Table 19.7. Columns of the connection_events table