Server Logging

Understanding Logging

Logging is an optional feature that can be enabled when a server instance is started with the LASR procedure. In order to conserve disk space, the default behavior for the server is to delete log files when the server exits. You can override this behavior with the KEEPLOG suboption to the LOGGING option when you start the server. You can also override this behavior with a suboption to the STOP option when you stop the server.
The server writes logs files on the grid host machine. The default directory for log files is /tmp. You can specify a different directory in the LOGGING option when you start the server instance. The log filename is the same as server signature file with a .log suffix (for example, LASR.924998214.28622.saslasr.log).

What is Logged?

When a server is started with the LOGGING option, the server opens the log file immediately, but does not generate a log record to indicate that the server started. As clients like SAS Visual Analytics Explorer make requests to the server for data, the server writes a log record.
The server writes a log record when a request is received and completed by the server. The server does not write log records for activities that do not contact the server (for example, ending the SAS session).
A user that is configured with passwordless SSH to access the machines in the cluster, but who is not authorized to use a server instance is denied access. The denial is logged with the message You do not have sufficient authorization to add tables to this LASR Analytic Server. However, if a user is not configured correctly to access the machines in the cluster, communication with the server is prevented by the operating system. The request does not reach the server. In this second case, the server does not write a log record because the server does not receive the request.

Log Record Format

The following file content shows an example of three log records. Line breaks are added for readability. Each record is written on a single line and fields are separated by commas. Each field is a name-value pair.

Sample Log File Records

ID=1,PID=28622,SASTime=1658782485.36,Time=Tue Jul 24 20:54:45 2012,User=sasdemo,
Host=grid001,LASRServer=/tmp/LASR.924998214.28622.saslasr,Port=56925,
RawCmd=action=ClassLevels name=DEPT.GRP1.PRDSALE "NlsenCoding=62",
ExeCmd=action=ClassLevels name=DEPT.GRP1.PRDSALE "NlsenCoding=62",JnlMsg=,
StatusMsg=Command successfully completed.,RunTime=        2.17

ID=2,PID=28622,SASTime=1658782593.09,Time=Tue Jul 24 20:56:33 2012,User=sasdemo,
Host=grid001,LASRServer=/tmp/LASR.924998214.28622.saslasr,Port=56925,
RawCmd=action=BoxPlot name=DEPT.GRP1.PRDSALE,
ExeCmd=action=BoxPlot name=DEPT.GRP1.PRDSALE,JnlMsg=,
StatusMsg=Command successfully completed.,RunTime=        0.12

ID=3,PID=28622,SASTime=1658825361.76,Time=Wed Jul 25 08:49:21 2012,User=sasdemo,
Host=grid001,LASRServer=/tmp/LASR.924998214.28622.saslasr,Port=56925,
RawCmd=action=APPEND_TABLE     ,ExeCmd=action=APPEND_TABLE     ,JnlMsg=,
StatusMsg=Command successfully completed.,RunTime=        0.09
Log Record Fields
Field Name
Description
ID
specifies a unique identifier for the action.
PID
specifies the operating system process identifier for the server.
SASTime
specifies the local time of execution in SAS datetime format.
Time
specifies the local time of execution as a date and time string.
User
specifies the user ID that started the server.
Host
specifies the host name of the grid host machine.
LASRServer
specifies the server signature file.
Port
specifies the network port number on which the server listens.
RawCmd
specifies the request that is received by the server.
ExeCmd
specifies the command that the server executes. This value can include default substitutions or adjustments to the RawCmd (for example, completion of variable lists).
JnlMsg
specifies an error message that is buffered in a journal object.
StatusMsg
specifies the status completion message.
RunTime
specifies the processing duration (in seconds).
The server uses a journal object to buffer messages that can be localized. The format for the JnlMsg value is n-m:text.
n
is an integer that specifies the message is the nth in the journal.
m
is an integer that specifies the message severity.
text
is a text string that specifies the error.
Sample JnlMsg Values
JnlMsg=1-4:ERROR: The variable c1 in table WORK.EMPTY must be numeric for this analysis.
JnlMsg=2-4:ERROR: You do not have sufficient authorization to add tables to this LASR Analytic Server.