1
0
Fork 0

Add instance info & port sniffing template

This commit is contained in:
Wilfried Goesgens 2016-09-02 14:18:02 +02:00
parent 1d241224bb
commit 6dd57a6c4c
1 changed files with 12 additions and 0 deletions

View File

@ -1538,6 +1538,18 @@ function startInstance (protocol, options, addArgs, testname, tmpDir) {
});
}
print(CYAN + 'up and running in ' + (time() - startTime) + ' seconds' + RESET);
var matchPort=/.*:.*:([0-9]*)/;
var ports = [];
var processInfo = [];
instanceInfo.arangods.forEach(arangod => {
var port = matchPort.exec(arangod.endpoint)[1];
ports.push('port '+ port);
processInfo.push(' [' + arangod.role + '] up with pid ' + arangod.pid + ' on port ' + port);
});
print('sniffing template:\n tcpdump -ni lo -s0 -w /tmp/out.pcap ' + ports.join(' or ') + '\n');
print(processInfo.join('\n') + '\n');
} catch (e) {
print(e, e.stack);
return false;