Operating System - HP-UX
1753904 Members
9984 Online
108810 Solutions
New Discussion юеВ

Re: Touch command return code 137

 
SOLVED
Go to solution
Marco Santerre
Honored Contributor

Touch command return code 137

Hi all,

This may sound like a very stupid question but I just can't find the answer. I have a touch command that runs at certain intervals. The problem is that every now and then, the touch fails and it exits with 137. I have no clue what 137 means, and I, unfortunately, cannot reproduce at will, thus my dilemma to get an answer for this problem.

Can you help please?
Cooperation is doing with a smile what you have to do anyhow.
5 REPLIES 5

Re: Touch command return code 137

Marco,

well the man page for touch is non-specific, simply stating any non-zero value is an error... it might help if you showed us the code snippet where you exectute the touch and get its return code... maybe some error in the script?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Marco Santerre
Honored Contributor

Re: Touch command return code 137

Yeah I checked the man page too.. as well as google and forums.

It's actually not a script.. it a command that we run from within OVO but the command looks like this :

node=<$MSG_NODE_NAME>;touch /var/opt/OV/share/tmp/OpC/hbm/msg/$(echo ${node%%.*} | tr [A-Z] [a-z])

and as I said, this command is executed several times and works 99% of the times.. and it is not one node in particular. It just "happens"
Cooperation is doing with a smile what you have to do anyhow.
Dennis Handly
Acclaimed Contributor
Solution

Re: Touch command return code 137

Typically exit status >= 128 are signals.
You got signal 9, SIGKILL. So does some rogue sysadmin or script automation have it out for you? :-)

I've heard that sometimes the kernel will kill you with signal 9 but that is in low memory cases and I'm not sure why touch would need that much.
Marco Santerre
Honored Contributor

Re: Touch command return code 137

Is there a limit on the number of touch that can happen within the same directory at one particular time?

The reason I'm asking is I'm wondering if too many touch are happening at the same time because this is a scheduled process. Since you talked about low memory.. I doubt the memory is running low but I wonder if the kernel is having an issue handling so many touch at the same time. And since the problem is intermittent, sometimes just a few microseconds is good enough to process them all.. but other times not.
Cooperation is doing with a smile what you have to do anyhow.
Dennis Handly
Acclaimed Contributor

Re: Touch command return code 137

>Is there a limit on the number of touch that can happen within the same directory at one particular time?

If you are creating files in a directory, you can only do one at a time. But this is synchronized by locks.

>I'm wondering if too many touch are happening at the same time because this is a scheduled process.

Are you talking about 1000s?