1
2
3
4
5
6
7
8
9 """
10 Agent diagnostic
11 """
12
13 from zephir.monitor.agentmanager.agent import Agent
14 from twisted.internet.utils import getProcessOutput
15 from zephir.monitor.agentmanager import status
16 from os.path import isfile
17
18 PROG = '/usr/share/creole/diag.py'
19
21 """
22 Diagnostic
23 """
25 """ lancement du diagnostic """
26 if isfile(PROG):
27 res = getProcessOutput(PROG, env = {'LC_ALL': 'C'})
28 res.addCallback(self.measure_process)
29 return res
30 else:
31 return {}
32
34 """ retour du programme """
35 return {}
36
38 """ envoi du statut (toujours OK) """
39 return status.OK()
40