BookmarkSubscribeRSS Feed
woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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.....

 

 

 

 

5 REPLIES 5
Kurt_Bremser
Super User

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.

Kalind_Patel
Lapis Lazuli | Level 10

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

 

LinusH
Tourmaline | Level 20
If this is something you wish to do continously take a look at Environment Manager.
Data never sleeps
JuanS_OCS
Amethyst | Level 16

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.

woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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...

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