How to get only the dropped packet information in Linux /proc

Posted on

Problem :

We can see the dropped packet information in /proc/net/dev which gives the complete details of tx, rx and dropped packet information of every interfaces.

I need to get only the dropped packet information, Do we have any /proc entry or is there a way to extract only the dropped packet information from /proc/net/dev .

Solution :

What’s wrong with

  cat /proc/net/dev | awk 'NR <= 2 { next }  {print $1" " $5" "$13}'

?

Leave a Reply

Your email address will not be published. Required fields are marked *