Perl : Kill process within 5 min


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl : Kill process within 5 min
# 1  
Old 07-28-2008
Perl : Kill process within 5 min

From a perl script , How can I monitor a PS which I activated and kill it within 5 minutes in case it didn't complete its tasks.Smilie
# 2  
Old 07-28-2008
Regardless of programming language, a common arrangement is to set a SIGALRM to trigger. It's not guaranteed to trigger in exactly 5 minutes (unless you have a real-time OS like QNX) but it's usually good enough.

The perlipc manual page has some examples, as has Google, of course.
# 3  
Old 07-28-2008
Thank You , era.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

2. Shell Programming and Scripting

perl check and kill process

Hi All How can i in perl check for a running process and if it is running kill it the issue might be that there will be more than one of the same process and i want to kill all of them the process is below root 1944 1 0 16:28 ? 00:00:01 x11vnc -display :0... (3 Replies)
Discussion started by: ab52
3 Replies

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

4. Shell Programming and Scripting

Killing a process within 5 min it starts in Unix using perl

Hi All, I have to kill a program whose pid, i will be getting. Multiple processes will be getting started by my script of same kind in a series. So for after each call to a process i need to write a command or script which can kill the process if it takes more than 5min. In this i will... (3 Replies)
Discussion started by: nishank.jain
3 Replies

5. Shell Programming and Scripting

Perl script to kill the process ID of a command after a certain period

All, I am trying to build a script in perl that will alllow me to pass the IP address to a ping command and redirect the output to a file and then kill that process after a certain period of time. let's say, I call my script ping.pl, I would like to be able to run it like this for example :... (7 Replies)
Discussion started by: Pouchie1
7 Replies

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

7. Linux

Kill a process without using kill command

I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies

8. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

9. Shell Programming and Scripting

to kill a process in perl

Hi friends, I have a perl script which needs to kill all java processes running on both windows and unix. currently I'm getting the OS and killing the process by using system. my code is: if ($os eq MSWin32) system("taskkill java"); else system("kill -9 java") Is there any way... (2 Replies)
Discussion started by: gurukottur
2 Replies

10. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
Login or Register to Ask a Question