BookmarkSubscribeRSS Feed
SAM_2025
Calcite | Level 5

Hi All,

 

I want to pull all the SAS users who are active only. Also, I want to get list of all SAS scheduled Jobs including the timestamp start and end time like how long it takes for this job.

16 REPLIES 16
LinusH
Tourmaline | Level 20

Please provide som additional information (including, not limited to):

- SAS version/products in use

- OS

- Scheduler used

- Definition of "active user"

Data never sleeps
SAM_2025
Calcite | Level 5

@LinusH 

 

we are using SAS Management Console (9.4) and SAS Enterprise Guide (7.1) which installed on our machine (windows).

For backend checking logs and other privileges we are accessing the server from unix .

 

Active users means who still using the system.

SAM_2025
Calcite | Level 5
Yes, anyone using SAS or even only viewing reports.
Nigel_Pain
Lapis Lazuli | Level 10

For SMC check the metadata server logs. Look for entries with "APPNAME=SASManagementConsole "

For EG users I don't think the metadata logs will tell you if an actual SAS session has been started, only if they've connected to the metadata. You could get active users from the Object Spawner logs (that's what I do).

SAM_2025
Calcite | Level 5
Can you specify where exactly from SMC I can check these logs?
Nigel_Pain
Lapis Lazuli | Level 10

You can't view the logs from SMC. You have to log onto the server(s) to do so. For the metadata server logs, these will commonly be in <config>/Levx/SASMeta/MetadataServer/Logs on the metadata server and for the object spawner logs, <config>/Levx/ObjectSpawner/Logs on the compute server.

 

When @LinusH asks about the scheduler, SMC is only the front end to this. Behind the scenes it will be relying on specific scheduling software. It could be Platform Suite for SAS if you have that licensed or the operating system scheduler on your servers (ie. cron on Unix or Linux, or the Task Scheduler on Windows). Here's where you set that in SMC:

Nigel_Pain_1-1741689059725.png

 

SAM_2025
Calcite | Level 5
Yes, I can see the logs under path <config>/Levx/SASMeta/MetadataServer/Logs

But how can I pull the names of the Scheduled jobs? the Logs are huge in size. Is there a SAS code that I can run in EG to get an output?
Nigel_Pain
Lapis Lazuli | Level 10

I don't think you'll get the scheduled jobs from the metadata logs, only entries where people are logging in to the metadata server (and filtering on "APPNAME=SASManagementConsole" will give you the users who have done this with SMC). I see from a later reply that you're using Operating System Services as your scheduler so for scheduled tasks you'd maybe need to look at logs within <config>/Lev1/SchedulingServer. In Windows there's a directory structure here of <username>\<jobname> with logs created by the job's VB Script. I don't know if that helps? Or, the actual SAS programs run under the Batch Server, so there are SAS logs in <config>/Lev1/SASApp/BatchServer/Logs. Alternatively, I'm not knowledgeable enough about Unix to know if there are logs created by cron? Might be entries in syslog?

Kurt_Bremser
Super User

When you run SAS programs from cron, you should always use the -log option to explicitly set the log location. Otherwise you might get permission/write failure issues for the log file.

LinusH
Tourmaline | Level 20

It's common for data warehouse application to include specific job logging, r.g., using macros. But this is not the case for your I guess?

An option to see what is actually being executed is to use the Job Monitor plugin to Environment Manager. It requires a little bit of configuration.

I don't think there's a OOTB listing available within SMC. This could be available in third party tool, like Data Controller for SAS.

What scheduler do you use?

Data never sleeps
SAM_2025
Calcite | Level 5
I'm not sure about the meaning of "What scheduler do you use?" but usually we use SMC to schedule our jobs.
LinusH
Tourmaline | Level 20
If you execute jobs interactively from SMC, then you don't use an external scheduler.
But if you deploy job flows to be triggered by time or files, then you are most likely using an external scheduler, like crontab. This should be defined as a server in SMC.
Data never sleeps
SASKiwi
PROC Star

@SAM_2025  - When you schedule a job in SMC you have to select a scheduling server. If you have licensed Platform Process Manager with SAS then that is one of the options you can select:

SASKiwi_0-1741720021494.png

In that case you are actually using a different scheduler to the other two default SAS options. Scheduled job details are stored in SAS metadata, but that wont tell whether they are actually being used or not. If you use PPM then that has a separate database you could query to get history of scheduled jobs.

 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 16 replies
  • 1990 views
  • 0 likes
  • 5 in conversation