On 05/18/2016 07:45 AM, Paul Warren wrote:
On 18/05/2016 00:47, entr0py wrote:
Paul Warren:
On 17/05/2016 22:27, entr0py wrote:
After a period of inactivity, iftop removes each line from the main display.
Is it possible to force all lines to persist until cleared?
Do either "P" or "o" do what you want?
Thanks for the reply! Unfortunately, no. IIUC, P prevents further updates to the display and 'o' prevents the addition of additional sources / destinations - so again, static.
I would like iftop to function exactly the way it does now except I don't want any of the generated lines to disappear / fade from the main display until I manually clear the screen.
The motivation behind this request is that I would like to leave iftop running and be able to return to it several hours / days later and be able to see all of the connections and traffic that occurred while away. With the current options, I'll only be able to see this information for connections that were active the entire time.
The simple hack would be to change the following in iftop.c
if(d->last_write == history_pos) { addr_pair key = *(addr_pair*)(n->key); hash_delete(history, &key); free(d); } else { d->recv[history_pos] = 0; d->sent[history_pos] = 0; }
to
if(0) { ...
This would give you what you want, although the only way to remove hosts would be to restart iftop.
Perfect! This does what I need.
Thanks for the program and thanks for making it open-source!
Now I just need to hack around a bit to get it to sort by Total Traffic per line...