Giter VIP home page Giter VIP logo

node-snmpjs's People

Contributors

andreas-lw avatar chipzz avatar dependabot[bot] avatar mark-k4 avatar mwshortt avatar peterfaller avatar thom-nic avatar trentm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-snmpjs's Issues

os.uptime() may return fractional seconds

https://github.com/VoltServer/node-snmpjs/blob/develop/lib/mib/mib-2/system.js#L38

Ensure timeticks will always be an integer. Apparently it is not guaranteed that os.uptime() will always be a whole number. But this is platform (maybe node runtime?) dependent.

Re: nodejs/node#41636

This has been observed on arm32v7 Linux.

No fraction:

volt@voltserv-4209 ~
$ cat /etc/os-release  
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

volt@voltserv-4209 ~
$ node --version
v14.16.1

volt@voltserv-4209 ~
$ node
Welcome to Node.js v14.16.1.
Type ".help" for more information.
> os.uptime()
533791
> 

Fraction:

volt@voltserv-1be5 ~
$ /usr/local/bin/node --version
v14.18.2

volt@voltserv-1be5 ~
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

volt@voltserv-1be5 ~
$ node
Welcome to Node.js v14.18.2.
Type ".help" for more information.
> os.uptime()
14204.11
> 

TypeError: Cannot read property 'warn' of undefined

GET /config/snmp 304 11.720 ms - -
/Users/greggbailey/etx8-web/node_modules/snmpjs/lib/client.js:50
			this._log.warn({snmpmsg: req, raw: req.raw, dst: req.dst, err: err},
			          ^

TypeError: Cannot read property 'warn' of undefined
    at /Users/greggbailey/etx8-web/node_modules/snmpjs/lib/client.js:50:14
    at doSend (dgram.js:461:7)
    at GetAddrInfoReqWrap.afterDns [as callback] (dgram.js:451:5)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:17)

remove jison

use jison to build code in development, publish the generated code so jison is no longer a prod dependency

Remove use of 'new Buffer()'

> b = new Buffer('asdfasdff', 'ascii')
<Buffer 61 73 64 66 61 73 64 66 66>
> (node:20483) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

In pretty much all cases I believe we can use Buffer.from() instead.

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.