2 Run the supervisor on the target for the public IP:
3 ---------------------------------------------------
5 # afs-supervisor --port 1619 --token HELLO
10 # afb-client-demo -H host:1619/api?token=HELLO
13 verbs that can be run, all are of the API 'supervisor':
14 -------------------------------------------------------
18 send SIGHUP to daemons not recorded to make them connected
22 list the connected daemons
26 get the configuration of the daemon of pid X
30 get the active sessions and token of the daemon of pid X
32 - session-close {"pid":X, "uuid":UUID}
34 closes the sessions of uuid UUID for the daemon of pid X
36 - exit {"pid":X,"code":Y}
38 exit the daemon of pid X with optional code Y (default 0)
40 - debug-wait {"pid":X}
42 make the daemon of pid X wait for a signal SIGINT
44 - debug-break {"pid":X}
46 make the daemon of pid X self killing with SIGINT
48 - do {"pid":X,"api":A,"verb":V,"args":A}
50 execute the API/VERB(ARGS) for the daemon of pid X
52 useful for (s/g)etting monitor info. ex: monitor/get({"apis":true})
54 bound to the current client session (to be checked: usurpation of session?)
56 - trace {"pid":X, ...}
58 like monitor/trace but not bound to session (in the future monitor/trace
59 will be bound to sessions)
61 allows to trace specific session or any session
63 the pid isn't returned in the event (not sure to want it but open...)
65 use "name" and "tag" feature of "trace" to discriminate events on the client side.
71 ON-REPLY 1:supervisor/discover: OK
76 "uuid":"22563ce6-e07f-4284-91f8-e7eb7ec4ef21"
82 ON-REPLY 2:supervisor/list: OK
102 supervisor config {"pid":7054}
103 ON-REPLY 3:supervisor/config: OK
106 "console":".\/AFB-console.out",
108 "roothttp":"..\/test",
129 "\/opt\/jobol\/lib64\/afb"
138 "cacheTimeout":100000,
140 "cntxTimeout":32000000,
164 supervisor sessions {"pid":7054}
165 ON-REPLY 4:supervisor/sessions: OK
168 "2273ff8d-ee46-4059-959b-0f90fa90f25e":{
171 "22563ce6-e07f-4284-91f8-e7eb7ec4ef21":{
185 supervisor do {"pid":7054,"api":"monitor","verb":"get","args":{"apis":true}}
186 .....VERY LONG RESPONSE.....
191 supervisor trace { "pid": 7054, "add": { "request": "common" } }
192 ON-REPLY 6:supervisor/trace: OK
204 ON-EVENT supervisor/trace:
206 "event":"supervisor\/trace",
208 "time":"34353.598120",
217 "session":"be67cfb8-a346-47c1-ac63-65aaff3599bf"
222 ON-EVENT supervisor/trace:
224 "event":"supervisor\/trace",
226 "time":"34353.598182",
235 "session":"be67cfb8-a346-47c1-ac63-65aaff3599bf"
243 ON-EVENT supervisor/trace:
245 "event":"supervisor\/trace",
247 "time":"34353.598214",
256 "session":"be67cfb8-a346-47c1-ac63-65aaff3599bf"
259 "result":"Some String",
260 "info":"Ping Binder Daemon tag=pingSample count=1 query=\"true\""
265 ON-EVENT supervisor/trace:
267 "event":"supervisor\/trace",
269 "time":"34353.598292",
278 "session":"be67cfb8-a346-47c1-ac63-65aaff3599bf"
290 afb-client-demo -H ws://$TARGET:1619/api?token=HELLO\&uuid=HELLO supervisor list
292 afb-client-demo -H ws://$TARGET:1619/api?token=HELLO\&uuid=HELLO config '{"pid":XXXX}'