- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: problem running script in background
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 10:52 PM
05-23-2007 10:52 PM
problem running script in background
I'm running the following commands
nohup ./runimpdb pcs > /dev/null 2>&1 &
this should run the script in the background so it doesnt matter when my remote connection times out.
But if i press any key the process terminates and the same when my connection times out.
What am i missing here?
Cheers
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 11:18 PM
05-23-2007 11:18 PM
Re: problem running script in background
Are you sure there are no errors in the script? does it run fine in the foreground?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 11:21 PM
05-23-2007 11:21 PM
Re: problem running script in background
It runs fine in the foreground.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 11:25 PM
05-23-2007 11:25 PM
Re: problem running script in background
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 11:35 PM
05-23-2007 11:35 PM
Re: problem running script in background
the command will always have the father process id (PPID) of the session where you start the command. So if this session is quited, then all children processes also will quit.
You have to start the process with father process id '1' (if possible).
For your other problem - how do you connect to the ws? Which term setting?
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2007 11:44 PM
05-23-2007 11:44 PM
Re: problem running script in background
are you sure that your process doesn't make a "read"?
else you should redirect input too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2007 01:12 AM
05-24-2007 01:12 AM
Re: problem running script in background
Step 1) Create a small script file with your command line and make sure it is executable by you. I would probably do something like:
# cat runimp
/path/to/runimpdb pcs > /path/to/logfile 2>&1
Step 2) Use 'at' to run it.
# at -f /path/to/runimp now
I find 'at' much easier to deal with and I don't have to worry if my session dies. The script will keep running. By redirecting to a logfile you can monitor progress as well by doing a 'tail -f /path/to/logfile' (assuming the process sends useful output to the logfile).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2007 06:13 PM
05-24-2007 06:13 PM
Re: problem running script in background
< /dev/null
(This seems similar to the remsh -n issue.)
And as Richard said, you might want to look at the output, there may be a message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2007 12:42 PM
05-27-2007 12:42 PM