Monitoring SAS through the Web

Sy Truong, Meta-Xceed Inc., Fremont, CA


Monitoring SAS processes and SAS work space in a mutli-user environment, such as UNIX, is key in maintaining optimal performance. This paper will present the SAS Monitor, a tool which captures SAS resources and uses SAS to analyze and display this information via a Web browser. SAS Monitor is useful for SAS/UNIX administrators and informative for end users since the information can be widely distributed through an intranet. Even though SAS Monitor has been tested on Solaris, it can be adapted to other flavors of UNIX. This paper will explore and explain some of the techniques used in capturing and publishing SAS resources on the web.


Operating the SAS system in a multi-user environment can be extremely resource intensive. The key to optimizing the SAS system is to properly maintain and manage the use of memory, disk and swap space. Since SAS treats each process and temporary work space as independent jobs, this poses challenges in the management of resources when many users work on multiple SAS processes simultaneously. One of the main causes of system crashes or slow downs is due to defunct SAS processes which were terminated ungracefully. A good way in preventing disastrous down time is to preemptively monitor how SAS uses computing resources and clean up unused resources before a problem develops. This paper will demonstrate SAS Monitor which is a tool designed to monitor SAS activity and provides a method for effectively reviewing and analyzing system resources.


Have you ever tried to submit a SAS program and run into the message?


This is in spite of claims that your system has more memory to handle such a job. You may be in the middle of a statistical procedure or a simple PROC SORT. It could be that you are trying to invoke an interactive session of SAS and nothing even starts due to inadequate memory or disk space. There are many reasons that may be causing these problems. They include:

  • WORK space is used up by defunct processes
  • Data size exceeds file system capacity
  • Memory size is not allocated to handle a particular statistical model

There are legitimate cases where system crashes were caused by not having enough computing resources. However, there are many instances where there is enough power to get the job done and system crashes can be avoided.


Since SAS is designed to be very platform independent, there are few tools that monitor operating specific resources. This poses challenges since SAS leaves the management of its work space in physical files left to the operating system. There exists a utility called "cleanwork" which will remove work space that does not have an active SAS process. This works well, but you may not know when there exist work spaces without associated processes which need cleaning up. One possible approach with this method is to schedule the "cleanwork" utility to run periodically.

SAS Monitor works well in conjunction with utilities such as "cleanwork." It allows you to view the current status of resource usage before executing the utility.

Monitoring work space and other system resources can be very beneficial in maintaining optimal performance. There are few tools in the BASE SAS product which will supply this information. The new IT Vision may prove to be useful since it goes more in depth than the SAS Monitor tool in evaluating system resources.

WHY SAS Monitor?

There are many utilities which are built into the UNIX operating system to supply the necessary information in evaluating system resources. However, they are usually command line based facilities and sometimes cryptic for many users. The information returned may also be coded and may be difficult to decipher. SAS Monitor captures system resources specific to SAS and makes it available to users in a friendly Web browser interface. It presents the information graphically and textually to effectively communicate resource usage. It also analyzes the information before reporting it to assist you in discovering system anomalies.


SAS Monitor was developed on the UNIX Solaris 2.4 running SAS 6.12. Various SAS/IntrNet components along with SAS HTML publishing macros were evaluated during development, especially the Application Dispatcher since it gave more interactive capabilities. There were performance barriers, however, since capturing system resources can take time.

In this situation, instead of implementing SAS/IntrNet, BASE SAS and SAS/GRAPH proved to be more effective. These batch programs were scheduled to run every ten minutes via the UNIX cron facility to capture the most up-to-date system resources. SAS Monitor was accomplished with customized DATA STEP and SAS/GRAPH programming to publish the HTML pages to a web browser. The source code is available in the appendix of this paper.

The questions you may ask in determining whether to develop a web application with interactivity versus batch are:

  1. Are the number of pages dynamically determined by the user's selections?
  2. How long does it take for the SAS process to complete a single request?
  3. How up to date does the information need to be? in seconds, minutes, or hours?

A factor which contributed to developing SAS Monitor in a batch mode was that there was a small number of static pages which needed to be produced. All the HTML pages could be mapped out ahead of time. This made it easier to have the HTML pages generated as an independent process from the user's interactions. It proved to be much more responsive for the users since all the drill down linked immediately to the page which had already been produced. The disadvantage is that the information is not completely up to date but since the pages get updated every ten minutes, it suffices.


Obtaining optimal and consistent performance for the SAS system in a multi-user environment, such as UNIX, requires good system monitoring. There are few tools available for this purpose which are accessible to users. SAS Monitor is a tool which captures this information and disseminates it via the web browser. It takes advantage of UNIX tools and SAS to capture, analyze, and report SAS resources. A batch approach was chosen in the design of this tool since there were a limited and predetermined number of pages which needed to be produced. By making resource information accessible to users and administrators, system crashes may be avoided.

SAS is a registered trademark or trademark of SAS Institute Inc. in the USA and other countries.

indicates USA registration.
Author: Sy Truong
Meta-Xceed Inc.
33916 Tybalt Ct.
Fremont, CA 94555
(510) 713-1616