1. #!/usr/bin/env aspl 2. #ENVARG= -groupingclass SYSENVGROUP -wsname TRANSIENT -singlepass 3. 4. ;;*********************************************************************** 5. ;; 6. ;; reapenvpidcompare.aspl 7. ;; Reap two programs processes and gather their environment variables 8. ;; then compare these variables as grouped per process number, and show 9. ;; how they differ. 10. ;; Copyright © 2024 Bassem W. Jamaleddine 11. ;; 12. ;;*********************************************************************** 13. 14. endScriptIfShellArgsLessThan 2 ;; make sure at least two arguments passed 15. 16. ks varname varvalue chksum ppdd ffl 17. displayoff 18. printblock *** REAPING ENV OF $1 *** 19. e1 = ggreapenvbypid(program,$1,onlychanged,1) 20. printblock *** REAPING ENV OF $2 *** 21. e2 = ggreapenvbypid(program,$2,onlychanged,1) 22. displayon 23. 24. printblock *** COMPARING REAPED PROCESSES ENVIRONMENT VARIABLES *** 25. ,f& e1 e2 26. printblock *** IN 1st NOT IN 2nd ENVIRONMENT VARIABLES *** 27. ,f\ e1 e2 28. printblock *** IN 2nd NOT IN 1st ENVIRONMENT VARIABLES *** 29. ,f\ e2 e1 30. 31. printblock *** MATCHING REAPED ENVIRONMENT VARIABLES *** 32. ,f&`ks= e1 e2 33. printblock *** DIFFERED REAPED ENVIRONMENT VARIABLES *** 34. ,f&`ks~ e1 e2 35. printblock *** SIMILARITY COMPARISON *** 36. sim e1 e2 37. dm 3 38. v 39. 40. endscript 41. 42. __END__ 43. 44. $00 command harvest the environment variables of two programs 45. 46. $00 must be followed the fully specified pathes of two programs 47. 48. Examples: 49. 50. $00 "/opt/IBM/WebSphere/AppServer/bin/startServer.sh server1" /opt/IBM/WebSphere/AppServer/bin/startNode.sh 51. $00 /opt/IBM/WebSphere/AppServer/bin/startNode.sh /opt/IBM/WebSphere/AppServer/bin/stopNode.sh 52.