Architecting, installing and maintaining your SAS environment

Limit the number of sessions - SAS Linux

Reply
Occasional Contributor Rah
Occasional Contributor
Posts: 5

Limit the number of sessions - SAS Linux

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!

Super User
Posts: 5,516

Limit the number of sessions - SAS Linux

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.

Trusted Advisor
Posts: 1,301

Limit the number of sessions - SAS Linux

Posted in reply to Astounding

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.

Trusted Advisor
Posts: 1,301

Limit the number of sessions - SAS Linux

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.

Respected Advisor
Posts: 4,173

Re: Limit the number of sessions - SAS Linux

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

- Under which credentials are processes running?

Occasional Contributor Rah
Occasional Contributor
Posts: 5

Limit the number of sessions - SAS Linux

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!

Contributor
Posts: 71

Limit the number of sessions - SAS Linux

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.

New Contributor
Posts: 2

Limit the number of sessions - SAS Linux

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

Ask a Question
Discussion stats
  • 7 replies
  • 1875 views
  • 6 likes
  • 6 in conversation