Sponsored Content
Full Discussion: Killing idle user processes
Top Forums UNIX for Dummies Questions & Answers Killing idle user processes Post 13612 by annette on Monday 21st of January 2002 05:36:06 AM
Old 01-21-2002
Killing idle user processes

I'm looking for some help, please!

I'm trying to kill any idle user processes over 40 Minutes.

I have tried putting TMOUT=2400
within the users .profile
However this does not seem to be working.

We run aix 4.3.3
with ORACLE 7.3

The above works o.k. when the user is only within the unix environment. But if they are connected to oracle it doesn't.

I would be grateful for any advice.

Thanking all in advance
Smilie
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Killing Idle session

does any one know how to kill an idle session? I want to kill any idle sessions after 30 min... Local or remote.... i want to do this without a script or TCP wrappers...i want to know if there is a file that i can configure..... ThAnks:rolleyes: (4 Replies)
Discussion started by: securhack
4 Replies

2. Solaris

killing all processes for an user

how can I kill all the processes belonging to an user. I need it because I can't see a process initiated by a user and thus unable to kill it. (2 Replies)
Discussion started by: krishan
2 Replies

3. Shell Programming and Scripting

script for killing idle users

I need a script that will look for idle users and kill there proc. (7 Replies)
Discussion started by: jdel80
7 Replies

4. Shell Programming and Scripting

killing cascade processes

Hi everybody!! I've got a problem. I have a loop like this: while true; do some_work sleep 10m done It's possible to kill the main loop process and kill all childs from it? I want to kill main process and kill the sleep also. I tried kill -9 <loop_pid> with no result ... (4 Replies)
Discussion started by: victorin
4 Replies

5. Shell Programming and Scripting

i need a scipt to email users with idle processes!?

hello, i am VERY new to this whole script world. I need to come up with a script that will email a user if they have an idle process past 500 minutes...any suggestions??? Thanks so much. (0 Replies)
Discussion started by: sheppy28
0 Replies

6. Shell Programming and Scripting

Killing idle users TIA

I wrote a script to kill users idle more than 1/2 hour, ignoring those in an exception list. Here is the script as it is now: #! /usr/bin/awk -f BEGIN { system("who -u | sort +5 > /tmp/loginfile"); system("echo User Sessions Killed > /tmp/killedlogins"); ... (2 Replies)
Discussion started by: PapaBear
2 Replies

7. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

8. UNIX for Advanced & Expert Users

killing all child processes

Hi, Is there a way I can kill all the child processes of a process, given its process id. Many thanks in advance. J. (1 Reply)
Discussion started by: superuser84
1 Replies

9. Shell Programming and Scripting

Kill idle script is killing unnecessarly

Hi All,I have a problem with my kill idle script.my script is supposed to kill the user sessions which are idle for more than 2 hours.But is is killing the sessions which are idle for less than 2 hrs also.I dont know the exact time after which the script is killing,but it is less than 2 hours i am... (3 Replies)
Discussion started by: prabhu_kumar
3 Replies

10. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies
PAM_SYSTEMD(8)							    pam_systemd 						    PAM_SYSTEMD(8)

NAME
pam_systemd - Register user sessions in the systemd control group hierarchy SYNOPSIS
pam_systemd.so DESCRIPTION
pam_systemd registers user sessions in the systemd control group hierarchy. On login, this module ensures the following: 1. If it does not exist yet, the user runtime directory /run/user/$USER is created and its ownership changed to the user that is logging in. 2. The $XDG_SESSION_ID environment variable is initialized. If auditing is available and pam_loginuid.so run before this module (which is highly recommended), the variable is initialized from the auditing session id (/proc/self/sessionid). Otherwise an independent session counter is used. 3. A new control group /user/$USER/$XDG_SESSION_ID is created and the login process moved into it. On logout, this module ensures the following: 1. If $XDG_SESSION_ID is set and kill-session-processes=1 specified, all remaining processes in the /user/$USER/$XDG_SESSION_ID control group are killed and the control group is removed. 2. If last subgroup of the /user/$USER control group was removed the $XDG_RUNTIME_DIR directory and all its contents are removed, too. If the system was not booted up with systemd as init system, this module does nothing and immediately returns PAM_SUCCESS. OPTIONS
The following options are understood: kill-session-processes= Takes a boolean argument. If true, all processes created by the user during his session and from his session will be terminated when he logs out from his session. kill-only-users= Takes a comma separated list of user names or numeric user ids as argument. If this option is used the effect of the kill-session-processes= options will apply only to the listed users. If this option is not used the option applies to all local users. Note that kill-exclude-users= takes precedence over this list and is hence subtracted from the list specified here. kill-exclude-users= Takes a comma separated list of user names or numeric user ids as argument. Users listed in this argument will not be subject to the effect of kill-session-processes=. Note that that this option takes precedence over kill-only-users=, and hence whatever is listed for kill-exclude-users= is guaranteed to never be killed by this PAM module, independent of any other configuration setting. controllers= Takes a comma separated list of control group controllers in which hierarchies a user/session control group will be created by default for each user logging in, in addition to the control group in the named 'name=systemd' hierarchy. If omitted, defaults to an empty list. reset-controllers= Takes a comma separated list of control group controllers in which hierarchies the logged in processes will be reset to the root control group. debug= Takes a boolean argument. If yes, the module will log debugging information as it operates. Note that setting kill-session-processes=1 will break tools like screen(1). Note that kill-session-processes=1 is a stricter version of KillUserProcesses=1 which may be configured system-wide in systemd- logind.conf(5). The former kills processes of a session as soon as it ends, the latter kills processes as soon as the last session of the user ends. If the options are omitted they default to kill-session-processes=0, kill-only-users=, kill-exclude-users=, controllers=, reset-controllers=, debug=no. MODULE TYPES PROVIDED
Only session is provided. ENVIRONMENT
The following environment variables are set for the processes of the user's session: $XDG_SESSION_ID A session identifier, suitable to be used in file names. The string itself should be considered opaque, although often it is just the audit session ID as reported by /proc/self/sessionid. Each ID will be assigned only once during machine uptime. It may hence be used to uniquely label files or other resources of this session. $XDG_RUNTIME_DIR Path to a user-private user-writable directory that is bound to the user login time on the machine. It is automatically created the first time a user logs in and removed on his final logout. If a user logs in twice at the same time, both sessions will see the same $XDG_RUNTIME_DIR and the same contents. If a user logs in once, then logs out again, and logs in again, the directory contents will have been lost in between, but applications should not rely on this behaviour and must be able to deal with stale files. To store session-private data in this directory the user should include the value of $XDG_SESSION_ID in the filename. This directory shall be used for runtime file system objects such as AF_UNIX sockets, FIFOs, PID files and similar. It is guaranteed that this directory is local and offers the greatest possible file system feature set the operating system provides. EXAMPLE
#%PAM-1.0 auth required pam_unix.so auth required pam_nologin.so account required pam_unix.so password required pam_unix.so session required pam_unix.so session required pam_loginuid.so session required pam_systemd.so kill-session-processes=1 SEE ALSO
pam.conf(5), pam.d(5), pam(8), pam_loginuid(8), systemd-logind.conf(5), systemd(1) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 PAM_SYSTEMD(8)
All times are GMT -4. The time now is 08:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy