Thanks for all your suggestions. It helps a lot.
We're gonna discuss this subject internally and decide what is the best approach.
Loïc
De : Timo Korhonen <Timo.Korhonen at ess.eu>
Envoyé : jeudi 20 avril 2023 22:13
À : tech-talk at aps.anl.gov; CAOUEN Loic <loic.caouen at cea.fr>
Objet : Re: Search all PV available
Hi,
The question was about CA, so this is not an answer to that. But if you use pvAccess, you could use the command pvlist. Without arguments, it gives you a list of all PVA servers it finds, their IP addresses and port, plus GUIDs.
Then you can use either the GUID or the ip address + port to list all the PVs (well, records + group PVs, if any have been defined.)
So, with a two-step approach you can find all the PVs in the subnets you have defined.
One more reason to go for PVA 😊
For production use I would recommend setting up Channel Finder, though.
Timo
pvlist -h
Usage: pvlist [options] [<server address or GUID starting with '0x'>]...
options:
-h: Help: Print this message
-V: Print version and exit
-i Print server info (when server address list/GUID is given)
-w <sec>: Wait time, specifies timeout, default is 3.000000 second(s)
-q: Quiet mode, print only error messages
-d: Enable debug output
examples:
pvlist
pvlist ioc0001
pvlist 10.5.1.205:10000
pvlist 0x83DE3C540000000000BF351F
Hey,
> Another approach is adding something like "dbl >list_of_records" to the end of each IOC startup script, and then have some home-built service tool collect those lists of records per IOC.
That is what we do. We use a cron job to combine all of these files (and filters out records containing specific strings, which we use by convention to mark IOC "internal" records). One feature we provide with the resulting list is auto-tab completion in the bash terminal for the basic caget/caput/camonitor commands up until the next colon.
eddy
________________________________________
Von: Tech-talk tech-talk-bounces at aps.anl.gov Im Auftrag von Kasemir, Kay via Tech-talk
Gesendet: Donnerstag, 20. April 2023 15:56
An: tech-talk at aps.anl.gov; CAOUEN Loic loic.caouen at cea.fr
Betreff: Re: Search all PV available
In short, no.
First note that there's a difference between records and PVs.
In principle, every field of every record can be a PV.
For an analog input record "X", you can get a DBR_CTRL_DOUBLE type of channel that basically provides the content of VAL, TIME, EGU, PREC, ...
You can also create a DBR_STRING channel for "X.EGU" and so on.
In most cases you use just the record name as a channel name, but for a motor record, "X.RBV" is a very useful channel.
So the exact number of channels isn't really well defined, but what you're probably looking for is a list of record names. Then again, no, out of the box that's not available on the network.
Just like you can't get a list of all web pages from a web server.
For web pages, google tries to build a list of web pages in various ways.
> .. available on an IP address ?
In practice, the use case it typically not finding a list of records for a running IOC.
If you have the IP address, you can usually somehow get to the IOC and type "dbl".
The task at hand is usually that PV "X" is unresolved and you need to figure out where that record was supposed to be, which IOC happens to be down right now.
So for that some offline database which gets populated when IOCs start but can then tell you later where a record was last seen is better.
For IOCs, the Channel Finder and 'recsync' are one way to build it.
Another approach is adding something like "dbl >list_of_records" to the end of each IOC startup script, and then have some home-built service tool collect those lists of records per IOC.
-Kay
________________________________________
From: Tech-talk mailto:tech-talk-bounces at aps.anl.gov on behalf of CAOUEN Loic via Tech-talk mailto:tech-talk at aps.anl.gov
Sent: Thursday, April 20, 2023 9:18 AM
To: mailto:tech-talk at aps.anl.gov mailto:tech-talk at aps.anl.gov
Subject: [EXTERNAL] Search all PV available
Hello,
Is there a way to find all the ChannelAccess PV available on an IP address ?
I've had a look to Channel Finder https://github.com/ChannelFinder but it looks like a search engine (search the PV info put in the engine database).
Is there a tool in epics base to do that ?
Loïc