Sponsored Content
Full Discussion: Exit code 137 on a backup
Special Forums Hardware Filesystems, Disks and Memory Exit code 137 on a backup Post 302122261 by porter on Tuesday 19th of June 2007 09:50:50 PM
Old 06-19-2007
Quote:
Originally Posted by hill_0613
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".
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

All about exit code

Hi, I am working on Solaris 8 and the "intro" man page says, "Upon termination, each command returns two bytes of status, one supplied by the system and given the cause for termination, and (in the case of 'normal' termination) one supplied by the program. The former byte is 0 for normal... (2 Replies)
Discussion started by: cdin2
2 Replies

2. UNIX for Dummies Questions & Answers

Where can I find a list of exit codes? (Exit code 64)

I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies

3. Shell Programming and Scripting

error code 137 and error code 35072

Hi while trying to run few scripts /afs/ae.ge.com/informatica/ardw/dev/bin/cdw_ar_update_recvbal.sh this script contains the below data load_dir=/afs/ae.ge.com/informatica/ardw/dev/data prog_dir=/afs/ae.ge.com/informatica/ardw/dev/bin ctl_dir=/afs/ae.ge.com/informatica/ardw/dev/ctl... (1 Reply)
Discussion started by: laxmi131
1 Replies

4. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

5. UNIX for Dummies Questions & Answers

UNIX exit code 11

We have a batch Unix process that runs during the day and it is getting an exit code 11 from Unix. It finishes a sqlplus step and gets the exit code 11 before it starts the next step. This used to happen once a year and now is happening more often (but not every time the process runs). We have... (2 Replies)
Discussion started by: msol
2 Replies

6. Shell Programming and Scripting

Exit code

can anyone tell what the exit status - 137 belongs in unix shell scripting. (3 Replies)
Discussion started by: ramkumar15
3 Replies
DB2BAK(8)						      System Manager's Manual							 DB2BAK(8)

NAME
db2bak - Directory Server script for making a backup of the database SYNOPSIS
db2bak [archivedir] [-Z serverID] [-q] [-h] DESCRIPTION
Creates a backup of the database. This script can be executed while the server is running or stopped. OPTIONS
A summary of options is included below: archivedir The full path to the directory to store the backup. -Z Server Identifier The server ID of the Directory Server instance. If there is only one instance on the system, this option can be skipped. -q Quiet mode. Reduces output of task. -h Display the usage. EXAMPLE
db2bak -Z instance2 Makes a backup of the entire database for 'instance2', and stores it in the default server instance backup directory. db2bak /LDAP/backups/20130305 Creates a backup of the database and stores it in specified location. DIAGNOSTICS
Exit status is zero if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. AUTHOR
db2bak was written by the 389 Project. REPORTING BUGS
Report bugs to http://bugzilla.redhat.com. COPYRIGHT
Copyright (C) 2013 Red Hat, Inc. Mar 5, 2013 DB2BAK(8)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy