在cron job的日志中发现以下报错:
! c queue max run limit reached Wed Aug 28 12:56:00 2013
! rescheduling a cron job Wed Aug 28 12:56:00 2013
报错显示cron job达到了队列最大限制。
检查一下cron服务
#> svcs -p cron
STATE STIME FMRI
online Aug_05 svc:/system/cron:default
Aug_05 15979 cron
用ptree检查一下cron进程的进程树
#> ptree 15979
15979 /usr/sbin/cron
19043 sh -c [ -x /home/software/ICT/scripts/ict_monitor.sh ] && /home/software/ICT/sc
19044 /bin/sh /home/software/ICT/scripts/ict_monitor.sh
19373 egrep -i detached|disable|badlog|stale|sync|nodevice
19374 /usr/sbin/vxprint -hrt
28604 sh -c [ -x /home/software/ICT/scripts/ict_monitor.sh ] && /home/software/ICT/sc
28605 /bin/sh /home/software/ICT/scripts/ict_monitor.sh
28945 egrep -i detached|disable|badlog|stale|sync|nodevice
28946 /usr/sbin/vxprint -hrt
7653 sh -c [ -x /home/software/ICT/scripts/ict_monitor.sh ] && /home/software/ICT/sc
7654 /bin/sh /home/software/ICT/scripts/ict_monitor.sh
7984 egrep -i detached|disable|badlog|stale|sync|nodevice
7985 /usr/sbin/vxprint -hrt
17335 sh -c [ -x /home/software/ICT/scripts/ict_monitor.sh ] && /home/software/ICT/sc
17336 /bin/sh /home/software/ICT/scripts/ict_monitor.sh
17665 egrep -i detached|disable|badlog|stale|sync|nodevice
17666 /usr/sbin/vxprint -hrt
26413 sh -c [ -x /home/software/ICT/scripts/ict_monitor.sh ] && /home/software/ICT/sc
26414 /bin/sh /home/software/ICT/scripts/ict_monitor.sh
26745 egrep -i detached|disable|badlog|stale|sync|nodevice
26746 /usr/sbin/vxprint -hrt
....进程树显示出cron进程调用的后台任务情况,由于某些原因这些脚本无法正常运行,导致了cron队列超限。
重启cron服务
#> svcadm restart cron
#> svcs -a | grep cron
online 12:57:40 svc:/system/cron:default
#> svcs -p cron
STATE STIME FMRI
online 12:57:40 svc:/system/cron:default
12:57:40 19339 cron重启服务后,cron队列被清空。问题得到解决。