One of my Java process (A) is running on box A . Another process (B) is running from box B.
Process A executes multiple steps one by one , including loading byteman agent dynamically to Process B. Second step in Process A is submitting rules dynamically to Process B
below are the steps which will be followed from Process A(from java class which I have yet to write using ProcessBuilder , currently I am just doing POC)
(1) SET BYTEMAN_HOME
(2) SET BYTEMAN_HOME_OPTS ( I know I can pass helper as a psrt of bmsubmit too but I have tried this way)
(3) Installing agent dynamically
bminstall.bat -b -s 15656 (where 15656 is the Java PID of the Process B)
(4) Now when I am trying to load rules dynamically using bmsubmit, I am getting syntax error, but I opened the batch file and checked the usage too.
bmsubmit.bat -l -c script:C:\Users\N662245\threadInteraction.btm
usage : Submit [-o outfile] [-p port] [-h hostname] [-l|-u] [scriptfile . . .]
Submit [-o outfile] [-p port] [-h hostname] [-b|-s] jarfile . . .
Submit [-o outfile] [-p port] [-h hostname] [-c]
Submit [-o outfile] [-p port] [-h hostname] [-y] [prop1[=[value1]]. . .]
Submit [-o outfile] [-p port] [-h hostname] [-v]
-o redirects output from System.out to outfile
-p specifies listener port
-h specifies listener host
-l (default) with scriptfile(s) means load/reload all rules in scriptfil
with no scriptfile means list all currently loaded rules
-u with scriptfile(s) means unload all rules in scriptfile(s)
with no scriptfile means unload all currently loaded rules
-b with jarfile(s) means add jars to bootstrap classpath
-s with jarfile(s) means add jars to system classpath
-c prints the jars that have been added to the system and boot classload
-y with no args list all byteman config system properties
with args modifies specified byteman config system properties
prop=value sets system property 'prop' to value
prop= sets system property 'prop' to an empty string
prop unsets system property 'prop'
-v prints the version of the byteman agent and this client
bmsubmit.bat Submit -l -c script:C:\Users\N662245\threadInteraction.btm
Failed to process request: java.lang.Exception: Invalid rule file: Submit
-- Args were: [Submit, -l, -c, script:C:\Users\N662245\threadInteraction.btm]
java.lang.Exception: Invalid rule file: Submit
Whats the missing bit ???