EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025  2026  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025  2026 
<== Date ==> <== Thread ==>

Subject: Re: SNMP in EPICS
From: "Dunning, Michael via Tech-talk" <[email protected]>
To: "[email protected]" <[email protected]>, Tomasz Brys <[email protected]>
Date: Fri, 21 May 2021 15:54:15 +0000
> I want to keep MIB file somewhere in the module, not in the /usr/share/snmp directory.

If you're using the NSCL SNMP support, you can add directories to the
MIB search path by setting the MIBDIRS environment variable in your
IOC startup script, like this:

epicsEnvSet("MIBDIRS", "+$(TOP)/mibs:/some/other/directory")

In this case $(TOP) is the top directory of the IOC application.

This is described here:
https://groups.nscl.msu.edu/controls/files/devSnmp.html#MIBfiles




Michael Dunning
SLAC National Accelerator Laboratory
2575 Sand Hill Road
Menlo Park, CA 94025
(650) 926-5200


From: Tech-talk <[email protected]> on behalf of Tomasz Brys via Tech-talk <[email protected]>
Sent: Friday, May 21, 2021 1:13 AM
To: [email protected] <[email protected]>
Subject: SNMP in EPICS
 

Hi,

I have a problem how to implement SNMP protocol in EPICS.

I want to keep MIB file somewhere in the module, not in the /usr/share/snmp directory.

If I run snmpwalk I can:

snmpwalk -v2c -M +/vagrant/modules/e3-M300_GPS/M300_GPS/M300_GPSApp/MBG-SNMP-MIB -m All -c comm 192.168.XXX.XXX MBG-SNMP-LTNG-MIB::mbgLtNgRefclockState

and I get output:

MBG-SNMP-LTNG-MIB::mbgLtNgRefclockState.1 = INTEGER: synchronized(1)

 

How should I define my record in Db?

I did it like that:

record(longin, "$(P)$(R)RefclockState"){

  field(DESC, "Status of GPS refclock")

  field(DTYP, "Snmp")

  field(SCAN, "5 second")

  field(INP,  "@$(HOST) $(COMMUNITY) $(MIB)::mbgLtNgRefclockState Integer: 10")

}

Where:

$(HOST) = 192.168.XXX.XXX – this is of course fake address

$(COMMUNITY) = -c comm

$(MIB) = MBG-SNMP-LTNG-MIB

 

But I got error:

devSnmp: error parsing '192.168.XXX.XXX -c comm MBG-SNMP-LTNG-MIB::mbgLtNgRefclockState Integer: 10'

         format is 'host community oidname mask maxdatalength [set_format/special]'

Error (511,511) PV: P:R:RefclockState devSnmpLi (init_record) bad parameters

 

Any help how I can do this?

 

Best regards

Tomasz Brys

European Spallation Source ERIC


References:
SNMP in EPICS Tomasz Brys via Tech-talk

Navigate by Date:
Prev: Re: SNMP in EPICS Pierrick M Hanlet via Tech-talk
Next: Re: SNMP in EPICS Tomasz Brys via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025  2026 
Navigate by Thread:
Prev: Re: SNMP in EPICS Miroslaw Dach via Tech-talk
Next: caRepeater w/ systemd? Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025  2026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·