( ** Go back to PARENTPAGE ../Script-reapenvpidcompare-aspl.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)

How to reap and compare the environment variables of two programs starting many threads

An ASPL script to reap the environment variables by threads or PIDs. The script reapenvpidcompare.aspl is followed by two programs. In this example we call reapenvpidcompare.aspl to reap the WebSphere scripts wsadmin.sh and startNode.sh (both starting many Java threads).

ASPL 1> ks varname varvalue chksum ppdd ffl
set ks vector to varname varvalue chksum ppdd ffl

ASPL 2> displayoff
turn off display

ASPL 3> printblock *** REAPING ENV OF /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/wsadmin.sh -conntype NONE -lang jython -username bassem -password bassem ***

ASPL 4> e1 = ggreapenvbypid(program,/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/wsadmin.sh -conntype NONE -lang jython -username bassem -password bassem,onlychanged,1)
e1 is assigned the reaped enviornment by PID of these threads started by wsadmin.sh

ASPL 5> printblock *** REAPING ENV OF /opt/IBM/WebSphere/AppServer/bin/startNode.sh ***

ASPL 6> e2 = ggreapenvbypid(program,/opt/IBM/WebSphere/AppServer/bin/startNode.sh,onlychanged,1)
e2 is assigned the reaped enviornment by PID of these threads started by startNode.sh

ASPL 7> displayon
turn on display

ASPL 8> printblock *** COMPARING REAPED PROCESSES ENVIRONMENT VARIABLES ***

ASPL 9> ,f& e1 e2
show the intersection of e1 and e2, that is the intersection of the threads

ASPL 10> printblock *** IN 1st NOT IN 2nd ENVIRONMENT VARIABLES ***

ASPL 11> ,f\ e1 e2
show the difference of the environment between e1 and e2

ASPL 12> printblock *** IN 2nd NOT IN 1st ENVIRONMENT VARIABLES ***

ASPL 13> ,f\ e2 e1
show the difference of the environment between e2 and e1

ASPL 14> printblock *** MATCHING REAPED ENVIRONMENT VARIABLES ***

ASPL 15> ,f&`ks= e1 e2
show the matching environment of the threads

ASPL 16> printblock *** DIFFERED REAPED ENVIRONMENT VARIABLES ***

ASPL 17> ,f&`ks~ e1 e2
show the difference in the thread environments

ASPL 18> printblock *** SIMILARITY COMPARISON ***

ASPL 19> sim e1 e2
show the similarity in the environment between all threads

ASPL 20> dm 3
display mode set to 3

ASPL 21> v
print symbol table