BookmarkSubscribeRSS Feed
Rah
Calcite | Level 5 Rah
Calcite | Level 5

Hello!

I have SAS 9.3 installed on a Linux Server.

My question is if I can limit the number of SAS Sessions (per user or group) using some SAS option

(Management console, sasenv_local, etc).

I'm trying not to use a 100% Linux solution, that is, I'm trying to find a solution that involves a SAS parameter or something.

I've already searched the SAS system options, and googled about it, but I found nothing.

Does anyone knows if it is possible?

Thanks in advance!

7 REPLIES 7
Astounding
PROC Star

If all else fails ...

You know the location of the SAS WORK folders.

Linux should be able to count how many folders belong to the current user.

There are pitfalls, like cancelled sessions that never erased the WORK area.  But at least it's a possible approach.

Good luck.

FriedEgg
SAS Employee

A way to avoid this, from a purely linux solution would be to use the ps command to retrive a report of running processes and then instantiate a SAS session only if the desired load is met.

FriedEgg
SAS Employee

It's capabilities probably far exceed your needs but you may find Platform LSF (http://www.platform.com/workload-management/high-performance-computing).  You can use this tool for management and optimization of server processes either on a single server to orchestrated in a 'cloud'  SAS Grid is actually build on top of this product by Platform Computing (which was somewhat recently purchased by IBM).  I consider it's pricing structure quite reasonable however it has been a while and I have never dealt with new licensing since it has become part of IBM.

Patrick
Opal | Level 21

- What should happen if a user/group exceeds the allowed limit?

- Under which credentials are processes running?

Rah
Calcite | Level 5 Rah
Calcite | Level 5

Patrick, the idea is that the user will not be able to start a SAS session if he/she exceeds the allowed limit.

Yes, the process is running with the user's credentials, I could identify them using ps.

I think now I will work with an Linux solution, as it appears that SAS by itself can't handle this... Thanks for all the answers guys!

boschy
Fluorite | Level 6

I don't of any config parameters for session limits, but you could modify the sas.sh script and, like someone said, count the number of current sessions using ps, then only invoke the sas exec command if the limit is under. Either that, or check the LOAD averages, count the number of SASWORK folders, etc.

By doing this you can also get the script logic to e-mail an alert to you and/or the SAS developer when this happens. But to my mind, it's not very user friendly.

diser
Calcite | Level 5

You also mentioned you want to restrict number of management console connections. This is impossible for now, as far as I know. But fortunately, management console connections do not consume a lot of resources, unless they are very specific admin/backup log-ins which require special handling from the metadata workspace server.

In addition to the previous answers, if a user will be somewhat knowledgeable about the sas environment, there is a possibility for that user to use a separate sas.sh (own rewritten one) and a separate work area which may diminish your restrictions. In these cases you may need to run ps commands as root every minute, calculating the number of sas processes per user, and probably killing the newest ones, though I'd be very careful with this script Smiley Happy

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 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 3780 views
  • 6 likes
  • 6 in conversation