Hey All,

I have written a quick and dirty upstart service based on dumpcap to
implement some kind of network time machine.

The general idea is that we sometimes face cases where dumping the last
network packet using gdb as described here [1] is not a valid option.
The machine may either be running live or the last packet does not
provide enough information to understand the user context. It also
happens that Outlook crashes but given that wireshark was not started,
we have no way to investigate this further and report anything
meaningful to dochelp.

The following script (run as a service), let the developer save the last
100 seconds of network trafic and dump it into a file whenever needed.
Once the service is started, the developer can just forget about it and
just stop it when he/she is interested in collecting the data. This is
achieved through the combination of the time based rotation feature of
dumpcap and trivial bash commands. The service is available at the
following address:

https://gist.github.com/jkerihuel/b43e5e69a734c7fb5ed1

- ntm.conf has to be installed in /etc/init/
- ntm to be customized and installed in /etc/default/

To run the service:
    sudo service ntm start

To stop the service:
    sudo service ntm stop

The default capture path will be /tmp/ntm.pcap

Ideally, we may want to add a stop on event when openchange dies to get
a trace automatically. A status may also be useful ... If anyone is
interested to contribute :-)

Cheers,
Julien.

[1]
http://www.openchange.org/documentation/recipes/crash_digger_last_packet.html

-- 
Julien Kerihuel
j.kerih...@openchange.org
OpenChange Project Founder

Twitter: http://twitter.com/jkerihuel

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
devel@lists.openchange.org
http://mailman.openchange.org/listinfo/devel

Reply via email to