Architecting, installing and maintaining your SAS environment

Removing log files

Reply
New Contributor
Posts: 2

Removing log files

Hello,

 

Newbie here so take it easy on me.  We have drivespace being eaten up on our server.  I see alot of log files beneath the folder D:\sas94\config\Lev1\ in different folders.  Can these be removed manually?  Is it safe?  Examples of names of files:

 

localhost_access_log.2016-06-02-10.txt

 

there is a gemfire.log that is over 4GB.

 

Thanks!

Kevin

Super User
Posts: 3,102

Re: Removing log files

Are you referring to the SAS mid-tier server here since you mention Gemfire? If your log files are growing fast then there are at least 2 possible causes:

 

  1. You have elevated logging options set so more is being reported
  2. You have errors occurring on your server that are repeatedly being reported in your logs.

Investigating your logs and logging options should enable you to identify if either of these causes are present. Sure you can delete logs but that won't stop them growing again if options are not set appropriately.  

New Contributor
Posts: 2

Re: Removing log files

Thanks SAS Kiwi for your response. Where are these logging options set?

Kevin
PROC Star
Posts: 392

Re: Removing log files

I use cron jobs on Linux to purges old log files using the find command with mtime and delete options. You should be able to do a similar thing on Windows with the appropriate commands. I saw a StackOverflow question with a few examples: http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days

 

Of course, you'd need to be careful (and have a backup handy) when testing that type of process to make sure it only deletes log files and only in the right locations. The following SAS note will be helpful in identifying those locations: SAS Usage Note 55426: Locating the log files for the SAS® 9.4 middle tier

 

That's a pretty big gemfire log so as @SASKiwi points out you might want to look at the contents to see if there are any issues there.

SAS Super FREQ
Posts: 291

Re: Removing log files

Hi there,

 

in addition to all the great suggestions, you could check whether the Workspace Server log file is enabled. This does not

solve the size and "fill up" of the other SAS logs, however, if the Workspace Server log is enabled, it'll eat up lots of space.

Check \SAS config dir ...\Lev1\SASApp\WorkspaceServer.

 

Whether you'll remove/delete log files, consider whether your company might need to keep them for a certain period of time,

or, of keeping a certain timeframe might be important for auditing and the like.

 

This is a blog that might help as well:

https://communities.sas.com/t5/SAS-Procedures/How-to-clear-SAS-logs-automatically/td-p/58884

 

Thanks

Anja

Ask a Question
Discussion stats
  • 4 replies
  • 435 views
  • 0 likes
  • 4 in conversation