S Conversion Character

Delivers various system information to the log event.
Alias: systemInfo
Requirements: The S conversion character must be followed by the specified value, which is also referred to as a key, and must be enclosed in a pair of braces.
If you specify a default value, you must specify key and default, separated by “ | “ (the vertical bar), enclosed in a pair of braces.

Syntax

S {key}
S {key | default}

Required Arguments

default
specifies the value that is used when the information that is specified by key cannot be found. The value of default is a character string that appears between | (the vertical bar) and }( the closing bracket).
Note If the character string contains quotation marks, the quotation marks become part of the value of default. Quotation marks in an XML attribute must be specified using the character entity ".
Example %S{App.Log|Spawner.log}
key
key can be one of the following types of information:
App.Log
reports the filename that is specified by the LOG= system option when SAS starts. Otherwise, these actions occur:
  • If the LOG= system option does not specify a filename, but a filename is specified by the SYSIN= system option, the filename that is specified by the SYSIN= option is used. The file extension is changed to .log.
  • If the filename that is specified by the SYSIN= system option lacks a full pathname, the path of the current working directory is prepended to the filename.
App.Name
reports the value of the LOGAPPLNAME= system option.
App.Sysin
reports the filename that is specified by the SYSIN= system option.
model_name
reports the name of the manufacturer of the computer hardware. Examples are HP, SUN, and IBM.
model_num
reports the model number of the computer hardware. Examples are Itanium, X86, RS/6000, SPARC, and 9000/800.
host_name | hostname
reports the node name that is assigned to the computer hardware. An example is apex.com.
serial
reports the serial number of the operating system.
os_name
reports the name of the operating system. Examples are LINUX, HP-UX, SUNOS, and XP_HOME.
os_version
reports the version of the operating system.
os_release
reports the release number of the operating system. Examples are Linux2.6, Linux 5, Linux 9, and Linux 11.22.
os_family
reports the family of operating system. Examples are LINUX ITANIUM, LINUX, SUN 64, HP IPF, and WIN.
jobid | pid
reports the job ID or the process ID, as appropriate.
user_name | username
reports the user name in the appropriate form.
Note The user_name is the identity that owns the process rather than the client identity that is associated with the current thread.
See u Conversion Character
startup_cmd
reports the arguments that are specified when the application was started.
version
reports either of these versions: TK_BASE_MAJOR or TK_BASE_MINOR.
system_desc
reports a description of the hardware and software environment. Examples are X86_64 Linux, HP Itanium Processor Family, and Sun Sparc 64-bit.
build_date
reports the date on which the kernel for threaded processing was built.
build_time
reports the time at which the kernel for threaded processing was built.
sup_ver
reports the version number of the SAS supervisor.
sup_ver_long2
reports the version number of the SAS supervisor that is Y2K compliant.

Example

Here is an example of the S conversion character:
%S{os_family}