raboof / nethogs

Linux 'net top' tool
GNU General Public License v2.0
3.19k stars 289 forks source link

Add -j option for newline-delimited JSON output in tracemode #265

Closed Epic-R-R closed 7 months ago

Epic-R-R commented 1 year ago

This pull request introduces a new -j option that allows users to receive network traffic data in newline-delimited JSON format. This feature is intended for users who wish to parse the output programmatically.

Changes include:

The feature has been tested on Ubuntu 22.04, and Ubuntu 20.4 and includes error handling to ensure robustness.

Please let me know if there are any adjustments I should make. I am looking forward to your feedback!

raboof commented 10 months ago

I'm OK with the feature.

The PR also seems to contain a bunch of whitespace-only changes that do not seem to follow from https://llvm.org/docs/CodingStandards.html - could you clean those up?