To capture the userID of the users who start a SAS session on a server, create a new autoexec.SAS file and add the following code to it (or just add the code to an existing autoexec.SAS file).
filename startlog "c:\temp\SASstart.txt" MOD;
data;
file startlog;
put "User &sysuserid ran PID &sysjobid on &sysdate : &systime";
run;
SAS runs the code each time a SAS session is started and appends the userID, the process identifier (PID), date, and time that the SAS session started in the file pointed to by the FILENAME statement.
The location and name of the file in the FILENAME statement can be changed. The verbage in the PUT statement can also be changed to reflect whatever message you want. The &sysuserid, &sysjobid, &sysdate and &Ysystime are automatic MACRO variables. They can all be used or the statement tailored to present just the information needed.
The PID can be used to track down who is submitting code that is crashing or causing problems on the server: