Operating System - HP-UX
1748169 Members
4219 Online
108758 Solutions
New Discussion юеВ

Re: Cron jobs not executed for specific user

 
SOLVED
Go to solution

Re: Cron jobs not executed for specific user

You can find attached the cron log.
The problematic user is nmcman.
Does this give you any clue?
TTr
Honored Contributor
Solution

Re: Cron jobs not executed for specific user

The jobs are getting executed but are getting a killed with a ts=9 status. Look for yourself in the cron log
> nmcman 19468 c Mon Oct 12 12:00:00 EETDST 2009
...
< nmcman 19468 c Mon Oct 12 12:00:00 EETDST 2009 ts=9

The log entries are intermixed with log entries from other jobs so you have to pair the log entries approprietly. The ">" stands for a job start and the "<" stands for a job exit. You can see the ts=9 at the exit entry. That is a hard kill with a "kill -9" signal. Now a few things to check as to why the jobs are getting killed.
1. Yes in some cases a command will not run if a another commnad is still executing from before. This is true with commands that lock a file or depend another resource (such as a port or a pipe file or a fifo) which is in use by a previously executed command
Check with "ps -efu nmcman" to see what else is running by this user.
2. Check if you are hitting any system limits such as open files, flocks, user processes etc. Look at the /var/adm/syslog/syslog.log for any errors.
3. Did you recently convert to a trusted system?

You also have too many jobs running every minute. Is that really necessary?
Hakki Aydin Ucar
Honored Contributor

Re: Cron jobs not executed for specific user

Yes, whenever you cron attempt to run it was immediately killed as TTr said.

Try (if you can use root) the same command with user root OR another user in cronjob:

as far as I can see also nmcman used another commands with this use and also got killed

Re: Cron jobs not executed for specific user

Exactly!
The commands fail only for the specific user. All the others are working fine.

I will re-check cron and syslog logs.
TTr
Honored Contributor

Re: Cron jobs not executed for specific user

You can also check if nmcman receives any email from cron regarding the killed job. See if there is anything else in the email.

You can add the -x c-shell flag to the crontab entry so that you get all the commands echoed as they are executed.

... csh -f -x /opt/mv36 ...

You can simplify his cronjob, why did he/she put /../ in there. It does not change anything, it just finds the command more directly.
... csh -f -x /opt/mv36/core/script/CK ...




Check
Dennis Handly
Acclaimed Contributor

Re: Cron jobs not executed for specific user

What OS version are you running?

I would suggest you not write cron scripts using the scummy C shell.
Unfortunately you have one entry: date >> /home/nmcman/test2.txt
that uses the posix shell and that aborts too.

One time when cron was aborting, it occurred due to a bogus value of TZ. What's the value for nmcman?

>TTr: The jobs are getting executed but are getting a killed with a ts=9 status.

Hmm, the last time I looked, kill 9 would be ts=137, 128+9.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1287859
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1212499
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1287859
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1319191
TTr
Honored Contributor

Re: Cron jobs not executed for specific user

> Dennis: ...kill 9 would be ts=137, 128+9.

Isn't the 128 offset used for the root user only?
Dennis Handly
Acclaimed Contributor

Re: Cron jobs not executed for specific user

>TTr: Isn't the 128 offset used for the root user only?

I'm not sure why wait(2) would treat root special?
Dennis Handly
Acclaimed Contributor

Re: Cron jobs not executed for specific user

>TTr: Isn't the 128 offset used for the root user only?

The 128 is used to indicate a coredump was produced. So you are correct, there was a kill -9.
SIGKILL is also also occurs when dld detects unsats. (Not sure how that happens with date(1).)

Re: Cron jobs not executed for specific user

Let me remind you that everything was working properly also for this user and no cron job is executed any more as scheduled, whereas as manual commands are successful.

The OS is HP-UX version B.11.23 in a ia64 hp server rx6600.

What else can i check so as to find the root cause of the failure (ts=9)?