BookmarkSubscribeRSS Feed
gboggs
Obsidian | Level 7

EG 7.15hf3.  Current version: 9.04.01M4P110916  

I am finding that some sort of workfiles are being created in the /tmp directory of the linux server.  These tables clean up if the EG session associated with them ends normally.  If a disconnect or abnormal termination of the session happens then the tables are orphaned taking up space that is needed for others to run their EG sessions.  To be clear this is not SASWork, these tables can be created as soon as the user double clicks on a table in a library from one of our source system.  

 

Typical scenario is that the user opens a library, then double clicks on a table to get a feeling for the data contained in it, the user then moves on to review data in a second table it is then a file in created in /tmp.  Once the user moves beyond opening the table, say to a filter and sort step the temporary tables are removed from /tmp. 

 

The linux server team here is wondering why SAS uses /tmp and I am curious as what options exist to remove these tables like happens with cleanwork?  Can I redefine the location of these tables in a configuration file?  

 

12 REPLIES 12
MargaretC
SAS Employee

You are referring to the SAS WORK directory that is created at the start of the backend SAS session that does all the processing from your SAS EG session.  By default, SAS WORK is placed in /tmp since we know that file system is writeable by all logins to your RHEL system.  It is a best practice to move this file system to a more IO robust system to insure faster processing.  You do this by changing the -work line in your sasv9.cfg file.  See the "A large number of temporary files can be created during long-running SAS jobs" section of this paper http://support.sas.com/resources/papers/proceedings16/SAS6201-2016.pdf.  On page 7 of this paper there is a section that talks about moving the default location of SAS WORK.  

 

There is also a utility that ships with SAS that is called cleanwork.  If you run this as root, it will check all the directories in your SAS WORK location and delete the ones that have been "orphaned" because the SAS process associated with them was not terminated properly.  Here is documentation on the cleanwork utility.  Here is documentation for using the command on UNIX https://go.documentation.sas.com/?docsetId=hostunx&docsetTarget=n13ozwpq7az8v6n1s77r8c2zp9d1.htm&doc...

 

Let me know if you need more support on this.

 

Margaret

gboggs
Obsidian | Level 7

Thank you for the reply, using both your reply and AhmedAl_Attar  reply.  I confirmed the the work entry in the <SASHome>/SASFoundation/9.x/sasv9.cfg file is set to /saswork which is a seperate file system on the server.  It is much larger and more robust than the /tmp directory.  Is there another entry I can review that may explain the tables being created?  

 

MargaretC
SAS Employee
There are several other sasv9.cfg files in the folder. Please search for all of these files and make the same change in them all.
gboggs
Obsidian | Level 7

Thank  you MargaretC.  I just want to summarize what I think I need to do.  

There is one sasv9.cfg file in the SASFoundation/9.x directory that is the base for the system.  

There are also on SASV9.CFG file in each of the app server directories.  I need to add the WORK=/saswork to each of the .cfg (user versions) files in order for this to perpetuate regardless of what server the users access.  

 

Do I have this correct? 

gboggs
Obsidian | Level 7

After a modification of the sasv9.cfg (sasv9_usermodes.cfg) is it required to stop and start services to get the change to take effect?  

AhmedAl_Attar
Ammonite | Level 13

Hi @gboggs,

 

Within the SAS Application Context Directory, such as "<SASConfig>/LevX/SASApp", and it's sub-directories there are several sasv9.cfg & sasv9_usermodes.cfg

These files get utilized during the launch of the corresponding Server process. For Enterprise Guide (EG) look into the WorkspaceServer sub-directory

 

Ahmed 

 

AhmedAl_Attar
Ammonite | Level 13

Hi @gboggs,

 

The default SAS configuration for Linux, would have the WORK library pointing to the /tmp file-system

Yous SAS Administrator can verify this by looking into the <SASHome>/SASFoundation/9.x/sasv9.cfg file.

The best recommendation for modifying this default, is adding your site custom setting in this file

<SASHome>/SASFoundation/9.x/sasv9_local.cfg.

 

Check Order of Precedence for Processing SAS Configuration Files for more details.

 

Hope this helps,

Ahmed 

gboggs
Obsidian | Level 7
After a modification to the sasv9_local.cfg or sasv9.cfg files do i need to stop and restart servers or services?
SASKiwi
PROC Star

No. SAS sessions will automatically pick up config changes when they start.

Kurt_Bremser
Super User

@gboggs wrote:
After a modification to the sasv9_local.cfg or sasv9.cfg files do i need to stop and restart servers or services?

Servers/services need to be restarted if you make changes to the *_usermods files in your LevX configuration tree. Changes to the sasv9_local.cfg affect only SAS sessions started from SASHome directly.

Tom
Super User Tom
Super User

Note that you can also tell SAS where to put utility files in addition to WORK files.

Perhaps that location is still pointing to /tmp?

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 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 12 replies
  • 3632 views
  • 10 likes
  • 6 in conversation