HP-UX操作系统-cronlog报错信息cqueuemaxrunlimit的处理方法_第1页
HP-UX操作系统-cronlog报错信息cqueuemaxrunlimit的处理方法_第2页
HP-UX操作系统-cronlog报错信息cqueuemaxrunlimit的处理方法_第3页
HP-UX操作系统-cronlog报错信息cqueuemaxrunlimit的处理方法_第4页
HP-UX操作系统-cronlog报错信息cqueuemaxrunlimit的处理方法_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、HP-UX操作系统 -cron log报错信息c queue max run limit 的处理方法用户反映crontab进程无法挂载,检查/var/adm/cron/log,发现有如下报错! rescheduling a cron job Thu Apr 2 09:30:00 EAT 2015! c queue max run limit reached Thu Apr 2 09:30:00 EAT 2015! rescheduling a cron job Thu Apr 2 09:30:00 EAT 2015! c queue max run limit reached Thu Apr

2、2 09:30:00 EAT 2015! rescheduling a cron job Thu Apr 2 09:30:00 EAT 2015MAXRUN (100) procs reached Thu Apr 2 09:30:00 EAT 2015因为之前发生过类似情况,查找过相关资料(见附录 1),通过修改/var/adm/cron/queuedefs文件并重启cron进程解决,这次以为也可以这么解决,结果发现修改数次都不成功,于是研究了一下queuedefs文件条目的定义(见附录 2),发现我们以前理解错误。系统默认queuedefs文件内容为:$ more queuedefs a.4

3、j1nb.2j2n90w我们在后面添加了一行c队列:a.4j1nb.2j2n90w c.100j1n我们之前理解为 crontab每个时间点都能运行100个,那么60分钟就可以运行 6000个,这个理解完全错误!cron规定每个时间点同时运行的job数最多只能有 100个,默认是100,最大值也是100。前一个时间点挂载的进程,只要没有退出,都要算在下一个时间点 的计数里。因此我们添加一行同时运行100个进程的c队列是无意义的,我们可以通过queuedefs来限制用户可以执行的 cron任务数,但是不能加大超过100的限制。HPUX的crontab和Solari的类似,这个限制我们无能为力。既

4、然已经达到系统最大值,那么问题就应该出在crontab运行的进程上。经过检查发现:这个系统为移动的一个主要计费系统,ps查看到账户account1下有1700多个进程,和其他计费系统的账户对比差别很大(其它的计费系统account账户只有几百个进程),且查看到该账户的进程中有两个名为monitor_xxxxx 的脚本分别有300多个进程存在。经客户确认这两个是日常监控的进程,查看 crontab ,这两个监控进程是每分钟都会运行。检查 该进程的脚本,发现脚本里有“如果该进程存在,就再启动该进程”的判断条件,但是应用的人提起在之前的某次测试中,$user变量调用不成功,可能判断失败。检查环境变量

5、并对比其它系统的profile 文件,发现该系统$user环境变量那一行被删除了,而两个monitor脚本里判断进程是否存在是通过调用$user这个变量来进行的,因此造成变量调用失败,这就造成判断进程存在的语句失效,也因此根 据crontab每分钟的定义,这两个进程一直在挂起,最终导致此次 crontab的任务数达到 最大限制的问题。现在已 kill掉这两个监控进程,并加入了环境变量,到目前为止运行正 常,没有再报错。遇到此类问题的处理方法应该是:1、先检查/var/adm/cron/queuedefs 文件里是否有添加 c队列crontab的job的限制,如 c.10j2n同时cron运行级

6、别在2的job数限制为10。如果有根据需要修改大小并重启 cron进程。2、如果queuedefs文件里没有限制,那就应该检查crontab挂起的进程是否异常,是否有僵死进程。附录1HP-UX 操作系统 -cron log报错信息 c queuemax run limit的处理方法本文针对cron job报错的处理办法解决方案当The /var/adm/cron/log文件报一下错误的时候:! a queue max run limit reached Wed Jan 12 09:59:20 PST 2000请查询 /usr/lib/cron/queuedefs文件内容a.4j1nb.2j2n

7、90wc.100j1n该信息显示a队列,最多只能有 4个job,同时运行nice值为1的操作。而报错信 息显示,a队列已经达到最大报错值,所以不能操作。为了避免错误信息,需要增加 job值。 job个数最大值为100.HP-UX操作系统-如何解决在 HPUX中cron jobs达到C queue 最大值的问题IssueCron job没有执行或者没有在指定的时间执行。在 /var/adm/cron/log 中有如下信 息:! c queue max run limit reached Mon Oct 4 09:11:14 EDT 2004! rescheduling a cron job Mo

8、n Oct 4 09:11:14 EDT 2004Solution这个报错是因为正在运行的cron job数超过了 /var/adm/cron/queuedefs 中规定的cqueue最大值。#cat /var/adm/cron/queuedefsa.4j1nb.2j2n90wc.10j2nc. 10j2n的含义如下:c表示c队列,就是cron job的队列10j表示同时运行的作业数2n作业运彳f级别nice值是2所以,增大同时运行的cron作业数,并重启cron后台进程就可以解决这个问题。例如:可以把同时运行的作业数从10改为20,修改queuedefs文件:c.10j2n -将这一行改成如

9、下所示c.20j1n重启Cron进程:#/sbin/init.d/cron stop#/sbin/init.d/cron startConsider the following queuedefs file:附录2w4sd12pa:/var/adm#man queuedefsqueuedefs(4) queuedefs(4)NAMEqueuedefs - queue description file for at, batch, and crontabSYNOPSIS/var/adm/cron/queuedefsDESCRIPTIONThe queuedefs file describes t

10、he characteristics of the queues managed by cron (see cron(1M). Each non-comment line in this file describes one queue. The format of the lines are as follows:q.njobjnicennwaitwThe fields in this line are:q The name of the queue, such that a is the default queue for jobs started by at (see at(1), b

11、is the queue for jobs started by batch (see at(1), and c is the queue for jobs run from a crontab file (see crontab(1).Queue names d through y designate user-defined queues.njob The maximum number of jobs that can be runsimultaneously in that queue. Although any number can be specified here, cron (s

12、ee cron(1M) by default limits the number of jobs that can be run on all the queues to 100. This limitation can be removed by setting the variable DISABLE_MAXJOB_LIMIT to 1 in the /etc/default/cron file.nice The nice value to give to all jobs in that queue that are not run with a user ID of super-use

13、r (see nice(1). The default value is 2.nwait The number of seconds to wait before rescheduling a job that was deferred because more than njob jobs were running in that job's queue, or because more than 100 jobs were running in all the queues (see njob above).EXAMPLESa.4j1nb.2j2n90wThe file is in

14、terpreted as follows:a.4j1n The a queue, for at jobs (see at(1), can have upto 4 jobs running simultaneously, and those jobs will be run with a nice value of 1.Hewlett-Packard Company - 1 - HP-UX 11i Version 3 Feb 2007 queuedefs(4) queuedefs(4)Since no nwait value is given, if a job cannot be run be

15、cause too many other jobs are running, cron will wait 60 seconds before trying again to run it (see cron(1M).b.2j2n90w The b queue, for batch jobs (see at(1), can haveup to 2 jobs running simultaneously. Those jobs will be run with a nice value of 2. If a job cannot be run because too many other jobs are running, cron will wait 90 seconds before trying again to run it.All other queues can have up to 100 jobs running simultaneously. They will be run with a nice value of 2, and if a job cannot be run because

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论