19-Recovery_Sniffer

This sample demonstrates use of db_sniffer() to detect dead connections.

How to Run

Start sniffer without command line arguments to use the default value of n_iterations=10000. Then start a second instance of sniffer with the command line argument '10'

(n_iterations=10). The second process will cause a segmentation fault on the 10th iteration. The sniffer loop in the first process will detect and report the 'dead' connection in the second process.

See instructions here on how to build this and other samples on your development platform. Once built, the sample can be run from the \target\bin directory:

 
    19_recovery_sniffer
     

But it is more instructive to run it in your development environment debugger, stepping through the code.

Related Topics Link IconRelated Topics