The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with exit code when piping bitoffish Shell Programming and Scripting 4 09-16-2007 04:21 PM
where can I get exit code meanings? speedieB Shell Programming and Scripting 1 08-24-2006 08:38 AM
Where can I find a list of exit codes? (Exit code 64) jkuchar747 UNIX for Dummies Questions & Answers 3 12-07-2004 02:08 PM
Exit Code in HP-UX KSH. mbb High Level Programming 3 03-15-2002 05:44 AM
All about exit code cdin2 Shell Programming and Scripting 2 03-11-2002 06:03 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-25-2002
Registered User
 

Join Date: Jun 2002
Posts: 2
Stumble this Post!
Exit code 137 on a backup

Can some one tell me what it means to get a exit code od 137 from a cron scheduled backup on HP-UX. Also if you know of a book that has the HP-UX codes that would be great.

Thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-16-2002
Registered User
 

Join Date: Jul 2002
Posts: 11
Stumble this Post!
Backup on HP-UX: err 137

From the man page of fbackup: (no 137)
RETURN VALUE
fbackup returns one of the following values:

0 upon normal completion.

1 if it is interrupted but allowed to save its state for possible
restart.

2 if any error conditions prevent the session from completing.

4 if any warning conditions are encountered.

If warnings occur, the operator should check the fbackup logs to
verify the sanity of the backup.

=============
But normally there is some more text or a message in the /var/adm/syslog/syslog.log file.
Does the command run from the command line?
What version of HP-UX is it and what are you running?

Cheers
Rene
Reply With Quote
  #3 (permalink)  
Old 06-19-2007
Registered User
 

Join Date: Jun 2007
Posts: 1
Stumble this Post!
Process under HP-UX was killed with return code 137

One process in HP-UX was killed for unknown reason, but our application shell caught the return code 137. Do you know why it's killed? It should not be killed by someone manually, we can see it from the return code.
Thanks!
Reply With Quote
  #4 (permalink)  
Old 06-19-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by hill_0613 View Post
One process in HP-UX was killed for unknown reason, but our application shell caught the return code 137.
Did it generate a core dump?

Normally the exit code includes the signal that caused the termination..

Code:
    WIFSIGNALED(stat)
          Evaluates to a non-zero value if status  was  returned
          for a child process that terminated due to the receipt
          of a signal.

    WTERMSIG(  stat)
          If the value of  WIFSIGNALED(stat) is  non-zero,  this
          macro  evaluates  to  the  number  of  the signal that
          caused the termination of the child process.
So you would need to look up the macro WTERMSIG on your system in the /usr/include directory and decode 137 to deduce the signal number. Then look up the signal number in sys/signal.h or similar. Look for things like SIGSEGV, SIGKILL etc.

I have a sinking feeling that the macro will say subtract 128 to get the signal number, leaving 9 which is SIGKILL. Which is normally an external intervention and somebody doing "kill -9 pid".
Reply With Quote
  #5 (permalink)  
Old 03-27-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
Stumble this Post!
WTERMSIG does ((status) & 0x7f).
When status is 137:
137 & 127 = 9.
asm/signal.h:#define SIGKILL 9

It's a SIGKILL.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0