VMware Cloud Community
scotty_p
Enthusiast
Enthusiast
Jump to solution

VMA Syslog Creating too many log files

I set  up our VMA server as a syslog server for our ESXi hosts. I ran the command below to set this up.

vilogger enable --server server.domain.com --numrotation 3 --maxfilesize 10 --collectionperiod 10

The logs files are being capped at 10MB, but it's already created 4 log files for messages (messages.log, messages.log.1, messages.log.2, messages.log.3). My understanding is that the --numrotation setting would cap the number of files to 3. Can anyone tell me why this isn't working?

Thanks,

Scott

0 Kudos
1 Solution

Accepted Solutions
arturka
Expert
Expert
Jump to solution

Hi

vilogger enable --server server.domain.com --numrotation 3 --maxfilesize 10 --collectionperiod 10

Well, like for me all is good, cause you've specified to have file rotated 3 times

The logs files are being capped at 10MB, but it's already created 4 log files for messages (messages.log, messages.log.1, messages.log.2, messages.log.3). My understanding is that the --numrotation setting would cap the number of files to 3. Can anyone tell me why this isn't

*.log is current file which is used for logging, *.log.# is a rotated file

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com

View solution in original post

0 Kudos
3 Replies
logiboy123
Expert
Expert
Jump to solution

vilogger options The following are the options available when adding a host for log collection.

ServerThis specifies the hostname or IP address of the vMA target. If this option is omitted then all vMA target are added.
lognameThis specifies the log files to capture. The default value is to enable capture of all files.
collectionperiodThis specifies how often log files are collected. The default value is 10 seconds. Entries between 10 and 3600 are valid.
maxfilesizeThis option sets the maximum size for log files before rollover. The default value is 5MB. Entries between 1 and 1024 are valid.
numrotationThis option sets the number of log files to keep before the oldest is deleted. The default value is 5. Entries between 1 and 1024 are valid.

Keep in mind that if you have space remaining on your log drive it will not delete anything. It is only in the event of space contention that logs are deleted, the oldest logs being highest priority for deletion.

Regards,

Paul


0 Kudos
arturka
Expert
Expert
Jump to solution

Hi

vilogger enable --server server.domain.com --numrotation 3 --maxfilesize 10 --collectionperiod 10

Well, like for me all is good, cause you've specified to have file rotated 3 times

The logs files are being capped at 10MB, but it's already created 4 log files for messages (messages.log, messages.log.1, messages.log.2, messages.log.3). My understanding is that the --numrotation setting would cap the number of files to 3. Can anyone tell me why this isn't

*.log is current file which is used for logging, *.log.# is a rotated file

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com
0 Kudos
scotty_p
Enthusiast
Enthusiast
Jump to solution

That makes sense. Thanks.

0 Kudos