This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SNMP control of APC PDU
#1
Hi

I'd like to run the following SNMP command to power cycle the ports in an APC AP7920B PDU (port 8 in the example below)

snmpset -c private 192.168.1.100 1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.8 integer 3

The  SNMP set command works from the terminal but I'm having some trouble running this from my script in LogicMachine.

Here's what I have so far

Code:
require('snmp')

conn, err = snmp.open({
  version = snmp.SNMPv1,
  community = "private",
  port = 161,
  peer = "192.168.1.100",
})
assert(conn, err)

vbind, err = conn:set("1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.8 integer 3")


I'm getting the following error trying to load the SNMP library on my CBUS 5500SHAC (which runs LM) - is there a way that I can load the SNMP library?




Code:
[color=#000000][size=small][font=Consolas, monospace]module 'snmp' not found:
no field package.preload['snmp']
no file './snmp'
no file 'Library snmp'
no file 'Library snmp'
no file 'Library snmp.so'[/font][/size][/color]

Many thanks in advance.
James
Reply


Messages In This Thread
SNMP control of APC PDU - by jamesng - 17.12.2020, 14:35
RE: SNMP control of APC PDU - by Daniel - 17.12.2020, 14:42

Forum Jump: