How can i print the output of
vnstat -l to a file?
what i've tried:
vnstat -l &> file
but it just hangsup
To just save the standard output do
If what you want is the current upload and download rate,
To extract the current* download and upload rate for the interface
* What does "current" mean?
I don't know if you want to print just final summary to file from some period you are going to monitor network activity, but you can cheat it this way:
The only issue is that vnstat will write output to file every second so it is not the most convenient way. For continuous monitoring with log for every second or so terdon answered your question.