Skip to main content

Posts

Refresh Application Server vs Refresh Spawner difference in SAS Management Console

Refresh Spawner re-initializes the spawner to pick up and apply any changes that have been made to the server or spawner configurations. As part of the refresh process, the spawner quiesces any servers that it has started. These servers shut down when their clients have completed their work. Note:  If the spawner is in a paused state when the  Refresh Spawner  action occurs, the spawner remains paused after it is re-initialized. Refresh Application Server is similar to the Refresh Spawner operation, except that the refresh affects only a single  SAS Application Server  context that you select. After you select a server context (for example, SASApp), the spawner picks up and applies any changes that have been made to server configurations in that context. As part of the refresh process, the spawner quiesces any servers in that context that it has started. These servers shut down when their clients have completed their work. Note:  If the s...

SAS batch Export and Import recommend settings

While using batch import/export tool I found to have two main issues. 1. Java.lang.OutOfMemoryError: Java heap space 2. Duplicate column issue while migrating table metadata using Import tool. Solution for Java out of memory error: 1. Go to SASHOME/SASPlatformObjectFramework/9.4 2. Modify the value of JavaArgs_1 with higher value in ExportPackage.ini and ImportPackage.ini.  Default is 512M, change it to higher value say 2048M. Solution for duplicate column issue while importing. For this modification needs to be done only on ImportPackage.ini. Add following line: -Dsas.promotion.columns.deletetargetcolumns=true

SAS code to retrieve password from SAS Management Console

Below is the code to decrypt SAS encoded password. %macro Auth(AuthenticationDomain); %global Password UserID; data _null_;    length uri UserId Password UserId AuthId AuthenticationDomain $256;    rc=metadata_getnobj("omsobj:AuthenticationDomain?@Name='&AuthenticationDomain'",1,uri);    rc=metadata_getattr(uri,"Id",AuthId);    rc=1;    tn=1; do while(rc>0);     rc=metadata_getnasn("OMSOBJ:AuthenticationDomain\"!!AuthId,"Logins",tn,uri);      if rc>0 then do;         arc=metadata_getattr(uri,"UserID",UserID);         arc=metadata_getattr(uri,"Password",Password);         call symput("UserID",compress(UserID));         call symput("Password",compress(Password));      end;      tn=tn+1; end; run; %put NOTE: For AuthenticationDomain &AuthenticationDomain., the UserID &U...

HAR file viewer

Below online website can be used to view HAR file. My favorites are: https://toolbox.googleapps.com/apps/har_analyzer/ http://www.softwareishard.com/har/viewer/ https://ericduran.github.io/chromeHAR/ https://onlinecurl.com/har-diff HAR file can be downloaded from Google Chrome developer tools. This is used to see which request has taken more time. It basically gives the waterfall chart of each request, response code and time taken. We can use this to see SAS Web Application performance.

Command to get historical jobs ran via SAS grid

SAS Grid used LSF for load sharing. LSF will store all the jobs ran in a file lsb.events. This file is stored under your cluster directory. Usually cluster directory will be under lsf work directory. Below is where LSF stored in our environment.  /app/lsf/work/bank_cluster/logdir/lsb.events You can get formatted output by running bhist command. For some reason in our environment it doesn't work. So we used the raw file and parsed with custom code. The file is space delimited and you can get the column info from IBM link . For lines starting with JOB_NEW below are the column name. JOB_NEW A new job has been submitted. The fields in order of occurrence are: Version number (%s) The version number Event time (%d) The time of the event jobId (%d) Job ID userId (%d) UNIX user ID of the submitter options (%d) Bit flags for job processing numProcessors (%d) Number of processors requested for execution submitTime (%d) Job submission...

Using PSQL in SAS web infrastructure platform data server

SAS uses postgres DB for shared services as a default choice. The installation file is located under SAS home -> SAS Web Infrastructure Platform Data Server. The psql is located under the bin directory. PSQL is the postgres client software used to connect to postgre database. In simple words it is similar to SQL developer but psql is a command line interface. psql location in SAS: Issue: When running psql we get following error message. psql: symbol lookup error: psql: undefined symbol: PQconnectdbParams Solution: This can be solved by linking a library to usr lib. Library name - libpq.so.5 Create symbolic link of this library to /usr/lib and /usr/lib64 Connecting using PSQL: You can use any user to connect to the database. However you need database username and password. In the below screenshot dbmsowner is the username and postgres is the database name. I have hidden the hostname using the hand, usually will be computer server.

JMAP command - use to take memory dump

If you have a Java application and if you need to know memory allocation and leakage you can use JMAP command. In this article I will show how to run the command. 1. Find the pid of Java process In Linux system you can identify using ps command. But the best way is to use JPS command. In terminal run below command jps This command will give output like below. In above output we see 4 Java process on which one is JPS itself. The prices listed above are SAS Java process. Using JMAP For JMAP we need the pid of Java process and the location to store the dump. In the command line run as below. jmap -dump:file=/tmp/wrapperStartStop_mem_usage.log -F 147213 Once you run above command you will get message like you see in below screenshot. The file generated will be as large as current memory configuration.