Expected cron daemon behavior change from SLES11 to SLES12
This document (7023601) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12 (SLES12)
SUSE Linux Enterprise Server 15 (SLES15)
Situation
SLES11 only allows one instance of cron (background process) or cron -n (foreground process).
sles11sp4:~ # ps aux | grep cron
root 3341 0.0 0.0 14808 672 ? Ss 09:11 0:00 /usr/sbin/cron
sles11sp4:~ # cron
cron: can't lock /var/run/cron.pid, otherpid may be 3341: Resource temporarily unavailable
sles11sp4:~ # cron -n
cron: can't lock /var/run/cron.pid, otherpid may be 3341: Resource temporarily unavailable
sles11sp4:~ # ps aux | grep cron
root 3341 0.0 0.0 14808 672 ? Ss 09:11 0:00 /usr/sbin/cron
SLES12 allows multiple instances of either cron (background) or cron -n (foreground).
sles12sp3:~ # ps aux | grep cron
root 1168 0.0 0.3 18880 2620 ? Ss 09:40 0:00 /usr/sbin/cron -n
sles12sp3:~ # cron
sles12sp3:~ # cron
sles12sp3:~ # cron -n &
sles12sp3:~ # cron -n &
sles12sp3:~ # ps aux | grep cron
root 1168 0.0 0.3 18880 2620 ? Ss 09:40 0:00 /usr/sbin/cron -n
root 1269 0.0 0.2 20136 1940 ? Ss 09:42 0:00 cron
root 1271 0.0 0.2 20136 1940 ? Ss 09:42 0:00 cron
root 1272 0.0 0.3 20140 2952 pts/0 S 09:42 0:00 cron -n
root 1273 0.0 0.3 20144 2888 pts/0 S 09:42 0:00 cron -n
Resolution
Kindly open a Service Request via SCC and ask for Program Temporary Fix "PTF" ; Fix is available and will be released in future cronie package.
Cause
SLES12 & SLES15 introduced a
defect allowing multiple background and foreground instances of cron to run concurrently.
Additional Information
SLES11: Only one instance of cron (background) or cron -n (foreground) is allowed. All additional instances will result in resource temporarily unavailable.
SLES12 and SLES15: Only one instance of cron (background) is allowed, but multiple instances of cron -n (foreground) are allowed. All additional instances of cron (background) will result in resource temporarily unavailable. However, multiple instances of cron -n (foreground) are allowed and do not result in a resource restriction.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7023601
- Creation Date: 20-Dec-2018
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com