Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitor User Usage

Status
Not open for further replies.

jeff5144

IS-IT--Management
Dec 5, 2001
74
US
Hi there,

Does anyone know of any way or utility to monitor user usage. We have Windows Terminal Server 4.0 with Citrix 1.0.
We basically want to be able to monitor if someone says there logged into citrix from 8 am to 5 pm. We want to be able to go back and verify that they were actually logged in at that time.

Thanks
Jeff Doe
jdoe@satmansys.com
 
We use several scrips that are auto-run to monitor some of our users:
...... begin batch file .................................
@ECHO OFF
cd "C:\Reports\"
setlocal enableextensions

ECHO --------------------------------->>logtimes.txt
ECHO Users logged on the server as of %TIME% on %DATE% >> logtimes.txt

FOR /F "EOL=> TOKENS=1* " %%A IN ('QUERY USER ^| FIND " Disc "') DO CALL :FindThemAll %%A %%B %%c
FOR /F "EOL=> TOKENS=1,2* " %%A IN ('QUERY USER ^| FIND " Active "') DO CALL :FIndThemAll2 %%A %%C %%D
GOTO :endit

:FindThemAll
ECHO Disc user %1 with ID %2, on since %6 %7, %5 >> logtimes.txt
GOTO :EOF

:FindThemAll2
ECHO Active user %1 with ID %2, on since %6 %7, %5, idle time: %4 >> logtimes.txt
GOTO :EOF

:endit
ECHO Finished list at %TIME% on %DATE% >> logtimes.txt
......... end batch file ...........................

Copy the above into a batch file (watch for line wrap), create "Reports" directory in the C: drive (or modify the batch file) use scheduler to run it at the times you need, the results will nicely formatted text file. Let me know if you have questions.
 
Hi there,

Thanks for the batch file, I created a batch file and copied the text into it. I logged on to citrix and then logged off. Then ran the batch file. It doesnt appear to have logged my usage time? Does this need to reside in a citrix directory? I tried breaking down the batch file to understand each command and was kinda confused as to where it logs information. Any help would be great!
Jeff
 
This batch file can ONLY tell who is logged in at the time the file is run, if they are active or inactive, and the length of time they have been inactive. You can run it in your own session, or use the task scheduler to run it at specified times. We use it as a free way to tell when our people log in in the morning, and to tell who is logged in late in the evening. There are other tools out there, but they are expensive and this is free, gives me the info I need.
 
Hi,

Sounds good...Call me stupid, but I cannot find the task scheduler in control panel, nor under accessories in terminal server. I tried typing in AT in a cmd prompt..Nothing happened. But more importantly, the batch file executes nicely, however does not produce any results in the text file. I only modified the batch file to reflect C:\reports to I:\reports (since I is the local drive letter). Would you be able to tell me what im doing wrong?
Thanks much! Your a life saver!
 
If the batch file doesn't run properly, modify it by getting rid of "@ECHO OFF", and all instances of ">> logtimes.txt" When you go to a command prompt and run the batch file, everything prints to the screen where hopefully you can tell me what doesn't work right. As far as the task scheduler - look in the "Control Panel" for "Scheduled Tasks", if it is not there,??????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top