All (most?) logs on Proxmox end up inWhere can I find it for the host? I can't seem to locate it in the "usual places" (/var/log).
journalctl
. That is the "usual place" nowadays. I see a log of CRON in there.btw these are not in journalAll (most?)
I see a lot ofI ran : journalctl -u cron and it reports nothing.
pam_unix(cron:session): session opened for user
messages. Are any cronjobs running or do you want to see the logs because they are not running?When you say nothing, you mean no results whatsoever, or the errors you are looking for?I ran : journalctl -u cron and it reports nothing.
The journal is in binary format, you cant grep for messages there.I even grep'd the entire /var/log directory for 'cron' and nothing
I get that. As I said, I ran journalctl -u cron and it reported nothing. I also grep'd the entire /var/log directory for cron (recursive) and nothing found either.The journal is in binary format, you cant grep for messages there.
Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
This is very unusual, all our nodes have streams of:. As I said, I ran journalctl -u cron
root@pve7demo1:~# journalctl -u cron
Feb 19 11:55:01 pve7demo1 CRON[736099]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 19 11:55:01 pve7demo1 CRON[736100]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 19 11:55:01 pve7demo1 CRON[736099]: pam_unix(cron:session): session closed for user root
Feb 19 12:05:01 pve7demo1 CRON[739233]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 19 12:05:01 pve7demo1 CRON[739234]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
I'm running 8.0.4 at the moment.This is very unusual, all our nodes have streams of:
Code:root@pve7demo1:~# journalctl -u cron Feb 19 11:55:01 pve7demo1 CRON[736099]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0) Feb 19 11:55:01 pve7demo1 CRON[736100]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1) Feb 19 11:55:01 pve7demo1 CRON[736099]: pam_unix(cron:session): session closed for user root Feb 19 12:05:01 pve7demo1 CRON[739233]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0) Feb 19 12:05:01 pve7demo1 CRON[739234]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
This is due to a number of system jobs that are in cron by default:
root@pve7demo1:~# ls -al /etc/cron.d
total 36
drwxr-xr-x 2 root root 4096 Feb 22 21:37 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rw-r--r-- 1 root root 201 Jun 7 2021 e2scrub_all
-rw-r--r-- 1 root root 589 Feb 24 2023 mdadm
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
-rw-r--r-- 1 root root 396 Feb 2 2021 sysstat
lrwxrwxrwx 1 root root 20 Aug 3 2021 vzdump -> /etc/pve/vzdump.cron
-rw-r--r-- 1 root root 377 Jul 9 2021 zfsutils-linux
root@pve7demo1:~# ls -alR /etc/cron*
-rw-r--r-- 1 root root 1042 Mar 2 2023 /etc/crontab
/etc/cron.d:
total 36
drwxr-xr-x 2 root root 4096 Feb 22 21:37 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rw-r--r-- 1 root root 201 Jun 7 2021 e2scrub_all
-rw-r--r-- 1 root root 589 Feb 24 2023 mdadm
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
-rw-r--r-- 1 root root 396 Feb 2 2021 sysstat
lrwxrwxrwx 1 root root 20 Aug 3 2021 vzdump -> /etc/pve/vzdump.cron
-rw-r--r-- 1 root root 377 Jul 9 2021 zfsutils-linux
/etc/cron.daily:
total 44
drwxr-xr-x 2 root root 4096 Jan 25 14:57 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rwxr-xr-x 1 root root 1478 May 25 2023 apt-compat
-rwxr-xr-x 1 root root 123 Mar 26 2023 dpkg
-rwxr-xr-x 1 root root 377 Feb 28 2021 logrotate
-rwxr-xr-x 1 root root 1395 Mar 12 2023 man-db
-rwxr-xr-x 1 root root 622 Feb 24 2023 mdadm
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
-rwxr-xr-x 1 root root 518 Feb 2 2021 sysstat
/etc/cron.hourly:
total 20
drwxr-xr-x 2 root root 4096 Jan 3 22:56 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
/etc/cron.monthly:
total 20
drwxr-xr-x 2 root root 4096 Jan 3 22:56 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
/etc/cron.weekly:
total 24
drwxr-xr-x 2 root root 4096 Jan 3 23:00 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rwxr-xr-x 1 root root 1055 Mar 12 2023 man-db
-rw-r--r-- 1 root root 102 Feb 22 2021 .placeholder
/etc/cron.yearly:
total 20
drwxr-xr-x 2 root root 4096 Jan 3 22:56 .
drwxr-xr-x 117 root root 12288 Feb 22 21:37 ..
-rw-r--r-- 1 root root 102 Mar 2 2023 .placeholder
A failed cron job will not log the cause in the log/journal even if you had it working. You will need to troubleshoot the command line or add debug to your script. Do make sure you use absolute paths.
I dont know why you are not seeing any cron info, something unique to your setup. Have you modified it in any way?
What does "systemctl status cron" say?
What version of PVE are you operating on?
Good luck
Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
The normal output is :systemctl status cron reports nothing
ps aux |grep cron reports
root 887 0.0 0.0 6608 2560 ? Ss Jan28 0:04 /usr/sbin/cron -f
so I know cron is running.
We use essential cookies to make this site work, and optional cookies to enhance your experience.