Code Monkey home page Code Monkey logo

Comments (4)

codedance avatar codedance commented on May 21, 2024

Distributions of OctetString size (bytes) across 20k+ values all from many different real-world devices (mostly printers and routers)

image

Mean: 10 bytes
Max: 256 bytes

from gosnmp.

codedance avatar codedance commented on May 21, 2024

I've done some more real world testing and experimenting. I'll put together a pull request to make a minor buffer size change building on @benjamin-thomas wonderful addition. In short, when we're walking (GetBulk) the pdu count is only 1, but the returned number of PDUs will be many more (MaxRepetitions). This leads to many retries. It's an easy fix.

Also while playing I found a Windows specific bug. A read on a buffer that's too small results in an error rather than a partial buffer read. I'll fix this in the same pull request.

from gosnmp.

codedance avatar codedance commented on May 21, 2024

OK. I've just filed a pull-request for @soniah to do a quick review (#46).

Summary of findings:

  • A 1k initial buffer is fine for all real-world GET requests. The max size OctetString I found on a real-world device was 256 bytes.
  • GETBULK needed some special handling.
  • Interestingly SNMP4J and net-snmp have fixed buffer sizes like the old code.

from gosnmp.

codedance avatar codedance commented on May 21, 2024

Closed a while back in #46

from gosnmp.

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.