Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

What is the meaning of the "/usr/sbin/cron[84874]: (root) CMD (newsyslog)" message?

0

0

Article ID: KB22829 KB Last Updated: 12 May 2014Version: 3.0
Summary:

This article provides information about the /usr/sbin/cron[84874]: (root) CMD (newsyslog) message and describes how to prevent the message from appearing in log files.

Symptoms:

Clarify the meaning of the /usr/sbin/cron[84874]: (root) CMD (newsyslog) message and show how to prevent it from appearing in log files.

Cause:

The newsyslog utility is scheduled to run periodically by the Unix cron command. When the command is executed, the utility archives log files, if necessary. The interval between executions can differ based on the version of the Junos OS used.

Every time newsyslog is called via the cron, it logs the following message, by default, to /var/log/messages with the Info priority:

Sep 26 19:00:00 lab-re0 /usr/sbin/cron[84847]: (root) CMD (newsyslog)
Sep 26 19:01:00 lab-re0 /usr/sbin/cron[84864]: (root) CMD (newsyslog)
Sep 26 19:02:00 lab-re0 /usr/sbin/cron[84879]: (root) CMD (newsyslog)
Sep 26 19:03:00 lab-re0 /usr/sbin/cron[84894]: (root) CMD (newsyslog)
Sep 26 19:04:00 lab-re0 /usr/sbin/cron[84909]: (root) CMD (newsyslog)
Sep 26 19:05:00 lab-re0 /usr/sbin/cron[84926]: (root) CMD (newsyslog)
Sep 26 19:06:00 lab-re0 /usr/sbin/cron[84943]: (root) CMD (newsyslog)
Sep 26 19:07:00 lab-re0 /usr/sbin/cron[84963]: (root) CMD (newsyslog)
These messages are seen only when the facility is set to Any and the priority is set to Info or Any, as in this example:
system {
    syslog {
        file messages {

            any any;     < has to be 'any' or 'info' to see these messages
        }
    }
}
The /etc/crontab file below, from a node running Junos 10.4, shows that the cron will call newsyslog once every minute:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
# $Id $
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour mday month wday who command
#
# Rotate log files every 1 min, if necessary.
*/1 * * * * root newsyslog  < calls newsyslog every 1 minute
#
# Save some entropy so that /dev/random can re-seed on boot.
#*/11 * * * * operator /usr/libexec/save-entropy
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time. See adjkerntz(8) for details.
1,31 0-5 * * * root adjkerntz -a
#minute hour mday month wday who command
00 12 * * * root /usr/sbin/check-support -l

Intervals used in Junos OS:

  • Junos 8.5 - 9.2 - every hour

  • Junos 9.3 - 10.1 - every 15 minutes

  • Junos 10.2 - 11.2 - every minute

  • Junos 11.3 - 11.4 - by default, every 15 minutes. From 11.3 and later, the frequency of log rotation can be specified using the system syslog log-rotate-frequency command. (For more information on this command, follow this link: log-rotate-frequency.)
Solution:

There are two options to prevent this message from being logged:

  • Reduce the logging level to any notice:
system {
    syslog {
        file messages {
            any notice;
        }
    }
}
  • Or, apply a filter like this:
system {
    syslog {
        file messages {
            any any;

            match "!(\(root\) CMD \(newsyslog\))";  < note the () characters are escaped. This is required for the filter to work
        }
   }
}
Customers running Junos 11.3 or later can modify the frequency of logfile rotation and the occurrence of this message with the following configuration:
system {
    syslog {
        log-rotate-frequency <value>;
    }
}

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search