2727import sys
2828
2929
30+ GMR_PROCESSES = (
31+ 'nova-compute' ,
32+ 'neutron-dhcp-agent' ,
33+ 'neutron-l3-agent' ,
34+ 'neutron-linuxbridge-agent' ,
35+ 'neutron-metadata-agent' ,
36+ 'neutron-openvswitch-agent' ,
37+ )
38+
39+
3040def get_options ():
3141 parser = argparse .ArgumentParser (
3242 description = 'Dump world state for debugging' )
@@ -191,17 +201,18 @@ def compute_consoles():
191201 _dump_cmd ("sudo cat %s" % fullpath )
192202
193203
194- def guru_meditation_report ():
195- _header ("nova-compute Guru Meditation Report" )
204+ def guru_meditation_reports ():
205+ for service in GMR_PROCESSES :
206+ _header ("%s Guru Meditation Report" % service )
196207
197- try :
198- subprocess .check_call ([" pgrep" , "nova-compute" ])
199- except subprocess .CalledProcessError :
200- print ("Skipping as nova-compute does not appear to be running" )
201- return
208+ try :
209+ subprocess .check_call ([' pgrep' , '-f' , service ])
210+ except subprocess .CalledProcessError :
211+ print ("Skipping as %s does not appear to be running" % service )
212+ continue
202213
203- _dump_cmd ("kill -s USR2 `pgrep nova-compute`" )
204- print ("guru meditation report in nova-compute log" )
214+ _dump_cmd ("killall -e - USR2 %s" % service )
215+ print ("guru meditation report in %s log" % service )
205216
206217
207218def main ():
@@ -218,7 +229,7 @@ def main():
218229 iptables_dump ()
219230 ebtables_dump ()
220231 compute_consoles ()
221- guru_meditation_report ()
232+ guru_meditation_reports ()
222233
223234
224235if __name__ == '__main__' :
0 commit comments