Architecting, installing and maintaining your SAS environment

knowing who is running with more space

Reply
Super Contributor
Super Contributor
Posts: 358

knowing who is running with more space

If i can please get help on this,

 

we are using sas 9.4 with linux and have "temp" directory as temporary working dir for each node. sometime, we have users running with huge space. i can see some session under /temp dir like,

 

sas_work0e0e000xxx_.......   and

sas_util0075424903572049

 

my question is what is best way to know which user is running with that temp sesson when we have lots of users? is there any specific command we can run in putty to get more details about that session? thanks.....

 

 

 

 

Super User
Posts: 7,758

Re: knowing who is running with more space

To find the subdirectory tree that consumes the most space in a filesystem, do

du -sk *|sort -nr|head

from the roor of the filesystem.

That will give you the 10 subdirs that eat the most space.

Doing a

ls -ld dirname

on these directories will display the owning user.

 

If you run into problems with space consumption in shared resources, I recommend to activate the quota system. Single users will then run out of individual space before a show-stopper for everyone happens.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 96

Re: knowing who is running with more space

Hello @woo;

 

We have faced this challenge before,

 

We used Windows/Linux Environment variable(for windows it is $USERNAME, ), which will give you a name of that user,

We have windows server so let me show you what we did;

 

  • First we went to SASHome\SASFoundation\9.4\nls\en (If you have unicode server, please open u8 folder instead of en)
  • Opened sasv9.cfg file, and edited -WORK parameter value like thisda.jpg
  • Earlier it was -WORK "!TEMP\SAS Temporary Files\"
  • After saving the changes on file, what hapeens that whenver user open BASE SAS or Enterprise Guide, it will create a folder of username in Temp folder, for eg: please see the below imagesScreenshot from 2016-11-08 12-52-46.png

And user's temp file will drop in the username's(here user is sasdemo) folder

Screenshot from 2016-11-08 12-58-25.png

 

 

So after separating user's temp folder, you can easily estimate the folder size and estimate that which user is using highest memory by using ls -lht command in Linux,

 

Now you are using Linux, so your environment variable for username is USER(for windows it is USERNAME), or maybe different one, so just give the environment variable name according to your Linux OS.

 

I hope this works for you !!

 

Thanks,

Kalind

 

Super User
Posts: 5,424

Re: knowing who is running with more space

If this is something you wish to do continously take a look at Environment Manager.
Data never sleeps
Trusted Advisor
Posts: 1,307

Re: knowing who is running with more space

Excellent question @woo,

 

for one-time analysis, all the commands that you already received, plus the suggestion tu separate work folders by username, are great and used as best practices.

 

In case you need a continued analysis/monitoring, you might use the SAS Environment Manager with its extended monitoring (APM/ACM), and there is also a 3rd Party tool, the Enterprise Session Monitor (ESM) by Boemska https://boemskats.com/esm

I am having great experiences with both of those tools.

Super Contributor
Super Contributor
Posts: 358

Re: knowing who is running with more space

Posted in reply to JuanS_OCS

Thank you all for your contrinution and time...i really like your ideas and thoughts. i have started keeping eye on using command like but it seems we will need to increase temp work space area which 500 gb as of now...may be 5TB or so...

Ask a Question
Discussion stats
  • 5 replies
  • 467 views
  • 4 likes
  • 5 in conversation