- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: get exit code of a command executed by nohup
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
Discussions
Discussions
Discussions
Forums
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
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
тАО04-29-2004 12:49 AM
тАО04-29-2004 12:49 AM
I have a script to create a compressed export file from Oracle with this lines:
...
if [ ! -p /tmp/exp_pipe ]; then
mknod /tmp/exp_pipe p
fi
nohup compress $TMP_EXPORTFILE &
exp system/manager file=/tmp/exp_pipe full=y feedback=10000 compress=y direct=y consistent=y >>$TMP_LOGFILE 2>>$TMP_LOGFILE
reading mails sent by crontab, I saw that compress fail with segmentation error, but export run till the end without problem reporting successful completition.
how can I check the exit code of 'compress' command running in background by nohup command?
Thankyou
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 01:03 AM
тАО04-29-2004 01:03 AM
Re: get exit code of a command executed by nohup
Try $? straight after the compress
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 02:22 AM
тАО04-29-2004 02:22 AM
Re: get exit code of a command executed by nohup
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 08:00 PM
тАО04-29-2004 08:00 PM
Re: get exit code of a command executed by nohup
a quick solution may be:
nohup compress $TMP_EXPORTFILE 2>errfile &
tail -f errfile
In this way you will see in real time the error coming from the compress
HTH
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 12:51 AM
тАО04-30-2004 12:51 AM
Re: get exit code of a command executed by nohup
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 01:33 AM
тАО04-30-2004 01:33 AM
Re: get exit code of a command executed by nohup
If this is the case, you should either pipe to split before compress, or choose an other compress utility such as gzip (which compresses better).
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2004 07:58 PM
тАО05-02-2004 07:58 PM
Re: get exit code of a command executed by nohup
thank to all for the answers to my question.
Fred: you are right, compress hangs on 2Gb files(tested on HP-UX 11.0). The oracle istance I have to export, running on Linux RH AS 2.1 and the compress problem occours when the export.Z files size is about 340/360Mb. As you suggested, using gzip instead compress I have no problem but I need to check the result of compress operation.
So as Bill and Jean-Luc wrote, I will script the background process to store a code that can be tested.
Regards
Paolo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2004 11:55 PM
тАО05-02-2004 11:55 PM
Re: get exit code of a command executed by nohup
If you search for better compression, you should have a look at bzip2, which compresses a bit slower but better than gzip (no corruption problem either)
Regards,
Fred
"Reality is just a point of view." (P. K. D.)