Score:0

Network traffic for last day in specific format

pl flag

I want to get network traffic stats for the last day in a specific format.

tx[some number in kbytes]rx[some number in kbytes]

I tried a lot of solutions, but each one has its own goods and bads:

timeout 1 bmon -p 'ens3' -r 2 -o format:fmt='rx$(attr:rx:bytes)tx$(attr:tx:bytes)\n'

The format is good but can not get traffic for last day

vnstat -d --oneline

Can show stats for the last day, but I can't specify the output format

slurm & tcptrack & iftop

No format, nor time

FedKad avatar
cn flag
You can try the `--json` option of `vnstat` and parse the output using the `jq` command. (Or, you can try the `--xml` option.)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.