need to get network counters for suse linux server

Discussion in 'Linux Networking' started by dev123, Oct 11, 2014.

  1. dev123

    dev123 Guest

    Hi ,

    I need to monitor the following network counters: (suse linux server)

    dropped egress and ingress buffer peak counter with measurement period of 1 second , 5 second and 10 second

    number of packet received of 64 byte length
    number of packet send of 128-255 byte leangth

    Please suggest me at the earliest.

    Thanks
     
    dev123, Oct 11, 2014
    #1
    1. Advertisements

  2. dev123

    Tauno Voipio Guest

    Homework?

    Google for Linux SNMP.
     
    Tauno Voipio, Oct 11, 2014
    #2
    1. Advertisements

  3. dev123

    dev123 Guest

    Thanks for your reply..but can't i use something like iftop(gives 2s,10s,40s interval data) or some other command line tools?
     
    dev123, Oct 11, 2014
    #3
  4. dev123

    Tauno Voipio Guest

    (top posting corrected - TV)
    ----

    1. You did not respond to my question.

    2. What makes you think that Linux keeps all the statistics
    you asked for?

    3. You did not tell any specifics of the server, e.g. Linux version.

    4. You did not tell whether the program to collect the data should
    run in the server or jus polling from a workstation.

    5. How do you think the command line tools get their data?

    6. Look at the /sys/class pseudo-directory for collected network
    interface statistics.

    7. Did you look at SNMP?
     
    Tauno Voipio, Oct 11, 2014
    #4
  5. dev123

    John McCue Guest

    Nice, I need to spend more time looking at /sys in linux :)

    John
     
    John McCue, Oct 11, 2014
    #5
  6. dev123

    Tauno Voipio Guest


    Do not get tangled with the symlinks. /sys is a peek into the
    internal data structures of the kernel I/O subsystem, and the
    symlinks follow the data linkages. Another thing is to accept
    that a file with a reported size of zero can be read, as the
    contents are generated on the fly from the kernel internals.
     
    Tauno Voipio, Oct 11, 2014
    #6
  7. dev123

    dev123 Guest

    Please find in reply in line
    I saw some commands like nstat,iftop,ethtool which is giving some of the statistics.
    surely network ethernet driver which is part of the linux kernal collect this data and store it probably in /sys/class/net/<$DEV)/staistics.
    at the moment snmp is not configured to collect local counters in server.probably supporting IF-MIB could give some of the information.but also found that the below ethtool source code which is having most of the counters i require
    https://stuff.mit.edu/afs/sipb/contrib/linux/drivers/net/ethernet/freescale/ucc_geth_ethtool.c

    Don't know whether ethertool in my server could be configured to get these data or not. Please help.
     
    dev123, Oct 12, 2014
    #7
  8. dev123

    Jorgen Grahn Guest

    ....

    That, to me, sounds like the terminology of some router vendor. There
    are no guarantees that a Linux server uses the same words or keeps
    counters with those exact semantics. Or that they are even applicable
    to something that isn't a router.

    /Jorgen
     
    Jorgen Grahn, Oct 12, 2014
    #8
  9. dev123

    Tauno Voipio Guest

    Is this a study project? The response will affect how we should
    approach your problem. Be assured that most of us here are old
    enough to not give a cookbook answer to things you should learn
    yourself.
    Did you check what information these tools provide?

    For this use: which kernel and which network card driver?

    You are going ahead of the problem here. There are tools (SNMP) which
    make it possible to collect the statistics from outside of the server.
    Not actually - the whole /sys directory is a direct peephole
    into the kernel I/O system internals. The data is not stored
    into some file outside of the kernel.

    What makes you think that the network divers on the server collect
    any other statistics then those in /sys file system tree?
    You need to know the interface drivers. The definitive information is
    in the network card driver sources. You can find the driver sources
    as soon as you know the kernel version and interface driver module.
     
    Tauno Voipio, Oct 12, 2014
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.