2

I want to log my download speeds using nethogs. I've tried the following:

nethogs -t wlo1 | awk '/firefox/{ print $3}'> speedTest.txt

However, the output file turns out to be empty. I've already assured that I can save to a file using this link. And I've looked at the code in this answer, but it does not exactly do what I want.

I do get DL speed output in my terminal when I try:

nethogs -t wlo1 | awk '/firefox/{ print $3}'

-- EDIT -- With the suggestion below

(nethogs -t wlo1 | awk '/firefox/{ print $3}) &> speedTest.txt

I get the output in the file speedTest.txt:

"Waiting for first packet to arrive (see sourceforge.net bug 1019381)"

which is the standard output from nethogs everytime I run it. The rest of the file is empty.

When I just run nethogs -t wlo1 | awk '/firefox/{ print $3}', I get something like

"Waiting for first packet to arrive (see sourceforge.net bug 1019381)"

102.8

248.7

318.2

etc, etc.

Community
  • 1
  • 1
MichaelDeSanta
  • 143
  • 1
  • 7

1 Answers1

0

This worked, base on webb's answers:

nethogs -t wlo1 2>&1 | awk '/firefox/{print $3}'> speedTest.txt
MichaelDeSanta
  • 143
  • 1
  • 7