Latest Tweets
Tags
Accounts/Logins Active Directory Backup Base SAS Best Practices Blogging I/O IWA Kerberos Linux Logging Metacoda Security Plug-ins Metadata API Metadata Migration Metadata Promotion Mid-Tier ODBC ODS OLEDB PAM platformadmin.com Roles & Capabilities SAS SAS/ACCESS SAS 9.1 SAS 9.2 SAS 9.3 SAS Architecture SAS Configuration SAS Enterprise Guide SAS Hotfixes SAS Information Delivery Portal SAS Installation SAS Management Console SAS Metadata Security SAS Training SAS Usage Notes SASware Ballot SPN SQL Server Support Resources Ubuntu UNIX Windows Windows 2008 R2Metacoda Links
SAS Institute Links
Blog Roll [ ... and links to blog rolls]
SAS Communities
SAS User Groups
Categories
- General
- Interesting SAS Usage Notes
- Linux
- Metacoda Security Plug-ins
- SAS Architecture
- SAS Configuration
- SAS Documentation
- SAS Enterprise Guide
- SAS Installation
- SAS Management Console
- SAS Metadata
- SAS Metadata Security
- SAS Open Metadata API
- SAS Software
- SAS Support Resources
- SAS Training
- SAS User Groups
- Solaris
- VirtualBox
- Windows
Archives





Dynamic Logging Reconfiguration in SAS® 9.3
One of the exciting new features in SAS 9.3 (well for me anyway) is the ability to replace or modify the logging configuration on-the-fly for a running server without needing to restart it. Previously in SAS 9.2 you could dynamically change the levels for loggers on servers (via SAS Management Console Server Manager Loggers tabs) but not modify the appender configuration. Now in SAS 9.3 you can completely change the logging configuration file and apply it without restarting the server. This is exciting because it means you can do something like add a new appender for a new custom log file for the metadata server in the middle of the day with out having to restart the entire platform of dependant services. That’s really neat!
I tried it out. I made a small change to the metadata server logconfig.xml, saved it, and then waited … watching the log file. I’d thought that maybe the servers had a watchdog thread to monitor changes to the log config file (a bit like the log4j’s configureAndWatch) but after watching and waiting for a little while nothing happened. I then checked the documentation (always a good idea) and found that you actually need to prod the server to tell it to change its logging config via proc iomoperate (also new in SAS 9.3).
This is the code I used to tell the SAS Metadata Server to reload its logging configuration file (logconfig.xml) – the one I had changed.
proc iomoperate;connect host='sas93lnx01' port=8561 user='sasadm@saspw' password='thesecretpassword';
set log cfg="/opt/ebiedieg/Lev1/SASMeta/MetadataServer/logconfig.xml";
quit;
It worked. The metadata server immediately closed it’s current log file (SASMeta_MetadataServer_2012-01-10_sas93lnx01_1266.log) and opened a new one with a _0 suffix (SASMeta_MetadataServer_2012-01-10_sas93lnx01_1266.log_0) using the modified config. I wondered why it had added the _0 suffix? Subsequent executions increase the log file suffix (_1, _2, etc.). Perhaps it was done to delineate the old and new logging config in case someone wanted to parse the logs? If anyone knows how to make it continue to log to the same log file I’d love to know.
Of course this dynamic logging reconfiguration also means you can readily switch between normal and trace level logging config files to troubleshoot a problem and then switch back again quickly – all without a restart. Something like this:
* switch to trace log configuration;
proc iomoperate;
connect host='sas93lnx01' port=8561 user='sasadm@saspw' password='thesecretpassword';
set log cfg="/opt/ebiedieg/Lev1/SASMeta/MetadataServer/logconfig.trace.xml";
quit;
* >>> REPLICATE THE PROBLEM;
* switch back to normal log configuration;
proc iomoperate;
connect host='sas93lnx01' port=8561 user='sasadm@saspw' password='thesecretpassword';
set log cfg="/opt/ebiedieg/Lev1/SASMeta/MetadataServer/logconfig.xml";
quit;
For more info check out the following SAS documentation references: