ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
Commodore
Commodore
350 views

Kill a user session if idletime superior to X

Hey. Version 9.32. There is an integration user that for some reason gets stuck and creates a lot of sessions. Most of them idle. What is the best way to:

- if the user is X and idletime is X, kill user session?

 

Thanks.

5 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Take a look at the thread bellow and se if it works for you:
https://community.microfocus.com/t5/Service-Manager-Service-Center/How-to-set-session-out-time-for-a-user-in-SM/td-p/1645358

 

You can also instruct the developer to use keep alive to not overload SM with multiple logins and to execute the logoff at the end. 

You can also adjust the parameter https://docs.microfocus.com/SM/9.41/Codeless/Content/parameters/reference/parameter_webservicestimeout.htm

Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
0 Likes
Commodore
Commodore

In the operator table there is a field called "idletime". The form didn't have the field so I placed a text field with the input "idletime". Added 5 minutes and saved. This didn't work. My issue is that there are intergration users that get their sessions idle for more than 20 minutes.

The inactivity timer setup works on a general level. The goal is to place this rule on 1 user only.

0 Likes
Vice Admiral
Vice Admiral

You may want to consider limiting sessions for users and updating the idle time. If user is stuck and cannot wait for idle time to kill session on its own, you can manually kill there sessions from "System Status".

Limiting Session:
Menu Navigation
-System Administration
--Base System Configuration
---Miscellaneous
----System Information Record (Within Login Info tab, update the max logins per user.)

Setting Idle Time:
Menu Navigation
-System Administration
--Ongoing Maintenance
---System
----Start Inactivity Timer (Note, adding an account to the "Do Not Terminate" list will not terminate operator session. Used mainly for admins.)

 

0 Likes
Commodore
Commodore

I have workaround for you:

Make new schedule record activating every X minutes and call JS from it:

Javascript TAB:

system.library.KillUser.KillUser*integration_user_name*()

Add SL KillUser and function in it

function KillUser*integration_user_name*()
{
var rteReturnValue = new SCDatum();
var argNames = new SCDatum();
var argVals = new SCDatum();

argNames.setType(8);
argVals.setType(8);

var arrNames = new Array();
var arrValues = new Array();
argNames.push("name");
arrValues.push("kill.user.*integration_user_name*");
var rc = system.functions.rtecall("callrad",
rteReturnValue,
"se.call.process",
argNames,
arrValues, false);
}

 

0 Likes
Micro Focus Expert
Micro Focus Expert

A different angle to the problem.

Not sure what sort of integration you are doing but for web services, it's best to dedicated a servlet specifically for it. The servlet will be hidden from load balancer via debugnode:1 and it will have reduced timeout specifically for high volume short duration transactions like web services which are different from user transaction via load balancer which are of long duration..

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.