Skip to content

Instantly share code, notes, and snippets.

View frayos's full-sized avatar

Younes frayos

View GitHub Profile
@frayos
frayos / linux-cmd.sh
Last active November 22, 2017 10:40
Linux commands
#!/bin/sh
lsof -i -P | grep LISTEN
ps auxwwww | grep <PID>
ps --no-headers -p <PID> -o pid,rss,cmd
@frayos
frayos / SASGetTCPIPConnection.sas
Created November 22, 2017 08:59
Get TCP IP Connection informations from SAS Metadata
/************************************************************
Author Adam Bullock
13Dec2013
************************************************************/
options
metaserver="localhost"
metaport=8561
metauser="sasadm@saspw"
metapass="xxxxxxx";
@frayos
frayos / GetSoftwareComponentsandServerComponents.sas
Created November 22, 2017 10:02
SAS Metadata Properties Analysis to XML
/******************************************************************************************************************/
/* SOURCE : ftp://ftp.sas.com/techsup/download/web/60811GetSoftwareComponentsandServerComponents.sas */
/* Set the metadata options to match your environment. */
/* Save this program to the your home directory (cd ~ or cd !HOME). Name it GetSoftwareandServerComponents.sas */
/* On Unix systems run the code using a command like the following: */
/* <SASHome>/SASFoundation/9.4/sas ~/GetSoftwareandServerComponents.sas -log ~/GetSoftwareandServerComponents.log */
/* Replace <SASHome> with the actual location SAS is installed on your system. */
/* Retrieve and send the *TWO* XML files created named: GetSoftwareComponents.xml and GetServerComponents.xml */
/* By default they are placed in your home directory (~ or !HOME).
@frayos
frayos / ioTEST.sas
Created November 22, 2017 10:06
IO Testing with SAS
%macro doit(command);
filename p pipe &command lrecl=32767;
data _null_;
infile p;
input;
put _infile_;
run;
%mend;
%macro testIO(REPERTOIRE);
@frayos
frayos / sslpoke.sh
Last active February 16, 2018 14:08
SSLPoke SAS EV
<SASHome>/SASPrivateJavaRuntimeEnvironment/9.4/jre/bin/java -Djavax.net.debug=SSL -Djavax.net.ssl.keyStore=<SASHome>/SASSecurityCertificateFramework/1.1/cacerts/cacerts.jks -Djavax.net.ssl.trustStore=<SASHome>/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.jks -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStorePassword=changeit SSLPoke mp2vlsa283.eskom.co.za 7443
C:\SASHome\SASPrivateJavaRuntimeEnvironment\9.4\jre\bin\java.exe -Djavax.net.debug=SSL -Djavax.net.ssl.keyStore=C:\SASHome\SASSecurityCertificateFramework\1.1\cacerts\cacerts.jks -Djavax.net.ssl.trustStore=D:\SASHome\SASSecurityCertificateFramework\1.1\cacerts\trustedcerts.jks -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStorePassword=changeit SSLPoke WEBHOST 7980
@frayos
frayos / perf.bat
Created November 24, 2017 14:20
Windows WMIC PERF
wmic path Win32_PerfFormattedData_PerfProc_Process get Name,IODataBytesPerSec,IOReadBytesPerSec,IOWriteBytesPerSec,PrivateBytes,PercentProcessorTime
@frayos
frayos / KRBauth.sas
Last active February 13, 2018 14:05
KRBauth.sas check
%put Site: &syssite Release: &sysvlong System: &sysscp &sysscpl;
%macro show(command);
filename p pipe &command lrecl=32767;
data _null_;
infile p;
input;
put _infile_;
run;
%mend;
@frayos
frayos / IANAAppCodePage.txt
Last active February 13, 2018 14:05
IANAAppCodePage.txt
From : http://media.datadirect.com/download/docs/slnk/admin/appcodepage.html
Table G-1. IANAAppCodePage Values
Value (MIBenum) Description
3 US_ASCII
4 ISO_8859_1
5 ISO_8859_2
6 ISO_8859_3
8 ISO_8859_5
9 ISO_8859_6
@frayos
frayos / EMIfull.sh
Last active February 13, 2018 14:04
SAS EMI Full SH
#!/bin/sh
# Based on https://support.sas.com/rnd/emi/SASEnvMgr/EVSAF/SAS_Environment_Manager_Service_Architecture_Quickstart_9.4M4.pdf
./validate.sh --level 2
./emi_init.sh -i
#OR
#./emi_init.sh -i -f -resetDB
<levelroot>/ObjectSpawner/ObjectSpawner.sh restart
./validate.sh --level 3
./emi_init.sh --enable ACM
@frayos
frayos / DatabaseTableName.sql
Created January 4, 2018 08:13
Database Table Name.sql
SELECT
pg_database.datname,
pg_size_pretty(pg_database_size(pg_database.datname)) AS size
FROM pg_database;
-----
SELECT
schema_name,
relname,
pg_size_pretty(table_size) AS size,