Skip to content

Extract Data

Using the SAS Enterprise Session Monitor Maintenance Utility you can extract data of various different types. When extracting data from a Server, the utility is intended to be run from the same machine where the Server is installed.

  1. Download the .zip file for your platform from here
  2. Modify line 2 of the vars.yml file for the location of your esm-server folder
  3. Open a terminal or command prompt and navigate to the esm-maintenace folder that was created as part of step 1
  4. Run the following command to extract all of the data stored within your system updating the value of <TMPDIR> to the location where you want the resulting CSV files to be created:
./esm-maintenance --extract-data --temp-dir <TMPDIR>
.\esm-maintenance.exe --extract-data --temp-dir <TMPDIR>

Additional Options

There are a number of other command line options that can be passed to the utility to control the amount, type, and content that is extracted from the Server. For a full list of options for the utility, please see the reference guide.

Option Description
--obfuscate-users Obfuscate username data from the data extract files
--obfuscate-hosts Obfuscate hostname data from the data extract. When this option is set, the "work_path" and "util_path" fields on the esm_session.csv file will be blank.
--max-age The max age of the data to be retrieved in days. A value of 30 would mean data only data 30 days old or less being extracted.
--compress-data Specifies whether output datasets should be compressed. Default is True. You can just create CSV files, and not compress to a tar.gz file by specifying --compress-data=False.
--server-data-only Specifies whether to just export data at the server
--these-sessions Specifies a comma separated list of session data to export.
--high-detail-output Specifies whether to only export very granular level data.
--high-detail-start used with --high-detail-output
--high-detail-end used with --high-detail-output

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