免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 17214 | 回复: 12
打印 上一主题 下一主题

[故障求助] AIX的crontab不执行. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-02 09:25 |只看该作者 |倒序浏览
有一台P570,AIX5.3 的crontab非常的怪:
需要每周重启一次机器,要不然所有用户的cron 任务就根本不执行.
(用户的环境变量没有问题,若reboot后,不做任何修改配置,系统会自动去执行cron,但3-5天后,系统又莫明其妙的不执行cron了,reboot后,系统又恢复正常)





查看/var/adm/cron/log 文件,里面报错信息如下:




# tail log
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar  2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar  2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar  2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar  2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007
! cron: 0481-087 The c queue maximum run limit has been reached.
Fri Mar  2 09:22:00 BEIST 2007
! 0481-095 The cron job is being rescheduled.
Fri Mar  2 09:22:00 BEIST 2007

论坛徽章:
0
2 [报告]
发表于 2007-03-02 09:27 |只看该作者
# ls -l
total 184992
prw-------   1 root     cron              0 Mar 02 09:06 FIFO
-rw-r-----   1 bin      cron              4 Jun 21 2004  at.deny
-rw-r-----   1 bin      cron              3 Jun 21 2004  cron.deny
-rw-rw-r--   1 bin      bin        94652447 Mar 02 09:25 log
-rw-r--r--   1 root     sys            1317 Jun 17 2004  queuedefs
# df -kg
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           4.00      1.42   65%     8940     3% /
/dev/hd2           3.00      2.01   34%    21787     5% /usr
/dev/hd9var        1.12      0.33   71%      350     1% /var
/dev/hd3           3.88      3.79    3%      569     1% /tmp
/dev/hd1          27.88     12.14   57%    24825     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       0.12      0.08   38%      819     5% /opt
/dev/fslv00      128.62     31.44   76%    12248     1% /backup



会不会是因为/var 的空间不够了?

请大家帮助.

论坛徽章:
0
3 [报告]
发表于 2007-03-02 09:30 |只看该作者
crontab 没有定时执行是因为“! cron: 0481-087 The c queue maximum run limit has been reached.”。
修改/var/adm/cron/queuedefs 文件。在里面加上这样一句:"c.200j20n60w",然后kill  PID,其中PID为cron进程号,新的cron设置就会生效。Maximum number of jobs in the queue by default was 50. The errorc messages 0481-087, 0481-095 usually appears when this max. number
is reached. So you can increase the maximum number of jobs in /var/adm/cron/queuedefs , vi the queuedefs file  and change
the b to c and the 50 to 200.   by including this entry"c.200j20n60w"  in the file. After making the changes to the file, killcron and it will respawn again with the new settings.

[ 本帖最后由 jnpiero 于 2007-3-2 09:31 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-03-02 09:34 |只看该作者
#
#
# here is an example of a low prority (nice 20), 50 entry batch queue
# b.50j20n60w
c.1000j2n60w

在queuedefs加以C队列为1000就可以了.

论坛徽章:
0
5 [报告]
发表于 2007-03-02 09:49 |只看该作者
谢谢 jnpiero

论坛徽章:
0
6 [报告]
发表于 2007-03-02 09:55 |只看该作者
厉害  看报错确实达到最大值了

论坛徽章:
0
7 [报告]
发表于 2007-03-02 14:08 |只看该作者
强!!!

论坛徽章:
0
8 [报告]
发表于 2007-03-02 15:43 |只看该作者

论坛徽章:
0
9 [报告]
发表于 2007-03-05 14:06 |只看该作者
谢谢,学习了. 能讲讲
c.1000j2n60w   这什么含义? 特别是j2n60w

论坛徽章:
0
10 [报告]
发表于 2008-04-11 13:14 |只看该作者
直接看queuedefs文件,里面讲得很清楚了
# cron values for each queue of batch jobs:
#
#       queue.xxjxxnxxw
#
# queues:
#  a - sh jobs          d - sync event
#  b - batch jobs       e - ksh jobs
#  c - cron event       f - csh jobs
#
#  xxj - maximum number of jobs in this queue (deafult 100)
#  xxn - nice value at which these jobs will run at (default 2)
#  xxw - wait time till next execution attempt (default 60 seconds)
#
#
# here is an example of a low prority (nice 20), 50 entry batch queue
# b.50j20n60w
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP