Hi all,
how to maintain the jfd log and house keep? Preferably by size
We are currently running in debug mode and capturing data which will soon cause us an issue in tour dev environment.
Thanks,
SS
Logrotate is not part of PM but comes with Linux. If it is not already available consult with your Linux administrator to add the package. See https://linux.die.net/man/8/logrotate for the Logrotate documentation. For illustration this is the content of our config file (/etc/logrotate.d/lsflog) for the LSF and PM logfiles:
/srv/pss/pm/log/*.ourcompany.nl /srv/pss/lsf/log/*.ourcompany.nl { copytruncate daily rotate 60 missingok dateext su lsfadmin lsf }
This does the following:
1) Make a daily copy of each file adding a date extension to the name.
2) Truncate the file, wiping its content without affecting programs that are writing to it. This keeps the file in place.
3) No more than 60 versions are kept. Logfiles older than 60 days are deleted.
The pathnames are likely different in your installations.
Hope this helps,
-- Jan.
Currently jfd.log file has entries from Jan 2016 to till date. so we want to maintain the logs on daily time stamp basis and delete the logs which is older than 30 days.
is there any process to do this.
thanks in advance.
Regards,
SS
What operating system are you on? We are on Linux and have seen the same. We decided to configure all the PM logfiles in the logrotate facility. This works a treat. We rotate the files daily but logrotate can also rotate based on file size. Deleting old files is also done by logrotate. Other older logfiles (we use 60 days) are removed daily with a command in cron:
@daily find /your/logs/are/here -mtime +60 -delete
This can be refined to limit the excursion into subdirectories and use name patterns, file types etc.
We do it for a wide range of log files but it is totally possible to do it just for the jfd file.
Obviously on Windows this would be handled differently.
Hope this helps,
-- Jan.
Thanks for your reply.
We are on Linux too.We are looking for the same solution as yours.where can I find the logrotate facility in PM. please can you explain how to configure all the PM logfiles in the logrotate facility .
Thanks in Advance.
Regards,
SS
Logrotate is not part of PM but comes with Linux. If it is not already available consult with your Linux administrator to add the package. See https://linux.die.net/man/8/logrotate for the Logrotate documentation. For illustration this is the content of our config file (/etc/logrotate.d/lsflog) for the LSF and PM logfiles:
/srv/pss/pm/log/*.ourcompany.nl /srv/pss/lsf/log/*.ourcompany.nl { copytruncate daily rotate 60 missingok dateext su lsfadmin lsf }
This does the following:
1) Make a daily copy of each file adding a date extension to the name.
2) Truncate the file, wiping its content without affecting programs that are writing to it. This keeps the file in place.
3) No more than 60 versions are kept. Logfiles older than 60 days are deleted.
The pathnames are likely different in your installations.
Hope this helps,
-- Jan.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.