## Sessions

Sun Ray sessions are groups of services or applications that are associated with an authentication token. They reside on a Sun Ray server and can be directed to any Sun Ray DTU.

Sessions can be in one of two states, Connected or Disconnected:

- Connected: Every session with state connected is displayed on a DTU. The session is automatically disconnected when the user removes the smart card or explicitly switches the DTU to a different session, for example, with the `utswitch` or `utselect` commands.

- Disconnected: These sessions are still executed on a server but are not connected to a DTU and, consequently, are not displayed. However, a user can reconnect to a disconnected session, for example by inserting a smart card containing the appropriate token into the card reader on a DTU. This changes the session's state to connected and causes it to be displayed on that DTU.

Sessions can further be grouped into two categories:

- Idle sessions: These sessions typically display only a login screen (or login greeter such as dtlogin) where no user has been logged in yet. The lifetime of these sessions is controlled by the Sun Ray system. For example, disconnected idle sessions are automatically terminated (reaped off) by the system after a specific time interval.

- User sessions (or non-idle sessions): These are sessions with UNIX users logged in. Users may start up additional applications from within the sessions, thus potentially consuming a lot of system resources. User sessions are therefore of more interest to administrators than idle sessions. To free system resources, monitor the number of long-running disconnected user sessions and, when appropriate, terminate sessions that are no longer in use.

Much like the `utsession` command, the Sessions tab lists all sessions that currently reside on the Sun Ray servers. You can search for specific sessions by entering a search string that includes parts of the UNIX user name, token identifier, token owner, or the DTU identifier. The Search menu allows you to further limit the scope of the search to a specific server.