• need to get network counters for suse linux server

    From dev123@1:0/0 to All on Sat Oct 11 07:06:33 2014
    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

    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Tauno Voipio@110:110/2002 to All on Sat Oct 11 09:44:31 2014
    On 11.10.14 10:06, dev123 wrote:
    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.

    Homework?

    Google for Linux SNMP.

    --

    Tauno Voipio



    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From dev123@1:0/0 to All on Sat Oct 11 14:11:06 2014
    Thanks for your reply..but can't i use something like iftop(gives 2s,10s,40s interval data) or some other command line tools?

    On Saturday, October 11, 2014 3:14:31 PM UTC+5:30, Tauno Voipio wrote:
    On 11.10.14 10:06, dev123 wrote:

    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.



    Homework?



    Google for Linux SNMP.



    --



    Tauno Voipio


    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Tauno Voipio@110:110/2002 to All on Sat Oct 11 16:25:38 2014
    On Saturday, October 11, 2014 3:14:31 PM UTC+5:30, Tauno Voipio wrote:
    On 11.10.14 10:06, dev123 wrote:

    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.

    Homework?

    Google for Linux SNMP.

    Tauno Voipio

    (top posting corrected - TV)

    On 11.10.14 17:11, dev123 wrote:> Thanks for your reply..but can't i
    use something like iftop(gives 2s,10s,40s interval data) or some
    other command line tools?

    ----

    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?

    --

    -TV



    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From John McCue@110:110/2002 to All on Sat Oct 11 17:05:10 2014
    Reply-To: jmclnx@SPAMisBADgmail.com

    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:
    On Saturday, October 11, 2014 3:14:31 PM UTC+5:30, Tauno Voipio wrote: <snip>

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

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

    John

    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From Tauno Voipio@110:110/2002 to All on Sat Oct 11 18:21:08 2014
    On 11.10.14 20:05, John McCue wrote:
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:
    On Saturday, October 11, 2014 3:14:31 PM UTC+5:30, Tauno Voipio wrote:
    <snip>

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

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

    John


    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.

    --

    -TV


    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From dev123@1:0/0 to All on Sun Oct 12 14:39:01 2014
    Please find in reply in line

    1. You did not respond to my question.
    These measurement is required for my current project where we need to
    monitor suse enterprise server 11 sp2.


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

    I saw some commands like nstat,iftop,ethtool which is giving some of the statistics.


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


    4. You did not tell whether the program to collect the data should

    run in the server or jus polling from a workstation.

    i need run in server to get the local counters.

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

    surely network ethernet driver which is part of the linux kernal collect this data and store it probably in /sys/class/net/<$DEV)/staistics.


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

    interface statistics.

    I checked that folder but didnot find the exact counters i required as
    mentioned above.

    7. Did you look at SNMP?
    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.

    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Jorgen Grahn@1:0/0 to All on Sun Oct 12 16:33:11 2014
    On Sat, 2014-10-11, dev123 wrote:
    Hi ,

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

    dropped egress and ingress buffer peak counter with
    ....

    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 <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Tauno Voipio@110:110/2002 to All on Sun Oct 12 16:38:22 2014
    On 12.10.14 17:39, dev123 wrote:
    Please find in reply in line

    1. You did not respond to my question.
    These measurement is required for my current project where we need to monitor suse enterprise server 11 sp2.

    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.


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

    I saw some commands like nstat,iftop,ethtool which is giving some of the
    statistics.

    Did you check what information these tools provide?

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

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

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

    i need run in server to get the local counters.

    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.

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

    surely network ethernet driver which is part of the linux
    kernal collect this data and store it probably in
    /sys/class/net/<$DEV>/statistics.

    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.


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

    I checked that folder but didnot find the exact counters i required as mentioned above.

    What makes you think that the network divers on the server collect
    any other statistics then those in /sys file system tree?

    7. Did you look at SNMP?

    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.


    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.

    --

    -TV



    --- MBSE BBS v1.0.4 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)