BookmarkSubscribeRSS Feed
Sai_001
Fluorite | Level 6

Hi All,

I am new to SAS viya . currently  in our organization using SAS Viya 2023.03 version . I would like to know whether any command can be used to find the logs path for the scheduled jobs . i like to  store the logs of my jobs in specific path and like to read programmatically .

I check the default path given  like /opt/sas/viya/config/compsrv/default - but no files/data available. 

so like to know any sas command or kubctl command useful to fetch the path of sas scheduled jobs logs.

2 REPLIES 2
gwootton
SAS Super FREQ
Scheduled job logs are accessible from SAS Environment Manager -> Jobs and Flows -> Monitoring. The Logs column should have a download link.
The jobs run in pods that are ephemeral, so logs would not be persisted on the file system of those pods.
--
Greg Wootton | Principal Systems Technical Support Engineer
MAGG
Obsidian | Level 7

Log-files from scheduled jobs are being saved on the content-server. Note that this file are only a certain period available, so you've download the original logfiles  before they are being deleted on the  content-server. ( Of course you may save this files on an other location on the content-server)

 

%let base_uri=%sysfunc(getoption(SERVICESBASEURL));

filename jobrec temp;


/*this gives a list with file-uris for log-files for scheduled jobs */
proc http method=get oauth_bearer = sas_services
     url="&base_uri/jobExecution/jobs?limit=300%nrstr(&filter=eq(submittedByApplication, 'jobExecution'))"
     out=jobrec
     ;
 run;

libname jobrec json;

Then you can use the file-api to retrieve the contents of a particular log-file