#self.sshc.load_system_host_keys()
self.Commander = CommanderBase();
self.commands = {
- 'list': [self.simpleC, 'Lists the nodes in xml file.'],
- 'boot':[self.nodeC, 'Bootstrap server. Options: all | x .'],
- 'start': [self.clientC, 'Start clients. Options: all | x | x,y .'],
- 'stop': [self.clientC, 'Stop clients. Options: all | x | x,y .'],
- 'archive': [self.nodeC, 'Archive output information of clients.'+\
- 'Options: all | x .'],
- 'getclients': [self.nodeC, 'Get running clients. Options: all | x .'],
- 'getoutput': [self.nodeC, 'Get clients output. Options: all | x .'],
- 'help': [self.simpleC, "Show This Message."],
- 'exit': [self.simpleC, "Exit Commander."]
+ 'list': [self.simpleC, 'Lists the nodes in xml file.'],
+ 'boot':[self.nodeC, 'Bootstrap server. Options: all | x .'],
+ 'start': [self.clientC, 'Start clients. Options: all | x | x,y .'],
+ 'stop': [self.clientC, 'Stop clients. Options: all | x | x,y .'],
+ 'status': [self.clientC, 'Status clients. Options: all | x | x,y .'],
+ 'archive': [self.nodeC, 'Archive output information of clients.'+\
+ 'Options: all | x .'],
+ 'getclients': [self.nodeC,'Get running clients. Options: all | x .'],
+ 'getoutput': [self.nodeC,'Get clients output. Options: all | x .'],
+ 'help': [self.simpleC, "Show This Message."],
+ 'exit': [self.simpleC, "Exit Commander."]
}
def simpleC(self, comm, argv):
def clientC(self, comm, argv):
argc = len(argv)
- callbacks = {'start':self.startSI,
- 'stop':self.stopSI}
+ callbacks = {'start': self.startSI,
+ 'stop': self.stopSI,
+ 'status': self.statusSI}
if argc == 0:
print "Invalid arguments"
return
int(node.listen_port),
config_data)
print ">>>>>>>>", ret
- if ret:
- si.pid = ret
+ if ret: si.pid = ret
def stopSI(self, node, si):
return self.Commander.stop(node.public_address,
int(node.listen_port),
si.pid)
-
+
+ def statusSI(self, node, si):
+ return self.Commander.status(node.public_address,
+ int(node.listen_port),
+ si.pid)
+
def getNodeStatus(self, node):
return self.Commander.getClients(node.public_address,
int(node.listen_port))
<?xml version="1.0" encoding="ISO-8859-1"?>
<swarm>
- <torrent_file>/home/p2p/p2p-meta/bbt316.torrent</torrent_file>
+ <torrent_file>/home/p2p/p2p-meta/himym520.torrent</torrent_file>
<instance id="1">
<node>1</node>
<client>tribler</client>
<download_limit>256</download_limit>
<download_dir>/home/p2p/p2p-dld/tribler</download_dir>
<log_dir>/home/p2p/p2p-log/tribler</log_dir>
- <log_file>tribler-bbt316.log</log_file>
+ <log_file>tribler-himym520.log</log_file>
<output_dir>/home/p2p/p2p-log/tribler</output_dir>
- <output_file>tribler-bbt316.out</output_file>
+ <output_file>tribler-himym520.out</output_file>
<actions>
<action type="start" delay="00:05:00" />
<action type="stop" delay="00:10:00" />