| Ian Wienand | 2bbc9bb | 2019-02-11 12:25:38 +1100 | [diff] [blame] | 1 | ===================== | 
|  | 2 | System-wide debugging | 
|  | 3 | ===================== | 
|  | 4 |  | 
|  | 5 | A lot can go wrong during a devstack run, and there are a few inbuilt | 
|  | 6 | tools to help you. | 
|  | 7 |  | 
|  | 8 | dstat | 
|  | 9 | ----- | 
|  | 10 |  | 
|  | 11 | Enable the ``dstat`` service to produce performance logs during the | 
|  | 12 | devstack run.  These will be logged to the journal and also as a CSV | 
|  | 13 | file. | 
|  | 14 |  | 
|  | 15 | memory_tracker | 
|  | 16 | -------------- | 
|  | 17 |  | 
|  | 18 | The ``memory_tracker`` service periodically monitors RAM usage and | 
|  | 19 | provides consumption output when available memory is seen to be | 
|  | 20 | falling (i.e. processes are consuming memory).  It also provides | 
|  | 21 | output showing locked (unswappable) memory. | 
|  | 22 |  | 
|  | 23 | tcpdump | 
|  | 24 | ------- | 
|  | 25 |  | 
|  | 26 | Enable the ``tcpdump`` service to run a background tcpdump.  You must | 
|  | 27 | set the ``TCPDUMP_ARGS`` variable to something suitable (there is no | 
|  | 28 | default).  For example, to trace iSCSI communication during a job in | 
|  | 29 | the OpenStack gate and copy the result into the log output, you might | 
|  | 30 | use: | 
|  | 31 |  | 
|  | 32 | .. code-block:: yaml | 
|  | 33 |  | 
|  | 34 | job: | 
|  | 35 | name: devstack-job | 
|  | 36 | parent: devstack | 
|  | 37 | vars: | 
|  | 38 | devstack_services: | 
|  | 39 | tcpdump: true | 
|  | 40 | devstack_localrc: | 
|  | 41 | TCPDUMP_ARGS: "-i any tcp port 3260" | 
|  | 42 | zuul_copy_output: | 
|  | 43 | '{{ devstack_log_dir }}/tcpdump.pcap': logs | 
|  | 44 |  | 
|  | 45 |  | 
|  | 46 |  |