LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-16-2013, 07:15 PM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
Unhappy Will process st6ill run when renamed?


Hey guys,

I have a quick question. (though I am using AIX, I think this can go under Linux discussion in general.)

We have this Unix Script which implements some business logic. It's usually being run under some IBM AIX scheduler (called Maestro).

Now, I performed an adhoc run of this script, through ./scriptname, now the script is currently running. The problem is, I forgot that this script is still scheduled in Maestro, so, I am expecting that this script will again be executed as scheduled. If that happens, I'm gonna have a hard time since the script implements some business logic that I can easily get into trouble with.

The script is STILL running, expected to run for a couple of more hours. So, what I did is to have a backup of the script, replace it with a dummy file that does nothing. These are all under the following assumptions:
1. I can replace the script with anything since the original script is already running in memory and would not be interrupted whatsoever.
2. The Maestro scheduler would be reading the dummy script (which does nothing) instead of the original script (which I placed somewhere in the filesystem)

I would like to confirm if these are correct? Though I've already done this, I just need somebody's confirmation so I can stay calm.

Cheers!
 
Old 06-16-2013, 08:33 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd double check with lsof and fuser; it the original file/inode is still open, you might be in trouble.
BTW, did you mv or cp the file?
It sounds like you did this after starting the run; correct?

Ultimately the safest thing would be to 'cancel' or 'suspend' the next run of this job from within Maestro. I assume it has a suspend / cancel option, a tool like that definitely should have.

Last edited by chrism01; 06-16-2013 at 08:36 PM.
 
Old 06-16-2013, 08:59 PM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
Quote:
Originally Posted by chrism01 View Post
BTW, did you mv or cp the file?
It sounds like you did this after starting the run; correct?
I replace the original script through mv, and yep, I did this after the run.

Quote:
Originally Posted by chrism01 View Post
I'd double check with lsof and fuser; it the original file/inode is still open, you might be in trouble.
Ultimately the safest thing would be to 'cancel' or 'suspend' the next run of this job from within Maestro. I assume it has a suspend / cancel option, a tool like that definitely should have.
Unluckily for me, I don't have access to Maestro

We'll see what happens. The scheduled run is about a minute ago
 
Old 06-24-2013, 03:33 AM   #4
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
It worked

Maestro kicked off the dummy script.

Cheers!
 
  


Reply

Tags
aix, ibm, memory, script



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to run multiple process Shahid nx Linux - Newbie 4 01-31-2012 12:53 AM
process run out of resource ust Linux - Software 1 06-13-2008 02:15 AM
A lot of processes run automatically when I run a single process. dalvirgautam Linux - Enterprise 4 12-01-2006 06:10 PM
get information when a process run?????? hungnt Linux - Newbie 6 07-16-2005 10:57 AM
run process when reboot ust Linux - General 2 08-15-2003 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration