kill idle users


 
Thread Tools Search this Thread
Operating Systems HP-UX kill idle users
# 8  
Old 03-26-2008
Code:
who -u | grep 'jarhadta' | awk '$6=/old/{ print $7}' | xargs kill -HUP

Note, substitute the echo command for kill first to test it gives the processes you're looking for.
# 9  
Old 03-27-2008
I cannt understand what to do. please give me a detail command using my report.


Quote:
Originally Posted by denn
Code:
who -u | grep 'jarhadta' | awk '$6=/old/{ print $7}' | xargs kill -HUP

Note, substitute the echo command for kill first to test it gives the processes you're looking for.
# 10  
Old 03-27-2008
hi
awk '$6=/old/{ print $7}' | xargs kill -HUP i dont understand this. please give me the solution based on my report


Quote:
Originally Posted by denn
Code:
who -u | grep 'jarhadta' | awk '$6=/old/{ print $7}' | xargs kill -HUP

Note, substitute the echo command for kill first to test it gives the processes you're looking for.
# 11  
Old 03-28-2008
Did you try the command, and if so what was the results?

You have to use the full command posted, in my original post, not just:
Code:
awk '$6=/old/{ print $7}' | xargs kill -HUP

run the below, and it should give all the process ID's you want to kill, if
not please post results.
Code:
who -u | grep 'jarhadta' | awk '$6=/old/{ print $7}'

# 12  
Old 03-28-2008
hi
thanks. when i gave this command then i got process id and then when i want to kill that old process by using kill -9 PID(process id) then it shows no such process. It should be noted that 'jarhadta' is a ldap user. please resolve it for me.

Quote:
Originally Posted by denn
Did you try the command, and if so what was the results?

You have to use the full command posted, in my original post, not just:
"awk '$6=/old/{ print $7}' | xargs kill -HUP"

run the below, and it should give all the process ID's you want to kill, if
not please post results.
Code:
who -u | grep 'jarhadta' | awk '$6=/old/{ print $7}'

# 13  
Old 03-31-2008
hi,
Any one here who can help me in this issue. please help me

Quote:
Originally Posted by biswagit
hi
thanks. when i gave this command then i got process id and then when i want to kill that old process by using kill -9 PID(process id) then it shows no such process. It should be noted that 'jarhadta' is a ldap user. please resolve it for me.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Idle command to kill the process running n unx box machine

Hi Team , I have one process named as cec_analysiseool that is running on unix box machine now i want to kill this process so please advise what will be the ideal command to kill this , what i have tried is :confused: kill -9 `ps -ef | grep cec_analysiseool | grep -v grep | awk '{print $2}'` (2 Replies)
Discussion started by: unclesamm
2 Replies

2. Shell Programming and Scripting

Kill idle Process using a script

Hi, I need a script that can automatically kill all processes named "webrepn" and "webrebw" if idle for more than 30 minutes. Then I will have a Cron Job to run the script every night or 2-3 times a day depends on how this script helps. Right now, I run "ps -ef | grep webrebn" and "kill -9... (7 Replies)
Discussion started by: MaggieL
7 Replies

3. Shell Programming and Scripting

User idle time and kill

Hello.. I have many sleepy users on my Solaris box and need to kill them if they are idle for more than 45 minutes for example...I know who -u gives and the idle time but unable to make a awk line to get the condition perfect. Please help...:wall: (9 Replies)
Discussion started by: wimaxpole
9 Replies

4. Solaris

Kill idle dt session

Hi, i need to kill the idle dt sessions through script, can anyone tell me how to do? RJS (2 Replies)
Discussion started by: rajasekg
2 Replies

5. 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

6. AIX

Kill IDLE Process using script !!!

Dear Friends , I am using DB2 database in AIX 5.3 server . In my server some IDLE process are generated after several times which I need to kill it manually each and every time . The process I query like following : root@bagpuss $ ps auxw|sort -r +3|head -10 USER PID %CPU %MEM ... (3 Replies)
Discussion started by: shipon_97
3 Replies

7. Shell Programming and Scripting

How to kill process after x idle min?

I need a script to kill those process id whose idle time is more than 30min plz help me (3 Replies)
Discussion started by: salil2012
3 Replies

8. UNIX for Advanced & Expert Users

HP-UX users get logged off while idle.

Im "supporting" at least 2500 HP-UX workstations with CAD-related software with the B.11.11 build. I cant say anymore than that because of my companys sligtly paranoid security policy . The last few days a new problem has arised from nowhere. The problem is that users gets logged off when the... (5 Replies)
Discussion started by: Laoinjo
5 Replies

9. HP-UX

Is there a script available to kill Idle users

My max user parm is set to 1050. I'm currently at 1038 this is causing major slow downs on the server. I looking for a way log off "idle" user logins with out having to do it individually. :confused: (5 Replies)
Discussion started by: rfmurphy_6
5 Replies

10. SCO

Identifiy and Kill Idle Unix(SCO) Process called externally

Hi, Please let us know of any possiblity of identifying and killing unix proces invoked externally (by an external tool which does not create a session). 'who' command gives idle time of sessions. But what we are looking for is idle time of a process. 'ps' command gives the elapsed/running... (1 Reply)
Discussion started by: vbalajis
1 Replies
Login or Register to Ask a Question