TSUserLog
Created Date: May 13, 2008
Updated Date: May 13,2008
Description
TSUserLog is a simple Win32 logging utility that allows an administrator to capture Terminal Services user information, such as their session ID’s, states, and Winstation names. It also captures additional details regarding the Terminal Services session, and logs all this information to a CSV file at specified intervals (see the screen shot below).

Prerequisites
Windows XP Professional, Windows 2000 Server, or Windows Server 2003.
Terminal Services enabled
Installing TSUserLog
Download and unzip the attached file. There is no additional installation process.
How To Use TSUserLog
1. To configure the log file name and location, click the File menu, then click Set Log Path.

If you don’t configure a log file name and path here, then the log file is placed in the current directory in which the application is running, named TSUserLog.csv.
2. Enter a desired interval (in minutes) of when you want to query for the session information and have its results logged to the file. The default setting is 5 minutes.
Note: The minimum interval allowed is 1 minute.
3. Click Start to begin. (Notice that it becomes disabled and a progress control indicates that it is currently running.)
To hide this application but still allow the application to capture the session information, click Hide.
The following informational message appears:

After clicking OK, the application disappear. As the message indicates, pressing the [SHIFT + UP ARROW] on the keyboard causes the application to appear again.
To stop logging, click Stop on the application. Notice that the Start button becomes active again, ready for the next logging session.
What Gets Logged:
SESSION NAME |
ID |
STATE |
Published Application |
Client Name |
User Name |
Domain |
Initial Application |
Client Address |
Client Build Number |
Client Directory |
Working Directory |
Client Display |
TIME: |
Use Case:
This application was inspired by troubleshooting a deadlocked server, where the normal cause of the deadlock was a session going into a Down state. Typically, analyzing the full memory dump of the server can indicate which session is responsible for this; however, in most cases the memory dumps were corrupted to the point that it did not allow for this in-depth analysis. Knowing the problematic session ID before hand allows for a more direct approach when analyzing the memory dump because it allows you to delve directly into the problem session memory space for analysis.
Uninstalling TSUserLog
Delete the file TSUserlog.exe.
Disclaimer
This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.