Skip to main content

Posts

Showing posts from December, 2016

How to free up Work Space in SAS

You should have root user or sudo access to root to run this command: [/sas/SASFoundation/9.2/utilities/bin] ./cleanwork  /work The above one only clears space of dead processes So 1.  du -sh /work/SAS*| grep G | sort -nr |head -10  Sample Result : 109G   /work/SAS_work610D000036F9_host           35G   /work/SAS_work2A1700001920_host       2. ls -ldrt /work/SAS_work610D000036F9_host from above command we get the owner of directory then         3. ps -ef | grep owner Next kill the process of owner other than batch process         4. kill -9 pid then run the ./cleanwork utility

Starting and stopping LSF in SAS

1) Login as root on all your host machine (Note: if your environment has configured to use lsf account id then use that) 2) Ensure LSF state is clean.  # /etc/rc3.d/S99lsf stop Stopping the LSF subsystem # sleep 20 # /etc/rc3.d/S99lsf status Show status of the LSF subsystem lim is stopped... res is stopped... sbatchd is stopped... 3) Start LSF on each node .  Check status after 70 seconds before moving to next node. # /etc/rc3.d/S99lsf start # sleep 70 # /etc/rc3.d/S99lsf status 4) Check if bhosts shows atleast 2 nodes 'ok'  and ProcessManager in EGO using commands Login using your id on the host that has process manager and run following commands to verify whether the lsf is up: . /lsf/conf/profile.lsf lsid bhosts egosh service list

Bjobs lsf command to check SAS job status

Bjobs is utility that come with Platform Process Manager suite. We have two utilities one to schedule the job that is called process manager and another to do load sharing. The output from both the utilities are very similar. As they have been developed by IBM both products behave same even though the underlying components are different. If you are asked to check all status of the job you can use following command: [sas94@hostaj ~]$ bjobs -u all -a JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME 4602    venkat RUN   normal     hostah             hostaj                5F3E85BB0        Feb 12 15:49 4620    arun DONE  normal     hostaj                  hostaj                ily_Files                Feb 12 21:00 In above command, -u stands for user -a stands for all jobs. You can directly provide the job name instead of -a flag. Similarly you can provide user name after -u flag. If above command didn't give you the output then first you have r

TNS Entry Environment Variable for SAS

After you install Oracle driver in your SAS environment make sure you define following environment variables: tnsnames.ora file: This file will be placed in the Oracle installation location under network -> admin. This is where you need to define the connection string.  /oracle/product/11.2.0/client_1/network/admin Oracle.env file: Inside the file you need to define all your environment variables. Without this your connection is likely to fail. Oracle.env file will be in following location. oracle/product/11.2.0/client_1/oracle.env Environment variables: All environment variables should be mentioned inside the oracle.env file. Below are the environment variable you need to define: ORACLE_BASE=/oracle ORACLE_HOME=$ORACLE_BASE/product/11.2.0/client_1 TNS_ADMIN=$ORACLE_HOME/network/admin PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib    To test an Oracle connectivity from SAS, you can use below libname statement: LIBNAME test ORA

Password change of database server in SAS

In SAS Management console: Every library (Folder where SAS datasets stores) if it 3rd party database, we need to update tnsnames.ora/odbc.ini. Every library is connected to Database Server if goto properties of library you can get the server name, properties of server, access login name. We have to change the password in access login group of particular library. Before that we need to get libname statement (you can get by unchecking the Preassigned status in properties of library). After changing the password check the libname statement once again to confirm.After that check the preassigned status. To check weather you have access to particular table need write simple SAS program. Proc sql;  select count(*) from libref.(tablename); quit;