03-09-2012 09:09 AM
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!
03-09-2012 09:54 AM
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.
03-09-2012 11:19 PM
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.
03-09-2012 11:16 PM
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.
03-12-2012 09:23 AM
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!
03-14-2012 01:30 AM
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.
03-20-2012 10:39 AM
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