Ending user sessions which have been on a program for longer than 1 hour


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ending user sessions which have been on a program for longer than 1 hour
# 8  
Old 08-09-2012
thats seems to work cheers Smilie
# 9  
Old 08-09-2012
As a rule, if you're doing grep | grep | grep -v | sed | cut | kitchen | sink, you can rewrite it as a single awk.

Code:
awk '/[m]atch1/ && /[m]atch2/ && !/[m]atch3/ { print $5 }'

The first character of the regexes is obscured in [] so awk doesn't match itself in a ps listing.

5 just means the 5th column, adjust to taste.
This User Gave Thanks to Corona688 For This Post:
# 10  
Old 08-10-2012
Thankyou for the help Smilie
# 11  
Old 08-11-2012
@02JayJay02
Please post what Operating System and version you have and what Shell you are running.
There is much variation in the ps command.

Please post what version of Progress you are running.

Do not, I repeat do not ever issue "kill -9" to a Progress database session which is connected to the current Progess instance. It will corrupt your database. Obviously no problem if the database has been restarted in the meantime and these are orphan clients which the database engine could not clean up for some reason (like they were stuck on I/O to a failed disc drive).

Please note that there is a proper procedure for removing Progess client sessions through the Progresspromon utility.

If these are telnet clients, issuing kill -15 to the telnet process will trigger a hangup and cause the database engine to clean up the dead session. This is a safe approach because it triggers Before Image rollback of any active transactions .

Please note that there is a proper sequence of kill signals which will be documented for your version of Progress.
This User Gave Thanks to methyl For This Post:
# 12  
Old 08-13-2012
Hi methyl,

SunOS 5.10
Progress Version 9.1E
Im using the bash shell

Thankyou for the info I have been told never to issue a Kill -9 command as it is very dangerous to do, I am aware of the Progress commands however I am not familiar with them, you wouldn't happen to have any documentation on progress commands?

Thanks for your help
# 13  
Old 08-13-2012
Progress 9 product came with a comprehensive manual set. Because of that I never needed an online version.

To check you exact Progress software version, use the version command which comes with Progress. It will be something like 9.1D or 9.1E I guess.

Your version is out of date and no longer mentioned on the Progress website Application Development, SaaS, Cloud Deployment, Complex Event Processing, Data Connectivity and Real Time Decisions Products | Progress Software.

The oldest online documentation for Progress appears to be OpenEdge 10 (the "new" name for Progress):
Progress Communities: OpenEdge 10.1C Product Documentation Overview
This User Gave Thanks to methyl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk program date function no longer running

I work at a company that uses a program written in AWK to track various data and prepare reports. Worked with this program for three years plus (the author is no longer with us) and the YTD Production report will not return a report with a date after 123119. This is a problem. Below is the (I... (3 Replies)
Discussion started by: paulgdavitt
3 Replies

2. UNIX for Beginners Questions & Answers

Find number of ACTIVE SSH putty sessions, excluding where the user hopped on to a diff server

Hi - If iam logged on to server A, on 4 putty windows using SSH ... and out of these 4 logged-in sessions, in one of the sessions if i did SSH from server A to server B; i would now have 4 putty windows sessions ... of which 3 are actively logged on to Server A while 1 putty window is actively... (2 Replies)
Discussion started by: i4ismail
2 Replies

3. Shell Programming and Scripting

How to convert 24 hour time to 12 hour timing?

Hi friends, I want to convert 24 hour timing to 12 hour please help me... my data file looks like this.. 13-Nov-2011 13:27:36 15.32044 72.68502 13-Nov-2011 12:08:31 15.31291 72.69807 16-Nov-2011 01:16:54 15.30844 72.74028 15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Discussion started by: nex_asp
13 Replies

4. Shell Programming and Scripting

Removing old user directories that are no longer Users in /etc/passwd

I am new to shell scripting, and have not done much programming in several years. So I am very rusty at this at best. I know my way around the linux command line, but actually scripting is something I have not done too much of. I have been tasked to come up with a script that will pull all... (5 Replies)
Discussion started by: shuiend
5 Replies

5. UNIX for Advanced & Expert Users

Logging User Sessions

Hello, I am using a Linux server (Ubuntu 11.04 Server) to host some files and a code repository. Because we are using ssh + svn to connect to the repository, our users have normal ssh access. What I would like to do is log their user sessions so that I have an audit trail in the event that... (2 Replies)
Discussion started by: chrisb1609
2 Replies

6. Shell Programming and Scripting

script to monitor the process system when a process from user takes longer than 15 min run.

get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same. hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies

7. Solaris

Graphical program no longer works after Solaris 10 upgrade

This is a fairly complex issue. I do not have a lot of knowledge on X11. But here are the things. I am running a program called Synergy off a Solaris server. The server sits in a remote network and can be accessed via NAT. Using Putty, I will enable X11 forwarding and launch Synergy via Putty.... (0 Replies)
Discussion started by: Leion
0 Replies

8. UNIX for Advanced & Expert Users

Max sessions a single user can've on Solaris server at the same time

There's a user that opens various login sessions with a particular SOLARIS server at the same time - this locks the server thats tried to get logged into.. Kindly help on how to know the max limit of sessions a particular user can open with a particular server at the same time. AND, how to... (2 Replies)
Discussion started by: its.simron
2 Replies

9. UNIX for Advanced & Expert Users

program running for one user and not for other user

i have an application that i can call from command line i can pass arguments to the command specifying the server name, user name and password. when i give my login information such as username and password in the argument, the command gets executd. as an fyi, i can login using ssh to... (2 Replies)
Discussion started by: bryan
2 Replies

10. UNIX for Dummies Questions & Answers

an hour less in 24 hour system

My program: __________________________________ #!/bin/ksh DAY=`date +%y%m%d` H=`date +%H` M=`date +%M` day=`date +%m/%d/%y` let h=$H-1 echo DAY $DAY echo H $H echo M $M echo day $day echo h $h _____________________________________ My result: (3 Replies)
Discussion started by: bobo
3 Replies
Login or Register to Ask a Question