Mar-01-2018, 12:41 PM
(This post was last modified: Mar-01-2018, 12:41 PM by Gribouillis.)
I only mean this
About the list index error, do you know if the three lists have equal length ?
from easysnmp import Session import time start = time.time() host = '10.10.10.1' session = Session(hostname=host, community='xxxxxx', version=2) intnames, intOpes, intAdms = (list(session.walk('1.3.6.1.2.1.2.2.1.' + c)) for c in '278') for i in range(len(intnames)): print '{} {} {} {}'.format(host,intnames[i].value,intOpes[i].value,intAdm[i].value) print('It took', time.time()-start, 'seconds.')Your error has to do with the
session.walk()
call. Are you sure the remote host is reachable?About the list index error, do you know if the three lists have equal length ?