× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 07-Jan-2015 07:11 -0600, Mohan Eashver wrote:

I am looking for a solution to log users off the IBM i system
(interactive jobs only) after a certain amount of IDLE time.

FWiW: Seems to be a topic having no relevance for the RPG language; while an intention may be to write such a program in RPG, tangential reference to a language does not make the subject on-topic to that language. The midrange-l forum is available for topics not specific to the language-specific fora.

Would love to hear from you if you have done any custom programming
to auto-log off users.

I understand there is a User Profile setting to set a max idle time
for a user and kill the job if it exceeds this. But I do not like to
use that.

There is no user profile setting that I am aware of; there are two system values, the Inactive Job Time-Out Interval (QINACTITV) that can request that the system perform the notification, and the ability to have a program react to the event only when the time interval is reached per use of the Inactive Job Time-Out Message Queue (QINACTMSGQ) system value.

My solution would fire off a job scheduler every 30 minutes. And look
at all interactive jobs running. For each job, I like to look at the
Call Stack and check the program that is currently active.

Such a program could be specific to the individual job notified by the system, thus likely requiring far fewer resources to achieve than that alluded polling coupled with extensive listing plus search\filter.

The goal is to kill a job where the user is just sitting on a menu
and NOT kill jobs where user is sitting on a maintenance program
possibly has un-finished updates.

I will be ignoring programs from Call Stack that begin with Q or out
of library QSYS.

The same means used to do that with polling\searching could be narrowly focused on each job notified as having reached the inactivity interval, if using the system values approach.

I would also like to give more idle time for users sitting on a
particular program.

Lets say user is idle on Program A and I will give this program 12
hours before i kill it.
Lets say user is idle on Program B and I will give this program 90
minutes before i kill it.

Appreciate any tips you can give.

When notified via the message queue using the QINACTITV SysVal and the system enabled via the named Message Queue (MSGQ) per the QINACTMSGQ SysVal, the ability to decide what action to take against the job has been deferred to the user program. Surely the program that processes the function per the system values would have the same ability envisaged via the alluded [seemingly much more complex] polling\listing\filtering.?


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.