Hello -
We have two servers in our SAS development environment, OA and VA. As a new SAS Admin I want to know the best practice of archiving the log files? When I search on servers, I will find many log files in various locations and not sure which one I should archive. I am also wondering if I need to stop SAS services before copy and archiving the log files.
I have looked at SAS 9.4 Intelligence Platform: System Administration Guide but couldn’t find answers to my questions.
Any help or direction is greatly appreciated.
Thanks
Firstly, to locate your log files, the best place to look is in the $SASCONFIG/Lev1/Documents folder of each server, which contains files which were dynamically created when your platform was installed, including a detailed list of what was installed on that server, how to start & stop the services/spawners and (in your case) the location of all the log files.
Now what to do with your log files. SAS does not have a log file archiving & purging policy - that's up to you.
My suggestion is each month, in each folder zip the previous months' logs (201701.zip, 201702.zip, etc), and delete any logs older than (say) 3 months - if you REALLY need log files older than that, you should be able to retrieve them from your server's filesystem backup.
Best of luck.
If you have not already seen it, you may find this article of interest https://communities.sas.com/t5/SAS-Communities-Library/Sweep-up-my-SAS-logs/ta-p/257385.
Thank you ArtC for your reply and info. I did go ahead and downloaded LogConfigSweeper utility in our development environment. Here is the issue I am encountering with:
I have two servers OA and VA. On the OA I have the following directories under SASConfig (Certificates, Meta and OA).
It looks like the LogConfigSweeper.bat file is looking for level_env.bat file and that file does exists on our OA server but in two different folders and they are: \SAS\SASConfig\Meta\Lev1 AND \SAS\SASConfig\OA\Lev1
Now, I went ahead and place LogConfigSweeper into \SAS\SASConfig\OA\Lev1\Web\Utilities folder and did run \SAS\SASConfig\OA\Lev1\Web\Utilities>logconfigsweeper.bat objectspawner -output c:\tooloutput but results are some .xml files and couple of .bat files and no log files. If I run it with -all command then I get lots of subfolders with mix of log and other files!
At the beginning of the LogConfigSweeper.bat there is a call to level_env.bat, I was wondering if I need to change that to match the location where my level_env.bat files are located.
setlocal
call "%~dp0..\..\level_env.bat"
Again your input much appreciated.
Best,
Iman
Firstly, to locate your log files, the best place to look is in the $SASCONFIG/Lev1/Documents folder of each server, which contains files which were dynamically created when your platform was installed, including a detailed list of what was installed on that server, how to start & stop the services/spawners and (in your case) the location of all the log files.
Now what to do with your log files. SAS does not have a log file archiving & purging policy - that's up to you.
My suggestion is each month, in each folder zip the previous months' logs (201701.zip, 201702.zip, etc), and delete any logs older than (say) 3 months - if you REALLY need log files older than that, you should be able to retrieve them from your server's filesystem backup.
Best of luck.
Thank you Andrew, will give it a try and will let you know.
Hi Andrew - the $SASCONFIG/Lev1/Documents was very helpful. It looks like on our OA server I have only one set a log files for SAS Metadata Server and on our VA the Stored Process Server, Workspcace Server, SAS Data Step Batch Server, SAS Apawners, ... all are creating a log file under the same directory.
Now just going to create some poweshell scripts to do the archiveing for me. Thanks again for your help and info.
Best
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.