| || |
Finding logged-in users in Robot or TestManager
Hello, I surfed through RDN and found some code that shows me what user is logged in to Robot (I will post it below). If I want to see users logged in, do I need to point to the license server or are there other areas where I can look. I tried to run this script: (lmutil lmstat -a -c rational_redirect.dat) but it doesn't work if its ran against C:\program Files\Rational\Common\
Also, after reviewing the code below, where the heck do I run this? Is it in a .sbl or .rec? Or am I way off and it needs to be ran in another program.
Here is the code:
Function GetUserName& Lib "advapi32.dll" Alias "GetUserNameA"
(ByVal lpBuffer As String, nSize As Long)
Dim sUsername As String
Dim lLength As Long
Dim lRetval As Long
' Create room in the buffer to receive the returned string.
sUsername = Space(255) ' room for 255 characters
' initialize the size of the string
lLength = Len(sUsername)
'Get The User Name
lRetval = GetUserName(sUsername, lLength)
' extract the returned info from the buffer less the Null
sUsername = Left(sUsername, lLength - 1)
Re: Finding logged-in users in Robot or TestManager
You don't need to do all that!
If you look in your rational common directory, you will find an exe called lmtools.exe
Run this program, and select the Server Status Tab. Select the Perform Status Enquiry button.
Your server status, anlong with license useage and users will appear. This only works for users that use the license server (not fixed licenses)
Much easier huh?