Cron is consuming CPU usage

Hiya

I hope someone can please help with this problem?

OS X Server 10.4.7 on an Xserve, when I look in Activity Viewer the root process cron is taking nearly 100% of CPU usage.

Any ideas?

ipb1962

XServe Mac OS X (10.4.7)

Posted on Jul 13, 2006 11:27 PM

Reply
5 replies

Jul 14, 2006 4:11 PM in response to shambeko

Welcome to discussions!

Could you post the results of the following two terminal commands, please?

sudo ps auxwww | egrep -i cron
sudo top -l 1

The top command is -ell one.

Roger

Aug 22, 2006 4:57 PM in response to Community User

Roger,

I am experiencing the same problem as above, cron consuming 99% cpu.
Also running IMAP, DNS, WEB. Disabling MAIL services and restarting has no effect, cron kicks in immediately. Here are the results of the above terminal commands:

root 43 100.0 -0.0 27524 492 ?? Rs 9:46AM 10:03.61 /usr/sbin/cron
admin 420 0.0 -0.0 27372 424 p1 S+ 9:56AM 0:00.00 egrep -i cron
Global1:~ admin$ sudo top -l 1
Processes: 80 total, 4 running, 76 sleeping... 261 threads 09:56:26
Load Avg: 1.09, 1.02, 0.62 CPU usage: 70.0% user, 30.0% sys, 0.0% idle
SharedLibs: num = 155, resident = 32.5M code, 3.86M data, 8.25M LinkEdit
MemRegions: num = 6261, resident = 81.0M + 9.85M private, 79.1M shared
PhysMem: 97.6M wired, 114M active, 159M inactive, 371M used, 1.64G free
VM: 4.98G + 100M 21995(0) pageins, 0(0) pageouts

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
421 top 0.0% 0:00.06 1 18 20 224K 388K 632K 26.9M
418 bash 0.0% 0:00.01 1 14 17 180K 840K 816K 27.2M
417 login 0.0% 0:00.01 1 16 37 124K 432K 568K 26.9M
411 mdimport 0.0% 0:00.11 4 62 48 748K 2.12M 2.26M 39.2M
380 imapd 0.0% 0:00.05 1 25 83 712K 2.32M 2.43M 49.3M
376 trivial-re 0.0% 0:00.01 1 16 20 212K 456K 732K 26.7M
374 smtpd 0.0% 0:00.03 1 18 73 524K 1.31M 1.76M 29.2M
373 mdimport 0.0% 0:00.11 3 61 47 760K 1.90M 2.23M 38.3M
366 check_afp 0.0% 0:00.00 2 26 23 204K 724K 760K 27.1M
360 AppleSpell 0.0% 0:00.03 1 32 32 408K 1.48M 4.05M 37.2M
325 Terminal 0.0% 0:02.77 5 123 129 2.22M 6.67M 6.91M 168M
324 imapd 0.0% 0:00.05 1 25 83 712K 2.32M 2.41M 49.3M
323 imapd 0.0% 0:00.12 1 25 88 716K 2.47M 2.41M 49.6M
322 pop3d 0.0% 0:00.11 1 18 77 488K 1.82M 1.88M 48.6M
315 master 0.0% 0:00.03 1 16 20 216K 372K 604K 26.7M
312 qmgr 0.0% 0:00.02 1 16 20 216K 488K 748K 26.8M
311 pickup 0.0% 0:00.00 1 16 20 188K 444K 684K 26.7M
308 master 0.0% 0:00.05 1 15 20 204K 416K 676K 26.7M
304 perl 0.0% 0:00.53 1 10 160 14.2M 32.7M 22.4M 58.0M
303 perl 0.0% 0:00.77 1 10 147 13.6M 32.7M 22.3M 57.8M
299 perl 0.0% 0:01.82 1 15 144 1.13M 32.7M 20.3M 58.4M
294 cupsd 0.0% 0:00.03 2 30 26 424K 920K 1.39M 27.8M
288 httpd 0.0% 0:00.01 1 12 116 244K 7.04M 1.51M 35.3M
287 httpd 0.0% 0:00.01 1 12 116 244K 7.04M 1.51M 35.3M
286 httpd 0.0% 0:00.01 1 12 116 244K 7.04M 1.51M 35.3M
281 iTunesHelp 0.0% 0:00.04 1 52 62 580K 2.32M 1.70M 145M
278 Finder 0.0% 0:02.30 3 113 149 3.54M 11.3M 10.9M 173M
276 SystemUISe 0.0% 0:00.58 2 183 131 2.00M 5.42M 5.38M 163M
275 Dock 0.0% 0:00.32 2 88 98 752K 6.07M 2.82M 132M
270 pbs 0.0% 0:00.15 2 40 43 544K 2.05M 1.82M 53.7M
268 slpd 0.0% 0:00.01 6 31 34 244K 856K 964K 30.2M
263 AppleVNCSe 0.0% 0:10.02 5 72 95 1.35M 1.68M 1.51M 133M
262 ARDAgent 0.0% 0:00.11 6 98 76 948K 2.60M 2.36M 149M
259 ipfwlogger 0.0% 0:00.00 1 10 17 112K 320K 180K 26.6M
251 AppleFileS 0.0% 0:00.12 42 115 132 2.66M 2.00M 3.43M 77.1M
250 AppleFileS 0.0% 0:00.00 1 9 21 48K 1.96M 232K 28.4M
244 httpd 0.0% 0:00.02 1 11 116 240K 7.04M 1.52M 35.3M
243 rotatelogs 0.0% 0:00.00 1 13 17 108K 320K 340K 26.6M
242 httpd 0.0% 0:00.08 1 10 116 76K 7.04M 4.34M 40.3M
240 ARDHelper 0.0% 0:00.02 1 9 17 136K 328K 152K 26.6M
229 mds 0.0% 0:00.39 7 88 62 1.75M 1.88M 3.23M 42.0M
210 getty 0.0% 0:00.00 1 14 18 112K 332K 340K 26.6M
195 automount 0.0% 0:00.03 3 42 30 312K 884K 1.05M 28.7M
190 serialnumb 0.0% 0:00.04 3 27 33 336K 752K 1.10M 28.3M
188 automount 0.0% 0:00.02 3 43 34 312K 912K 1.09M 29.0M
185 rpc.lockd 0.0% 0:00.00 1 10 18 92K 396K 200K 26.7M
176 nfsiod 0.0% 0:00.00 5 30 25 104K 340K 192K 28.6M
163 ntpd 0.0% 0:00.04 1 11 19 156K 524K 380K 26.9M
161 pitond 0.0% 0:00.18 5 35 32 296K 940K 952K 29.6M
119 crashrepor 0.0% 0:00.00 1 17 18 96K 348K 204K 26.6M
97 lookupd 0.0% 0:01.47 4 40 45 556K 972K 1.30M 29.6M
84 loginwindo 0.0% 0:00.35 3 117 99 1.28M 2.93M 3.78M 153M
83 ATSServer 0.0% 0:00.21 2 66 68 704K 2.70M 2.16M 70.5M
78 WindowServ 0.0% 0:12.34 3 142 109 1.38M 6.95M 7.95M 128M
74 coreservic 0.0% 0:00.34 3 90 105 1.67M 5.59M 5.89M 35.3M
62 update 0.0% 0:00.20 1 14 18 120K 324K 228K 26.6M
59 distnoted 0.0% 0:00.04 1 43 20 232K 708K 776K 27.0M
57 DirectoryS 0.0% 0:00.92 4 78 94 1.34M 2.61M 3.55M 32.7M
55 notifyd 0.0% 0:00.16 2 101 21 204K 360K 472K 27.2M
52 securityd 0.0% 0:00.17 2 106 31 640K 1.39M 1.82M 29.2M
51 memberd 0.0% 0:00.04 3 38 24 300K 356K 668K 27.7M
50 diskarbitr 0.0% 0:00.21 1 105 22 396K 812K 1.02M 27.1M
49 coreaudiod 0.0% 0:00.18 1 107 46 720K 1.21M 1.71M 30.6M
48 configd 0.0% 0:00.89 3 151 62 552K 1.52M 1.70M 29.2M
46 slapd 0.0% 0:00.27 3 35 88 2.47M 2.40M 4.26M 128M
45 named 0.0% 0:00.04 1 14 22 532K 1.39M 1.63M 83.9M
44 freshclam 0.0% 0:00.00 1 15 20 136K 464K 452K 27.2M
43 cron 0.0% 10:10.44 1 13 20 124K 348K 492K 26.9M
42 syslogd 0.0% 0:00.55 1 15 19 156K 352K 416K 26.6M
41 servermgrd 0.0% 0:02.44 4 78 165 4.00M 4.30M 7.14M 46.2M
40 vpnd 0.0% 0:00.01 1 16 24 208K 792K 828K 27.1M
39 PasswordSe 0.0% 0:00.25 9 45 93 620K 1.66M 2.17M 33.6M
38 netinfod 0.0% 0:00.36 1 14 22 208K 468K 576K 26.9M
37 mDNSRespon 0.0% 0:00.07 3 34 26 328K 976K 1.07M 27.9M
36 KernelEven 0.0% 0:00.02 2 22 22 224K 344K 604K 27.2M
35 hwmond 0.0% 0:02.06 8 79 45 456K 900K 1.29M 31.0M
31 kextd 0.0% 0:01.13 2 19 22 664K 736K 1012K 27.6M
27 dynamic_pa 0.0% 0:00.00 1 12 18 100K 324K 172K 26.6M
1 launchd 0.0% 0:00.12 3 186 21 232K 380K 496K 27.7M
0 kernel_tas 0.0% 0:05.38 46 2 1775 14.8M 0K 71.8M 1.21G

Aug 23, 2006 4:14 PM in response to Zimbakin

Unfortunately, when these commands were run, the machine was quiet. All of the processes listed in the top command were using no CPU. The amount of processor time that cron was showing did look high. The smart money is that cron wasn't actually using great amounts of processor time, but whatever job cron was running was using the processor, and since cron started the job, it's showing as using the processor.

When you notice the processor spiking, make note of the day/time. cron is a daemon that wakes once each minute, checks to see if it has a job to run that minute, and if it doesn't, goes back to sleep until the next minute.

The cron files for all users can be viewed in /var/cron/tabs . They're plain text files. You can look at /etc/crontab, (which shouldn't list anything) for the meanings of the columns. You can also check out the man pages for cron and crontab. Sorry I digressed a bit, anyway, if you know what day/time that this spike is happening, you can find what the job is in one of the /var/cron/tabs files. Once we know the job, then we can deal with it.

If you're using ActivityMonitor.app to look at the processes, set it for an hierarcal view. That way you'll be able to see what cron is running.

Roger

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cron is consuming CPU usage

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.