QTP license server connection timeout

Hi,

 

I am running 10 QTPs using the concurrent license mode.

 

Is there any where that i can configure a user timeout so that any inactive QTP connection will be automatically disconnected from the license server , freeing up the licenses for others?

 

 

Pls advise.

 

 

Thanks

 

Tags:

Parents
  • Hi,

     

    You can create a QTP launcher, and ask anyone to start QTP using it.

    This launcher can monitor QTP process (QTPro.exe) for memory and CPU (E.g. get values every 2 sec), and after pre-defined timeout that there was no change in memory, it is clearly that this instance is idle, and can be "killed".

     

    To be more polite, it is recommended to use QTP com object and save current work before killing QTP process, or at least pop-up a big message box that QTP is about to be killed in about 5 minutes.

     

    Good luck,

    Tomer.

  • strComputer ="."
    Set wshShell =wscript.CreateObject("WScript.Shell")
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colProcesses = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Process",,48)
    For Each objItem in colProcesses
    if objItem.Name <> "Idle"  and objItem.Name <> "_Total" then
            If instr(objItem.Name,"UFT")<>0 and objItem.PercentProcessorTime < 5 Then
               wshShell.Run "taskkill /f /im UFT.exe", , True
               Exit for
            End if
    End if
    Next

    You can use wait or sleep accordingly

Reply
  • strComputer ="."
    Set wshShell =wscript.CreateObject("WScript.Shell")
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colProcesses = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Process",,48)
    For Each objItem in colProcesses
    if objItem.Name <> "Idle"  and objItem.Name <> "_Total" then
            If instr(objItem.Name,"UFT")<>0 and objItem.PercentProcessorTime < 5 Then
               wshShell.Run "taskkill /f /im UFT.exe", , True
               Exit for
            End if
    End if
    Next

    You can use wait or sleep accordingly

Children
No Data