We’re smarter together. Learn from this collection of community knowledge and add your expertise.

Sweep up my SAS logs

by SAS Employee GerryNelson on ‎03-17-2016 02:01 PM - edited on ‎03-17-2016 03:07 PM by Community Manager (1,575 Views)

In doing research for the troubleshooting section of a new workshop I am working on, I ran into a very useful tool that I was not aware of. A quick poll of my GEL administration team colleagues revealed I was not alone. I am guessing there may be many of you have not heard of the "LogConfigSweeper tool for automated log and configuration data collection". The LogConfigSweeper tool is an automated Java based tool that enables you to collect SAS server log and configuration files to a central location.


When you run into problems in a SAS deployment the log and configuration files become very important. To diagnose and fix a problem you often need log files from multiple server types. In a typical SAS configuration the log files for a SAS server are stored within the configuration directory of the server. For example, on an application server tier, Object Spawner logs would be stored in a logs directory within the ObjectSpawnerDirectory (<config>\Lev1\ObjectSpawner\Logs). Similarly, Workspace Server logs would be stored in a separate directory, for example <config>\Lev1\SASpp\WorkspaceServer\Logs. The result is that log files are not in one central location but distributed in a number of directories throughout the configuration directory.


The LogConfigSweeper tool helps you centralize the logs(and configuration files) making them easier to find and read, and also zips them up so that you could easily send them to SAS Technical Support. The tool only works for SAS 9.4 deployments. The tools installation, configuration and usage is described in this SASNOTE. The tool runs on windows and Linux and is pretty simple to get working. Download the zip file and unzip it to the directory <SAS-configuration-directory>\Lev1\Web\Utilities. When you unzip it three files will be added to the directory logconfigsweeper.jar, LogConfigSweeper.bat and LogConfigSweeper.sh. In Windows you can now run the tool, in a Unix environment you will have to make the .sh script executable.




In order for the tool to work it must be installed in the Lev1\Web\Utilities directory. If that directory does not exist in your configuration directory you can create it. In a multiple machine environment you will have to install the tool on each machine, or in a location that is accessible to each machine. The tool will not gather server logs and configuration files from all machines, only for the servers defined in the configuration directory of the machine it is run on. To get all log files you have to run it on each machine in the deployment. You must pass the tool parameter(s) which tell the tool what log and configuration files to collect, and also the -output option which tells the tool where to store its output. Let's look at an example. The command below tells the tool to collect logs and configuration files for the ObjectSpawner and Workspace server and store them in the d:\Logtooloutput directory.




When the tool runs it will write out messages to the terminal window.




When the tools is done it will have created, within the output directory specified, a new directory named with date-time that the tool ran. Within that directory are zip files contain the logs and configuration files for, in this case, the workspace server and the object spawner.



This tool can really help with one of the manual tasks involved in trouble-shooting issues within a SAS Deployment. It could also potentially be used as part of a log archiving process. There are a wide variety of options you can pass, including on the middle-tier "all" which collects all SAS 9.4 middle-tier logs as well as configuration files, "evmanager" which collects SAS 9.4 Environment Manager Server and Agent logs as well as configuration files and on the Metadata Server "metadataserver" to collect Metadata Server logs as well as configuration files. Check out the SASNote "Using the LogConfigSweeper tool for automated log and configuration data collection for SAS® 9.4 Ser..." for more details.

Your turn
Sign In!

Want to write an article? Sign in with your profile.

Looking for the Ask the Expert series? Find it in its new home: communities.sas.com/askexpert.