Results 1 to 10 of 10

Thread: Python SNMP library ( networking framework )

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Post Python SNMP library ( networking framework )

    Hi all,

    i'am using python with snmp to develop an interface with Pygtk,
    the problem is that i don't know how to use python to use snmp commands and which library use for this aim.

    i have installed net-snmp.

    is there documentation about how to use python with snmp...

    Thank you.

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 815 Times in 511 Posts
    Rep Power
    10

    Default

    You need the following under Debian Linux:

    1. libsnmp-python SNMP (Simple Network Management Protocol) Python support
    2. python-pysnmp2 Python SNMP library for agents and managers
    3. python-pysnmp-common Python SNMP library for agents and managers

    Use apt-get to install them.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    i'am using fedora 8 and i can't find these packages, and how can i use them to interact with the equipement.
    is there documentation that could help me...

  4. #4
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 815 Times in 511 Posts
    Rep Power
    10

    Default

    Use yum command to install packages. Here are examples and documents:

    Python SNMP framework
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    is there only this solution to develop an application with python using snmp ?
    i'am searching about a simple library to use snmpget, snmpset ...Etc.

    Because with pysnmp i find it difficult to do this and you must type a long code juste to run snmpget...

    thank you.

  6. #6
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 815 Times in 511 Posts
    Rep Power
    10

    Default

    It is API thingy, so end up writing a bit more. I'm not sure what you are trying to developer here, but you can just run commands using os.system() or os.popen(). For e.g.
    Code:
    #!/usr/bin/python
    import os
    os.system('ls');
    os.system('date');
    You can replace ls / date with snmpget.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  7. #7
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    thank you this is what i'am searching.
    Actually, i'am developping an interface using pygtk to control an équipement, then i must store the results given by snmp in a data base.
    Do you think that using os is the most appropriate solution and how can i interprete the responses to get something clear on the interface.

  8. #8
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 815 Times in 511 Posts
    Rep Power
    10

    Default

    Use API, if you need to read data and store it to database. os.system() is more suitable; if you just want last shell command exit status but it is not good for processing the data.
    Last edited by nixcraft; 14th May 2009 at 05:53 PM.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  9. #9
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Thank you....................
    Last edited by learnmore; 2nd June 2009 at 09:49 AM.

  10. #10
    Junior Member
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    can you tell me wich API is more suitable to read data and store them using SNMP ?

    Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. gd library
    By aammiitt in forum CentOS / RHEL / Fedora
    Replies: 3
    Last Post: 28th December 2008, 09:00 PM
  2. Library wanted
    By dnquynh in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 7th July 2008, 04:27 PM
  3. static library,dynamic
    By narmadakumari in forum Linux software
    Replies: 0
    Last Post: 17th June 2008, 01:16 PM
  4. Python with SNMP Supportq
    By rcordeiro in forum Shell scripting
    Replies: 2
    Last Post: 16th December 2006, 11:48 PM
  5. Library Linking in GCC
    By newbie-wan in forum Coding in General
    Replies: 1
    Last Post: 18th October 2006, 03:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •