Coder Social home page Coder Social logo

/proc/net/sockstat about netdata HOT 6 CLOSED

netdata avatar netdata commented on May 17, 2024 1
/proc/net/sockstat

from netdata.

Comments (6)

ktsaou avatar ktsaou commented on May 17, 2024 2

screenshot from 2017-11-07 01-44-05

from netdata.

andyshinn avatar andyshinn commented on May 17, 2024

When this is implemented, I would love if it supported the mem and orphan numbers from /proc/net/sockstat. This would be very helpful in tracking TCP: out of memory -- consider tuning tcp_mem errors for tuning /proc/sys/net/ipv4/tcp_mem.

from netdata.

ktsaou avatar ktsaou commented on May 17, 2024

These files are pretty simple to parse. I am not sure I know how to use this information though.

Can you find any reliable sources for each of the numbers in these files?

# cat /proc/net/sockstat
sockets: used 2152
TCP: inuse 66 orphan 0 tw 9 alloc 77 mem 6
UDP: inuse 17 mem 17
UDPLITE: inuse 0
RAW: inuse 0
FRAG: inuse 0 memory 0

This post says mem in TCP and UDP are in pages, while memory in FRAG is in bytes.

This post discusses about orphan, but I am not sure I understand. This one says that orphan sockets, are connections that are not attached to any user file handle.

This post describes out of memory errors and orphans, much better.

This is indeed very useful info!

from netdata.

andyshinn avatar andyshinn commented on May 17, 2024

I agree, it is a little hazy. I was using http://blog.tsunanet.net/2011/03/out-of-socket-memory.html as a reference which is helpful.

The TCP mem is in pages and directly correlates to /proc/sys/net/ipv4/tcp_mem (which is also in pages). I'll see if i can dig up information on FRAG, orphan, tw, and alloc as well.

from netdata.

ktsaou avatar ktsaou commented on May 17, 2024

here is the /proc/net/sockstat plugin.
Next is /proc/net/sockstat6.
I'll also try to implement the alarm.

from netdata.

marcelmfs avatar marcelmfs commented on May 17, 2024

By the way my netdata aggregator server is showing the TCP: out of memory -- consider tuning tcp_mem in dmesg. RAM usage and the number of used sockets (not a huge sudden increase) during these error messages seem normal, maybe there's something else leaking TCP memory?

from netdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.