BookmarkSubscribeRSS Feed
SundeepK
Obsidian | Level 7

Hi All,

 

I would like to trace all the user sessions with their queries getting executed on Base SAS.

 

Any advise will be helpful..!

 

Regards,

Sandy

4 REPLIES 4
anuraagjv
SAS Employee

I'm not sure if there is a way in Base SAS to see info such as when users open Base SAS sessions and close it, etc. 

There is, however, a way to have a "general" idea when was the last time your users open Base SAS. On the server, if you do a full search for "profile.sas7bcat" file, it will show results for each user session -- by looking at the "Date modified" of that file, you can tell when was the last time they launched Base SAS (SAS 9.4 English).

Kurt_Bremser
Super User

This will be possible on a BI server by changing the logconfig.xml file of the workspace server.

 

Please tell us in which environment you need these logs; describe in detail how SAS is used in your organization.

Sajid01
Meteorite | Level 14

Hello
This can be done in multiple ways. Some of them are listed. Which approach works for you, depends  on your exact situation.
The list is by no means exhaustive.
1,With process ID or user name we can identify  user session at the OS level (Windows task manager ot top/htop or ps aux on UNIX/Linux). This way the user session can be monitored/killed. We can use the memory consumption/cpu consumption. Without PID but only username due diligence needed.

2.If SAS program is being executed in the SAS EG, then you can have an idea of the step running.

3.if the log is being directed to an external log file and it is on UNIX or Linux, one can use tail -f to view the log as the code progresses. This approach gives the best method to monitor the program as it progresses. 

On windows I understand Powershell can be used to provide such a facility. 

4. have a look at the following resources which give more information.

https://support.sas.com/resources/papers/proceedings10/279-2010.pdf 

https://blogs.sas.com/content/sasdummy/2009/05/26/tracking-progress-in-sas-programs-in-sas-enterpris... 

https://blogs.sas.com/content/sasdummy/2016/02/20/proc-iomoperate-custom-task/ 

 

 

Nigel_Pain
Lapis Lazuli | Level 10

Here's a Powershell script (need to take the .txt extension off for that we use to monitor SAS sessions on our Windows server. It creates a CSV file with a list of user ID, PID, start time, CPU (total and user) and command line. It's scheduled to run every 15 minutes and then we have SAS programs to process the files once a day.

Years ago when we were on Solaris we had a shell script which did a similar thing.

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
  • 4 replies
  • 1168 views
  • 0 likes
  • 5 in conversation