Not familiar with nettop in Terminal, but if nettop works well, couldn't a script (or even a macro utility) call it up very regularly, leave it open for a time period of your choosing, and then quit it. Loop this and… ?
There's no way to limit its run. With top, you can do "top -l1" and it will give you a one-pass output. nettop on the other hand will just continue to refresh until you quit. To that end, I just started it, dumping output to a file, spawned in a thread, and killed the thread a few seconds later.Unfortunately
, the file contains only ANSI-vommit. It makes extensive use of ansi escape sequences to run around the screen drawing and updating things, using a mix of common, uncommon, and archaic codes, many of which I wasn't even able to find descriptions for. (this isn't color changes, this is mainly moving the cursor around and clearing regions of the screen) It quickly became clear that (A) it would be necessary to parse the ansi stream to produce a screen capture, and (B) this is almost impossible to do without extensive and complete ansi documentation and a lot of time to write a parser. Not really practical. I was unable to find a tool to convert an ansi capture into a flat screenshot either. (that would have been too easy!
Whoever wrote nettop went way WAY overboard with the cursor movement. There are examples of 10 character ansi sequences to move the cursor right three spaces. TOP at least does the initial screen draw flat out. It uses ansi in a very limited manner to keep the screen refreshed when you don't provide the -l option, mainly to move the cursor back to the top of the screen to just overwrite the lines below, instead of hopping around the screen like a mad gopher, popping up to change numbers here and there. From a refresh perspective, nettop's method makes sense when bandwidth is seriously limited. Otherwise, no, you should not be doing that.
I did however find dozens of threads of people trying to find a way to get nettop to output a single pass, none finding success.