Skip to content

Active UTIL and WORK Discovery

Overview

SAS multi-threaded procedures can make use of a disk paging location referred to as UTILLOC. Unlike the SAS WORK location, which is a directory created at session startup that is unique to each individual SAS session, SAS UTIL directories are created on-the-fly by SAS procedures as they are required. Therefore, unlike the WORK system option which holds the full path to each session's individual SASWORK directory, the UTILLOC system option points to the parent directory which can contain any number of UTIL directories belonging to a number of other sessions.

The Enterprise Session Monitor Agent's tempDirectories file looks solves this problem by providing a simple way of being able to automatically and regularly check the specified directories for any on-the-fly created UTILLOC directories and measure the size of them. This data is then visible on the process charts and heatmaps in the UI.

File Options

Property Description Default Value Required
tempDirectories This is the base property to construct the object. It must be the first item in the file. N/A True
warningDuration The duration in milliseconds after which the Agent will attempt to process a regular expression before stopping and writing a warning to the Agent's log 2000 False
scanInterval The frequency in milliseconds with which the Agent will got to the directories listed in the directories option and check for directories that match the rules defined 20000 False
directories A list of one or more directories in which the Agent will look for directories that match the rules defined None True
settings A block of one or more rules for finding SAS temporary directories. None True
directoryPattern A regular expression pattern that is used to detect either SAS WORK or UTILLOC folders. This regular expression must contain one capture group called dirPid which contains either the hexadecimal or decimal value of the SAS process ID.

Additionally, a hostname capture group can be specified to associate the directory with a node in the environment. The value of this capture group is overwritten by nodeName if that option is used.
None True
directoryPidIsHex Specifies whether or not the Agent needs to decode the value of the dirPid capture group. True True
directoryType The type of directory that the Agent is looking for. Valid options are either work or util. work True
nodeName If specified, this value overrides the value that is found in the hostname capture group. None False

File Examples

Linux, multiple directories looking for UTILLOC

A Linux server with three different locations for SAS WORK (/work1, /work2, /work3) to be scanned every 5 seconds for the default format of UTIL folders on Linux. The server's hostname is abc123p.example.com, but has been configured to report into the Server as server1:

tempDirectories:
  warningDuration: 2000  
  scanInterval: 5000 
  directories: 
    - /work1
    - /work2
    - /work3
  settings:
    - directoryPattern: .*SAS_util\w{4}(?<dirPid>\w{8})_(?<hostname>[^_]+)_
      directoryPidIsHex: true
      directoryType: util
      nodeName: server1

Linux, multiple directories looking for WORK and UTILLOC

A Linux server with three different locations for SAS WORK (/work1, /work2, /work3) to be scanned every 5 seconds for the default format of UTIL and WORK folders on Linux. The server's hostname is abc123p and this is present in the name of the folder and is how the server has been configured to report into the Server:

tempDirectories:
  warningDuration: 2000  
  scanInterval: 5000 
  directories: 
    - /work1
    - /work2
    - /work3
  settings:
    - directoryPattern: .*SAS_work\w{4}(?<dirPid>\w{8})_(?<hostname>[^_]+)_
      directoryPidIsHex: true
      directoryType: work
    - directoryPattern: .*SAS_util\w{4}(?<dirPid>\w{8})_(?<hostname>[^_]+)_
      directoryPidIsHex: true
      directoryType: util

Windows, one directory, looking for UTILLOC

A Windows server with a single location for SAS UTIL (D:\SASWORK) to be scanned every 5 seconds for the default directory format of UTIL folders on Windows. The server's hostname is win123.example.com and this is present in the name of the folder but the server has been configured to report into the Server as megasas1:

tempDirectories:
  warningDuration: 2000  
  scanInterval: 5000 
  directories: 
    - D:\SASWORK
  settings:
    - directoryPattern: SAS_util\w{4}(?<dirPid>\w{8})_(?<hostname>[^_]+)_
      directoryPidIsHex: true
      directoryType: util
      nodeName: megasas1

Last update: April 24, 2023
Created: April 24, 2023