Configure log file for cron daemon on AIX.

Cron daemon log in by default on /var/adm/cron/log, but I wanted to put it with all other logs of the system.
All system logs (syslog, mksysb, ftp, http, and so on, are on /var/syslog filesystem, I decided to put cron logs in the same place. Here’s what I did.

Add this lines to the end of file /etc/cronlog.conf


As cron is started from inittab it will respawn when you kill the PID.

[root@aix:/] cat /etc/inittab|grep cron

So, just kill cron’s PID (10748102 in this case)

[root@aix:/var/adm/cron] ps -ef|grep cron
    root 10748102        1   0 18:35:42      -  0:00 /usr/sbin/cron

Note also that cron log wil be rotate and compress. See:

[root@bibmnim:/var/adm/cron] ls -ltr /var/syslog/
total 18752
drwxr-xr-x    2 root     system          256 Mar 01 2011  lost+found
-rw-rw-r--    1 root     cron         164711 Apr 21 23:58 cron.log.0.Z
-rw-rw-r--    1 root     cron         165926 Apr 27 12:29 cron.log.1.Z
-rw-rw-r--    1 root     cron         165527 May 03 01:01 cron.log.2.Z
-rw-rw-r--    1 root     cron         164224 May 08 13:45 cron.log.3.Z
-rw-rw-r--    1 root     cron           1493 May 13 18:41 cron.log

That’s it!

Just thanks if the post was helpful 🙂


About igalvarez

More than 20 years experiences on IT industry. 20+ years in Unix experience : IBM-AIX, HMC/SDMC/IVM, SVC, Protectier, PureFlex Systems, VIOservers, IBM Bladecenters, IBM System Power, RedHat Linux, SuSE Linux, Debian/Ubuntu Linux. Solaris, SCO Unix, Tru64 Unix, Linux Virtualization: XEN, KVM, databases sb2, oracle, postgreSQL, Find more information here:
This entry was posted in AIX and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s