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  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 
<== Date ==> <== Thread ==>

Subject: Re: SNMP in EPICS
From: Miroslaw Dach via Tech-talk <tech-talk at aps.anl.gov>
To: Tomasz Brys <Tomasz.Brys at ess.eu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 25 May 2021 18:51:05 -0700
Hi Tomasz,

There is a newer version 1.1.0.2 .

Cheers
Mirek 


On Fri, May 21, 2021 at 1:30 PM Tomasz Brys via Tech-talk <tech-talk at aps.anl.gov> wrote:

Thank you guys, for all your help.

I am trying to integrate and monitor the Lantime M300/GPS device.

I confirm it works as expect.

 

One of my records in the db is now:

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

  field(DESC, "Status of NTP")

  field(DTYP, "Snmp")

  field(SCAN, "5 second")

  field(INP,  "@$(HOST) $(COMMUNITY) $(MIB)::mbgLtNgNtpCurrentState.0 ( 100 i")

}

 

I had to add .0 or .1 in my INP field.

I also added MIBDIRS macro as suggested Michael and remove -c flag as suggested John.

Thank you for pointing me a new version 1.1.0.1

 

Cheers

Tomasz Brys

European Spallation Source ERIC

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Pierrick M Hanlet via Tech-talk <tech-talk at aps.anl.gov>
Reply-To: Pierrick M Hanlet <hanlet at fnal.gov>
Date: Friday, 21 May 2021 w:20 at 16:30
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Re: SNMP in EPICS

 

Hi Tomasz,
One way in which snmpwalk and snmpget differ is that snmpwalk doesn't specify a specific channel.
However, if you'll notice, it returns MBG-SNMP-LTNG-MIB::mbgLtNgRefclockState.1; note the ".1".  You might
try snmpget with and without it; if my suspicion is correct, then you'll need to add it to your address in the
INP field.
Cheers,
Pierrick

On 5/21/21 3:13 AM, Tomasz Brys via Tech-talk wrote:

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



-- 
Pierrick Hanlet
Fermi National Accelerator
Accelerator Front End Controls
+1-630-840-5555 -- lab
+1-312-687-4980 -- mobile
 
"Whether you think you can or think you can't, you're right" -- Henry Ford

References:
SNMP in EPICS Tomasz Brys via Tech-talk
Re: SNMP in EPICS Pierrick M Hanlet via Tech-talk
Re: SNMP in EPICS Tomasz Brys via Tech-talk

Navigate by Date:
Prev: Re: Re: Re: How to set bo PV to zero when starting Modbus IOC 高振华 via Tech-talk
Next: offset correction in PerkinElmer AreaDetector [SEC=OFFICIAL] CORNALL, Terry 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 
Navigate by Thread:
Prev: Re: SNMP in EPICS Tomasz Brys via Tech-talk
Next: Re: SNMP in EPICS Dunning, Michael 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 
ANJ, 25 May 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·