客户端
from xmlrpc.client import ServerProxy if __name__ == '__main__': server = ServerProxy("http://localhost:9001/RPC2") # 初始化服务器 print(server.system.listMethods()) # 打印所有方法接口 print(server.supervisor.getAllProcessInfo()) # 调用 print(server.system.methodHelp('supervisor.getAllProcessInfo')) # 方法帮助
接口列表信息
[ "supervisor.addProcessGroup", "supervisor.clearAllProcessLogs", "supervisor.clearLog", "supervisor.clearProcessLog", "supervisor.clearProcessLogs", "supervisor.getAPIVersion", "supervisor.getAllConfigInfo", "supervisor.getAllProcessInfo", "supervisor.getIdentification", "supervisor.getPID", "supervisor.getProcessInfo", "supervisor.getState", "supervisor.getSupervisorVersion", "supervisor.getVersion", "supervisor.readLog", "supervisor.readMainLog", "supervisor.readProcessLog", "supervisor.readProcessStderrLog", "supervisor.readProcessStdoutLog", "supervisor.reloadConfig", "supervisor.removeProcessGroup", "supervisor.restart", "supervisor.sendProcessStdin", "supervisor.sendRemoteCommEvent", "supervisor.shutdown", "supervisor.signalAllProcesses", "supervisor.signalProcess", "supervisor.signalProcessGroup", "supervisor.startAllProcesses", "supervisor.startProcess", "supervisor.startProcessGroup", "supervisor.stopAllProcesses", "supervisor.stopProcess", "supervisor.stopProcessGroup", "supervisor.tailProcessLog", "supervisor.tailProcessStderrLog", "supervisor.tailProcessStdoutLog", "system.listMethods", "system.methodHelp", "system.methodSignature", "system.multicall" ]