etingof / snmpsim

SNMP Simulator
http://snmplabs.com/snmpsim/
BSD 2-Clause "Simplified" License
376 stars 119 forks source link

snmpsim-record-commands command not found #132

Closed mmodenesi closed 4 years ago

mmodenesi commented 4 years ago
/app # python -V
Python 3.7.7
/app # pip freeze
ply==3.11
pyasn1==0.4.8
pycryptodomex==3.9.7
pysmi==0.3.4
pysnmp==4.4.12
snmpclitools==0.6.4
snmpsim==0.4.7
/app # snmpsim-record-commands --agent-udpv4-endpoint=demo.snmplabs.com \
>     --output-file=./data/public.snmprec
sh: snmpsim-record-commands: not found

Thanks for your help!

mmodenesi commented 4 years ago

I am executing the commands inside a container built from

FROM python:3.7-alpine

RUN apk add --update gcc libc-dev
RUN pip install pysnmp snmpclitools snmpsim

ENV PYTHONPATH=/app
WORKDIR /app
mmodenesi commented 4 years ago

Inspecting the setup.py I see the command implementation lives in snmp.commands.rec2rec.main. Interestingly, in my local setup:

/usr/local/lib/python3.7/site-packages/snmpsim # ls -1
__init__.py
__pycache__
confdir.py
daemon.py
error.py
grammar
log.py
mltsplit.py
record
mmodenesi commented 4 years ago

Ok, I've found https://github.com/etingof/snmpsim/issues/124

tkekan commented 3 years ago

@mmodenesi Where you able to run the snmpsim-command-responder command inside the container ? With a fresh install I was hit by this issue https://github.com/etingof/snmpsim/issues/150 Can you please let me know if you are aware of this ?

mmodenesi commented 3 years ago

@mmodenesi Where you able to run the snmpsim-command-responder command inside the container ? With a fresh install I was hit by this issue #150 Can you please let me know if you are aware of this ?

I was able indeed of running the command. I see you are using legacy python. It worked for me with python3.7.7.

lextm commented 1 year ago

For 0.4.7 releases, you should refer to its versioned documentation, such as

https://github.com/lextudio/snmpsim/blob/v0.4.7/docs/source/quickstart.rst

so as to learn the correct command to use. Like the thread you linked in #124, commands such as snmpsim-record-commands are exclusive in the unpublished release.