BookmarkSubscribeRSS Feed
FatCaptain
Fluorite | Level 6
Hi,

We're having space issues on our server. As such, i'm trying to find out the size and owners of the sessions in the work directory on the server.

The code I have at the moment is;


RSUBMIT ;

filename workserv 'E:/saswork' ;

data dirdata ;
did = dopen('workserv');
numberOfFiles=dnum(did);
do i=1 to numberOfFiles;
filename=dread(did,i);
output;
end;
run;

ENDRSUBMIT ;


This will create a data set with the names of the sessions. How would I add the owner of the sessions and the size?

If I am going about this in the wrong way, please feel free to offer an alternative solution.

As always, any help is greatly appreciated!

Cheers,

Fat Captain.
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
Why not use OS commands to do the work?

The DIR command in Windows has the options you need to get a report. See
http://www.computerhope.com/dirhlp.htm#04
You could use the ls command in *nix to get similar information.

If you run it periodically as a scheduled task (cron), you could pipe the output to a file and then analyze the trends with SAS.
FatCaptain
Fluorite | Level 6
Thanks for the reply Doc@Duke.

Unfortunately, I am unable to issue OS commands as these have been disabled for security reasons.

My only real access to the server is through Base SAS.

Cheers,

Fat Captain.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 750 views
  • 0 likes
  • 2 in conversation