cron spam in system log - do I need this?

samwathegreat

Member
Aug 2, 2021
11
1
23
40
Hey Folks,

I've been noticing lots of spam in my system log - every 10 minutes, I get the following:
Nov 20 10:05:01 pve CRON[3946582]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Nov 20 10:05:01 pve CRON[3946584]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Nov 20 10:05:01 pve CRON[3946582]: pam_unix(cron:session): session closed for user root

I've tracked it down to /etc/cron.d/sysstat:
root@pve:/etc/cron.d# cat sysstat
# The first element of the path is a directory where the debian-sa1
# script is located
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin

# Activity reports every 10 minutes everyday
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2
root@pve:/etc/cron.d#

This is happening on my 'oldest' PVE system. This one I started with a very early version of PVE 8 and am now on the latest version.

My other 2 PVE instances (one started on a later version of 8 and one started after 9 was released) don't even have this "sysstat" file, and so, obviously, don't have the logs spammed every 10 min.

I'm going to guess that this is something carried over from an older version of PVE - does that sound accurate?

Does anyone know what this cron job is even doing and whether or not it's even needed? I'm tempted to just delete the sysstat file, but I want to make sure it's not countraindicated first.

Thanks in advance for any info!
 
root@pve:/etc/cron.d# find /etc/ -type f -name sysstat
root@pve:/etc/cron.d#

So what/who created that file? So I asked chatgpt this question: What does this command do?
'
# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2'

You can do the same and read the answer:)
 
root@pve:/etc/cron.d# find /etc/ -type f -name sysstat
root@pve:/etc/cron.d#

So what/who created that file? So I asked chatgpt this question: What does this command do?
'
# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2'

You can do the same and read the answer:)
Don't be a jerk. Just don't reply ;) I'm not interested in chatgpt's answer.
 
Last edited:
Don't be a jerk. Just don't reply ;) I'm not interested in chatgpt's answer.
Actually, chatgpt's answer is quite accurate. The cronjob is not native to Proxmox. You installed it!
If you cared to look at the command I ran and whose results I shared, you'd have realized that in vanilla Proxmox, there is no such a file named sysstat inside /etc/cron.d or anywhere in /etc.
Anyway, I accept being called a jerk!
 
Last edited:
When someone asks for help (especially someone with more of a reputation than you) and you reply with "chatgpt it", that's rude. And it's not helpful. And it detracts from the community and discourages people from asking for help.

Also, as I stated, this install goes back to early Proxmox 8 - I don't trust you or chatgpt to know for certain that sysstat was not part of the install on that version. I already stated that it's not in my later versions.

It's definitely not necessary for you to reply further.