Sponsored Content
Top Forums UNIX for Dummies Questions & Answers starting processes with timeout? Post 302072724 by soheil.samii on Friday 5th of May 2006 01:47:22 PM
Old 05-05-2006
I think this should be OK in my case.
The process in this case is an optimization program with an indata file. I have a shell script which runs this program for a bunch of different indata files in a directory. The reason I wanted a timeout is that the runtime of the program is very large in some cases and then I have to manually kill them. That's why I wanted to use a timeout so that this issue is handled automatically. I will add this code in my shell script and try it. Thanks.
Out of curiousity, do you know any other way?

What happens if the process has already finished before sleep is finished (i.e. before the timeout)? Then we try to kill a nonexisting pid.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Starting Processes

I am currently running SCO OpenServer. When the machine is restart it automatically intitiates processes that allow me to use the ARCserv backup software... Recently, these process were killed and I would like to restart them. The problem is I dont know the name or location of the files invoked... (1 Reply)
Discussion started by: LowOrderBit
1 Replies

2. HP-UX

timeout

How can I kick a user out after being idle for a certain amount of time, would prefer not to use scripts, will TMOUT work on HP-UX? (5 Replies)
Discussion started by: csaunders
5 Replies

3. Solaris

About the Timeout

Hello everyone I am a new one,I want to know how to get the solaris force the loginer out if he do not in a time thanks (4 Replies)
Discussion started by: lyh003473
4 Replies

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

5. Red Hat

RPC Timeout

I have a RHEL 2.1 machine that I am trying to get to mount a remote nfs filesystem. Both servers have 2 network interfaces. My linux machine can mount the filesystem through one interface with no problems but if I switch over and try to mount it through the other interface using a totally... (1 Reply)
Discussion started by: darren.wyatt
1 Replies

6. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

7. SCO

Starting processes automatically on bootup

Hello - We have setup printers to startup in the /etc/rc.d/8 directory and when the SCO system is booted this script should kick them off or start them up but it doesn't. So I have to start it from root and leave the window open. I know this isn't right and trying to figure out what's missing. ... (13 Replies)
Discussion started by: dbm7230
13 Replies

8. AIX

init not starting processes from inittab

Hello, I'm having a problem starting the cron daemon automatically from inittab, let me provide the details below: We are having five equally installed machines. One of them was upgraded in the past, one we upgraded recently, both from 5300-05-06 to 5300-07-01-0748. On the upgraded... (6 Replies)
Discussion started by: hybr1d
6 Replies

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

10. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
card_eventmgr(1)						    PAM-PKCS#11 						  card_eventmgr(1)

NAME
card_eventmgr - PCSC-Lite Event Manager SYNTAX
card_eventmgr [debug] [[no]daemon] [timeout=<msecs>] [config_file=<filename>] [kill] [pidfile=<pidfile>] DESCRIPTION
card_eventmgr is a smart card monitoring tool that listen to the status of the card reader and dispatch actions on several events. card_eventmgr can be used for several actions: like screen lock on card removal. Three events are supported: card insertion, card removal and timeout on removed card. Actions are specified in a configuration file. OPTIONS
debug Enable debugging output. [no]daemon Runs in background if daemon or in foreground if nodaemon (default). If debug is unset, the program dettaches itself from the tty. timeout=<msecs> Set polling timeout in milliseconds. Defaults to 1000 (1 second). config_file=<configuration file> Sets de configuration file. Default value is /etc/pam_pkcs11/card_eventmgr.conf. pidfile=<pidfile> Store the card_eventmgr process ID (pid) in the file pidfile. kill Read a process id from pidfile and kill that process. You must use the argument pidfile=<pidfile> to use kill. FILES
/etc/pam_pkcs11/card_eventmgr.conf EXAMPLES
To run this program the standard way type: card_eventmgr Alternatively you can specify options: card_eventmgr debug nodaemon timeout=500 config_file=$HOME/.card_eventmgr.conf If you want to start and stop card_eventmgr automatically in an X11 session you can create a ~/.xsession file containing: # start the card autolock card_eventmgr pidfile=$HOME/.card_eventmgr.pid # start Gnome or something else /usr/bin/x-session-manager # kill the card autolock card_eventmgr kill pidfile=$HOME/.card_eventmgr.pid BUGS
Some applications like xscreensaver-command may fail due to external events (eg: try to unlock an unlocked session). In this case, the command incorrectly returns error code. AUTHORS
Juan Antonio Martinez <jonsito@teleline.es> Ludovic Rousseau <ludovic.rousseau@free.fr> SEE ALSO
pam_pkcs11(8), pkcs11_eventmgr(1), README.eventmgr, PAM-PKCS11 User Manual Juan Antonio Martinez Aug 2005 card_eventmgr(1)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy