Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I dont really know what cwnd is but here is a wild guess.
Doesnt cat /proc/net/tcpprobe > test.log & exit emediately after execution? Within a second or so? While tcpprobe is still empty?
Shouldnt you loop that command or use something else?
Or maybe use >> instead of > to append instead of replace so the usefull content is not overwritten with "nothing"?
Maybe you could use the tail command instead of cat?
I dont really know what cwnd is but here is a wild guess.
Doesnt cat /proc/net/tcpprobe > test.log & exit emediately after execution? Within a second or so? While tcpprobe is still empty?
No, cat will be still running in background. I did a test and after the test I kill the process. The test duration is different from 1s to 30-60s.
The problem is, I don't know why it is empty, that's my problem.
Quote:
Originally Posted by noden
Shouldnt you loop that command or use something else?
Or maybe use >> instead of > to append instead of replace so the usefull content is not overwritten with "nothing"?
Maybe you could use the tail command instead of cat?
I dont know. I hope it is somewhat usefull.
The tail command doesn't work. My command is correct! append ">>" changes nothing.
The cat command you used will not continually write new changes to a file, as noden pointed out.
The tailf command, or tail -f is probably the easiest way to do what you want.
Code:
(tail)> touch logfile.log
(tail)> tail -f logfile.log >> changes.txt &
(tail)> cat changes.txt
(tail)> echo new line >> logfile.log
(tail)> cat changes.txt
new line
(tail)> cat logfile.log
new line
The cat command you used will not continually write new changes to a file, as noden pointed out.
The tailf command, or tail -f is probably the easiest way to do what you want.
I know, what you say. But if it is not continually I have at least one line in the file or not?
But my file is empty.
I tried the tail -f /proc/net/tcpprobe but I never see only one line, if I make TCP connections.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.