in reply to Update RRD

I've managed to find the problem . For some reason the database was not seeing the data as 'int' . I've made explicit conversion to 'int' and its working now . I'm still open if someone have advices for a better code :).

Replies are listed 'Best First'.
Re^2: Update RRD
by haukex (Archbishop) on Nov 25, 2018 at 14:37 UTC
    its working now

    Sorry, but I have to doubt that $in = system("snmpget ...") is really "working". system returns the command's exit code as it would be returned by wait(2). The snmpcmd manpage doesn't make any mention of exit codes, but the convention is that commands exit with 0 (zero) on success - so with the code shown in the question, $in and $out will probably be 0 most of the time, and some other number on failures.

      You are right ! I`ve used backticks , forgot to mention it in my comment .