Re: n2disk automated capture archive workflow
Alfredo Cardigliano <[email protected]>
| Newsgroups | gmane.linux.ntop.general |
|---|---|
| Message-ID | <[email protected]> |
What you need is [--max-file-duration|-t] <seconds>, however please note that this is automatically set to 10 minutes when enabling the timeline (-A) Alfredo > On 30 Mar 2018, at 23:59, Raoul Duke <[email protected]> wrote: > > > Hi Alfredo, > > > On Fri, Mar 30, 2018 at 7:20 PM, Alfredo Cardigliano <[email protected] <mailto:[email protected]>> wrote: > > >> * I read in release notes that it was possible to us " kill -USR1 to close and flush the current pcap in order to make live traffic immediately available" which works but I notice every time I call it it generates a new index file. Which then leads me to the question of: how do I know which index file to run npcapextract against? e.g. if the latest index was 1.idx and I do a kill -USR do I have to guess that my application events would be found in 1.idx / 1.pcap or is there a another way to do this? > > I recommend you to enable the timeline, and just specify the time interval in npcapextract, using the timeline as data source instead of the specific pcap/index. > > Thanks for this useful info. I will experiment with timeline. > > >> * looking at all this another way. I'd be happy to defer the npcapextract until the data is naturally flushed to disk. but this leads me to 2 questions: >> - how can I know when all the relevant data is flushed to disk so I can take action on the npcapextract? e.g. is there some concept of a hook/trigger I can call when pcap / index data is flushed to disk? > > You probably need to know what is the timestamp of the last packet dumped to disk, maybe we can write it under /proc/net/pf_ring/stats/<n2disk stats>. If this works for you we can add it to the features list. > > this seems like a good feature to have in the general case could be potentially used in my case. > > another idea I had was: is there an option to control the flush frequency? e.g. lets say I captured 100 packets but they have not yet flushed to disk and no traffic happens for (say) 10 more minutes. would there still be no flush to disk during that 10 minutes? i.e. would the flush only happen when sufficient traffic has occured to fill up the memory buffer or is there a way to say "always flush to disk every X seconds". in that way I could defer the npcapextract for X seconds after I know the application session has ended and could guarantee the packets would be flushed to disk by then. > > Thanks so much for such a quick and helpful response. > > RD > _______________________________________________ > Ntop mailing list > [email protected] > http://listgateway.unipi.it/mailman/listinfo/ntop _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEunYLiJIhvMrSEXzAm6qh6WCZ23EFAlq/W9EACgkQm6qh6WCZ 23EFgg//eEdJE0HQbOdn6LNVBU1pzGAMhHSQaS557+WZ2hsHMbWD4T2aEJtCxeO6 RdhVzpBp44ag3mWx+ffACfTKzabgJdQ+e+lWVG4Gbi0zBEazuVVGkcSdqlmyujGX /7sFn78W07LfiHUq7yd59ns7R1qxMh0ERi3AH0qUAhovBMYGXntDRLvV5hZc72mn f8ymO9L+QYm7ewTi7enQdh+MeNZ56Urc+JPtA2hWY7mncevXG6Uy//SY1QgwlNa6 EE9vm1ADGxHu5MOqCWoqe6K6OYI22xSBwfd9m09XQmWDNisdmCIZOC9KIfsZykP3 YaKx+qQC5Ak7K8dkJ7+ZqGZCHaFMBt1D5F4jgz7r3gOKMVJ2+1IbsNYe3c6lk2A3 1M89PzrRkyOTh9dOn8m+ESI+Td6M1c8Y5ZBE3giEK+KA+aflfPTwEcuuUqJyaVGJ vSKKmc3j+EtdauwiK3V1WIPHpCYArS6tNh2vnG5LqFAoufQgf4WNikaUY8jOm92t ELd4pcm/lm0XJCHTxfpzaO1sbBUKDTXfGzDyCGIh5O8fvYLen3i8cKro41cNtRWU /qVLjaJpoFDU0BsSR18IlKjMW5AYa2wqLraItYUO4bi3RjxEMvhoMX374a1nzZiX OsZvUBQS0tYa1LE2bfGxAXmeBzCpACxu9e4eIVT4Wug/iAmZnaY= =MKe5 -----END PGP SIGNATURE-----