BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

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

1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12

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.

View solution in original post

4 REPLIES 4
sathya66
Barite | Level 11

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

jklaverstijn
Rhodochrosite | Level 12

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.

 

 

sathya66
Barite | Level 11

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

jklaverstijn
Rhodochrosite | Level 12

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.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

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.

Discussion stats
  • 4 replies
  • 1641 views
  • 3 likes
  • 2 in conversation