Hi Mark,
Thanks, that worked (mostly - see below)!
For anyone else interested, here is everything I did to create an app
with iocStats support after compiling EPICS Base 7 and iocStats as a
support module (hope I didn't miss anything):
$ mkdir /path/to/new/ioc
$ makeBaseApp.pl -t ioc myioc
$ makeBaseApp.pl -t ioc -i myioc
$ cd configure
$ nano RELEASE # define paths to EPICS_BASE and IOCSTATS
$ cd ..
$ nano myiocApp/src/Makefile # add `myioc_DBD += devIocStats.dbd` and
`myioc_LIBS += devIocStats`
$ make
$ cd iocBoot/iocmyapp
$ nano st.cmd # add
`dbLoadRecords("/path/to/iocStats/db/iocAdminSoft.db", "IOC=MYIOC")`
$ ../../bin/linux-x86_64/myioc st.cmd # runs softIOC
One thing that didn't work for me were the variables $(DEVIOCSTATS) and
$(PREFIX), so I had to hard-code them above. When I start the IOC I get
the following errors:
macLib: macro DEVIOCSTATS is undefined (expanding string
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminSoft.db", "IOC=$(PREFIX)"))
macLib: macro PREFIX is undefined (expanding string
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminSoft.db", "IOC=$(PREFIX)"))
I guess I need to do something to ensure these are defined?
Another thing is the steps in [1] mention to compile MSI support, but I
found this was already available on my path after installing EPICS Base.
I skipped editing CONFIG_SITE to define MSI and it all appeared to still
work.
Cheers,
Sean
[1] https://www.slac.stanford.edu/grp/ssrl/spear/epics/site/devIocStats/
On 02/09/2022 14:48, Mark Rivers wrote:
Hi Sean,
To load the iocStats records in your IOC you just need to build your
application with the iocStats dbd and library files like this:
$(DBD_NAME)_DBD += devIocStats.dbd
PROD_LIBS += devIocStats
And add a command like this to your IOC startup script:
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminSoft.db", "IOC=$(PREFIX)")
Mark
------------------------------------------------------------------------
*From:* Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Sean
Leavey via Tech-talk <tech-talk at aps.anl.gov>
*Sent:* Friday, September 2, 2022 8:25 AM
*To:* tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
*Subject:* Basic iocStats database
Hi all,
Following on from my first question a couple weeks ago about the
feasibility of setting up EPICS for a small lab, I've provisioned a
Debian 11 VM and gotten EPICS Base set up. While I wait for the arrival
of the Modbus-based sensors I plan to use EPICS to read, I thought I'd
set up iocStats
(https://www.slac.stanford.edu/grp/ssrl/spear/epics/site/devIocStats/
<https://www.slac.stanford.edu/grp/ssrl/spear/epics/site/devIocStats/>)
so I have some real world values to play with - CPU usage, etc.
Following various guides I've managed to compile the example application
with iocStats module support. However, I don't actually have any of the
records provided by iocStats configured, and that's where I've gotten
stuck. What I'd really like to see are examples of databases others have
made that make use of the various records provided by iocStats (if such
an example is provided with iocStats itself, I missed it). Ultimately I
want to be able to caget my VM's CPU load, so I can play with archiving
and plotting it later. Google has failed me so I thought I'd ask here.
So, is anyone willing to share their iocStats configurations with me?
Cheers,
Sean
This email and any attachments are intended solely for the use of the
named recipients. If you are not the intended recipient you must not
use, disclose, copy or distribute this email or any of its attachments
and should notify the sender immediately and delete this email from your
system. UK Research and Innovation (UKRI) has taken every reasonable
precaution to minimise risk of this email or any attachments containing
viruses or malware but the recipient should carry out its own virus and
malware checks before opening the attachments. UKRI does not accept any
liability for any losses or damages which the recipient may sustain due
to presence of any viruses.
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.
- Replies:
- Re: Basic iocStats database Mark Rivers via Tech-talk
- References:
- Basic iocStats database Sean Leavey via Tech-talk
- Re: Basic iocStats database Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
Re: 'CAS-client' failed in ../db/dbEvent.c line 540 Oleg Makarov via Tech-talk
- Next:
Re: Basic iocStats database Mark Rivers 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
2021
<2022>
2023
2024
- Navigate by Thread:
- Prev:
Re: Basic iocStats database Mark Rivers via Tech-talk
- Next:
Re: Basic iocStats database Mark Rivers 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
2021
<2022>
2023
2024
|