DATA Step, Macro, Functions and more

Determining session sizes on a server

Reply
Contributor
Posts: 29

Determining session sizes on a server

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.
Trusted Advisor
Posts: 2,113

Re: Determining session sizes on a server

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.
Contributor
Posts: 29

Re: Determining session sizes on a server

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.
Ask a Question
Discussion stats
  • 2 replies
  • 155 views
  • 0 likes
  • 2 in conversation