Sasha
September 13, 2019, 11:53pm
1
log.output: “/app/config/node.log”
I’ve noticed my node.log stopped updating after it hit a size of (22,167,248 bytes).
Has anyone else noticed this?
Is there a possible issue in how the node operates if the node.log reaches a certain size?
Is there an additional command that can be used to split and create a new node.log file, which would create incremental node.log files as an archive?
I had to rename the log and restart the node to resume back to normal operation with a new empty node.log file
Sasha:
22,167,248 bytes
Which operating system are you using ?
Sasha
September 15, 2019, 5:16am
3
This might have been an anomaly as I could re-create it, however I would still like to know:
Is there an additional command that can be used to split and create a new node.log file, which would create incremental node.log files as an archive?
Alexey
September 15, 2019, 4:21pm
4
Only the standard logrotate.
The storagenode doesn’t have any such functions as far as I know.
Alexey
September 16, 2019, 9:30pm
6
This works only if you didn’t redirect the log.
1 Like
Hi Alexey,
Can you share those options? I am looking for something to limit the log file size. For example, 100 or 300 MB and after that to start over again. Because currently it is over 1GB and it is useless for me. I don’t need such big history of event so way back.
Thank you in advance!
Alexey
August 24, 2021, 6:08am
8
I uses such options in /etc/logrotate.d/storagenodes
:
/mnt/w/storagenode5/storagenode.log {
rotate 14
monthly
maxsize 1G
copytruncate
compress
missingok
notifempty
}
/mnt/w/storagenode5/storagenode-updater.log {
rotate 14
monthly
maxsize 1G
copytruncate
compress
missingok
notifempty
}
based on
are you running in a NAS or Windows or Linux?
In Ubuntu I use the “logrotate” command in a cron job to create/compress log files.
First you have to make sure you have added in the “Log Location” and “Log level” fields in the “config.yaml”
Then look in the “/etc/logrotate.d/” folder, you’ll see a list of files, those are the configs used to rotate logfiles ( usually found in “/var/log/”). I just put a “storj” config file in the logrotate.d/ and it’s done automatically
To rotate my logs i use …
what about for Windows? The GUI istallation version?
Alexey
August 24, 2021, 6:29am
10
Many options, you can use the logrotate for Windows, write own script like this one: GitHub - AlexeyALeonov/storagenode_win_log_rotate: Windows GUI storagenode log rotation script (doesn& (beware - it’s not compatible with logrotate), use some GUI programs (I’m sure it should exist logrotate windows - Google Search ).
Doesn’t StorJ support its own option in the config file to limit the size of the logs?
Alexey
August 24, 2021, 6:55am
12
No. It’s also does not include any other system tools like RAID, mailserver, S.M.A.R.T. checker, etc.
It’s a typical POSIX service - it can do only one job (provide storage and bandwidth to the customers) and do it well.
As you know, the updater is a separate service too.
OK
I will do that manually
Maybe once or twice per month. It’s not time consuming.