record network drops

Hi,
I frequently experience network drops. I tried to see it with cat /sys/class/net/lo/carrier and return a “1” always, even I disconnect LAN. I would like to record netwok drops to a file. Is that possible.
Thanks and regards
nuncio

Do you mean the physical interface drops or higher up the network stack? Packet loss?

Use the following if you want to monitor NIC status

ip monitor

or perhaps

ip monitor > /tmp/network.log

That pertains to the loopback interface so will always be up, even when your wired ethernet interface is not connected.

Thank you but I do not understand what you meant by “physical interface drops”. It is like the internet speed drops from, say, 500 kb/s to 0 kb/s suddenly and picks up after sometime. Is this something like packet loss. I am sorry I am not a network manager and are not well versed with the terminology

It’s the level concerned with hardware…
https://en.wikipedia.org/wiki/OSI_model

It is like the internet speed drops from, say, 500 kb/s to 0 kb/s suddenly and picks up after sometime. Is this something like packet loss. I am sorry I am not a network manager and are not well versed with the terminology

That’s okay. Internet speeds can vary for all sorts of reasons -congestion, overloaded servers, network protocols and QoS. It might help if you tell us more about what you’re connecting to, what services you’re using etc. Is this impacting on media streaming for example?

How are you connected (wired ethernet, wireless)? Shared with others (public/private)?

I’m sure others who can assist will have more questions in an effort to define your problem more accurately.