(Mar-01-2018, 12:41 PM)Gribouillis Wrote: I only mean this
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 thesession.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 ?
Thanks.. its working, there was some snmp community issue.
can you please explain, this code "list(session.walk('1.3.6.1.2.1.2.2.1.' + c)) for c in '278'"
Quote:do you know if the three lists have equal length ?yes... same lennth