Saturday, April 30, 2016

Part 11: Working with Citrix XenApp 6.5 – Managing Sessions [1/2]



Session management is an important part of managing the XenApp environment, after all every time a successful connection is made to the XenApp farm, resources and licenses are being utilized and thus at times, require our attention.
Normally, we use ICA as the protocol when we connect to the XenApp servers, that is on port 1494, however if we configure Session Reliability, we end up using port 2598 instead. We have three types of session states:
  1. Active – Session is currently in use by a user
  2. Idle – Session is idle, that is, the user is connected to the server, but not doing anything on the session
  3. Disconnected – user disconnected from the session, but the session is still open
It is worth noting, that even if the sessions are idle or disconnected, the resources on the server are still being utilized, this includes licenses.
Managing Sessions
Sessions can be managed through Citrix AppCenter by navigating to XenApp -> Farm -> Servers -> [XenApp Server] and clicking the Sessions tab
sessionsAs you can see under the sessions tab, we have a number of sessions that are currently open, including the console session. To better understand the information we’re presented, below is a description of the columns under the sessions/Users tab:
  • User – User that is currently connected
  • Session ID – a unique number that is given to each session, with 0 being the console session just like with remote desktop when we connect to the console. The listener sessions are numbered from 65537 and backward sequentially
  • Application – Application that is currently open
  • Type – The type of session that is currently open, either ICA or RDP
  • State – The state of the session, whether it’s disconnected, idle, listening, down, or active
  • Client Name – The name of the workstation that the session was imitated on
  • Logon Time – When the session was created
  • Idle Time – How long the session has been idle for
  • Server – Which XenApp server the session is currently open
Within users tab, we have the option of controlling the user session, for example, we could disconnect, reset, log off, send message, shadow, etc
sessions1

We can also manage sessions using Remote Desktop Services Manager, basically, we’ll see very similar information. We can access RDSM through Administrative Tools under Remote Desktop Services
sessions11
sessions12
Session Shadowing
what I do like to mention here, is the option of shadowing a user session. All we have to do chose Shadow when we right click on a user then log in

sessions2And now we’re able to see the application that the user has opened, in this case the application is remote desktop
sessions3
We can leverage the Shadow toolbar for more control over shadowing user sessions. The tool bar can be accessed by navigating to the CitrixAdministration ToolsShadow Taskbar
sessions9We can now see our XenApp environment along with the applications/users/servers which then allows us to shadow user’s session
sessions10
Other session shadowing options can be configured through Citrix Policies, for example, under the Shadowing options of the policy, we can configure settings like:
  • Input from shadow Connections
  • Log Shadow attempts
  • Notify user of pending shadow connections
  • Users who can shadow other users
  • Users who cannot shadow other users
sessions13
We can also send the user a message as a reminder to log off their session
sessions5The user should now receive this message
sessions4
Terminating User Process
Sometimes there are instances where a user opens an application through XenApp and that application then crashes. Other times, that application can cause high CPU usage on the XenApp server and impact the performance of the server which in turn, impacts user experience. We can terminate these application instances on a per user basis. This is effective when more than one user has the same application open, instead of closing the entire app for all the users, we can just terminate this application for that one user.
We can do this in two ways:
  1. Task Manager on the XenApp server
  2. Processes under Users tab on the XenApp server
The first option will do, however you’d have to RDP to the XenApp server in order to close the processes, however with the second option, we can do this remotely using the AppCenter console.
Task Manager
sessions6App Center
sessions7As you can see from above, we have two adobe acrobat process running for the user: Administrator, we can easily close one of those sessions by right clicking the process and choosing to terminate
sessions8
Be Sociable, Share!

No comments: