<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-ext.aps.anl.gov/blc/index.php?action=history&amp;feed=atom&amp;title=Troubleshooting_EPICS_IOCs</id>
	<title>Troubleshooting EPICS IOCs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-ext.aps.anl.gov/blc/index.php?action=history&amp;feed=atom&amp;title=Troubleshooting_EPICS_IOCs"/>
	<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/blc/index.php?title=Troubleshooting_EPICS_IOCs&amp;action=history"/>
	<updated>2026-06-04T01:52:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/blc/index.php?title=Troubleshooting_EPICS_IOCs&amp;diff=23&amp;oldid=prev</id>
		<title>Tguruswamy: new page</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/blc/index.php?title=Troubleshooting_EPICS_IOCs&amp;diff=23&amp;oldid=prev"/>
		<updated>2022-12-08T19:53:54Z</updated>

		<summary type="html">&lt;p&gt;new page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Understanding the structure of a deployed EPICS IOC and environment, determining configuration, and parsing error messages.&lt;br /&gt;
&lt;br /&gt;
== Linux-specific ==&lt;br /&gt;
&lt;br /&gt;
=== Examine the environment with &amp;lt;code&amp;gt;env&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
EPICS reads several &amp;quot;environment variables&amp;quot; during operation. &lt;br /&gt;
You can examine the current list of environment variables in a terminal (either bash or csh) using &amp;lt;code&amp;gt;env&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To get the value of a particular environment variable, try&lt;br /&gt;
&amp;lt;code&amp;gt;env | grep VARIABLE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;echo $VARIABLE &amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Particularly relevant ones are:&lt;br /&gt;
&lt;br /&gt;
; PATH : list of folders which are searched for executable scripts and binaries. If you are seeing &amp;quot;command not found&amp;quot;-type errors, consider if $PATH is set correctly.&lt;br /&gt;
; EPICS_CA_ADDR_LIST : IP addresses that are contacted when searching for a CA (channel-access) variable. Important for any program which is accessing CA variables provided by a different program, possibly on a different host.&lt;br /&gt;
; EPICS_CA_AUTO_ADDR_LIST : (yes | no). Whether to also include the broadcast address for all configured network interfaces in the CA_ADDR_LIST. This automatically searches all computers on the same subnet for variables.&lt;br /&gt;
; EPICS_PVA_ADDR_LIST : As above, but for PVaccess variables.&lt;br /&gt;
; EPICS_PVA_AUTO_ADDR_LIST : As above, but for automatic use of broadcast addresses for PVaccess variables.&lt;br /&gt;
&lt;br /&gt;
For example, when examining a GUI which should only connect to the channel access variables of a local instance of an IOC, you might expect to see a configuration like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;EPICS_CA_AUTO_ADDR_LIST=no&lt;br /&gt;
EPICS_CA_ADDR_LIST=127.0.0.255&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find library dependencies with ldd ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to determine which versions of a shared library are linked into the IOC binary. On other occasions, an IOC binary will not run (typically, an immediate segfault) because a necessary linked library is missing.&lt;br /&gt;
&amp;lt;code&amp;gt;ldd&amp;lt;/code&amp;gt; is a Linux tool which will list all linked dynamic (shared) libraries of a binary, to answer these questions. Execute &amp;lt;code&amp;gt;ldd -r&amp;lt;/code&amp;gt; against the IOC '''binary''' (not startup script) and examine its output.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ~/epics/synApps_6_2_1/ioc/IocSpinnaker/&lt;br /&gt;
$ ldd -r bin/rhel8-x86_64/SpinnakerApp&lt;br /&gt;
      linux-vdso.so.1 (0x00007ffffb195000)&lt;br /&gt;
      libADSpinnaker.so =&amp;gt; /net/s100dserv/APSshare/epics/synApps_6_2_1/support/areaDetector-R3-12-1/ADSpinnaker/lib/rhel8-x86_64/libADSpinnaker.so (0x00007f149e6f9000)&lt;br /&gt;
      libADGenICam.so =&amp;gt; /net/s100dserv/APSshare/epics/synApps_6_2_1/support/areaDetector-R3-12-1/ADGenICam/lib/rhel8-x86_64/libADGenICam.so (0x00007f149e4e6000)&lt;br /&gt;
      ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The location of all found libraries will be listed in full, while any missing libraries will be noted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      libfoo.so =&amp;gt; not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== View the full IOC output when running in screen ===&lt;br /&gt;
&lt;br /&gt;
By default, IOCs built from the XXX template are controlled via a startup shell script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ExampleIOC.sh (start|stop|status)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you start an IOC this way, no output is immediately visible, and control returns to your terminal. It is possible to connect to the IOC console via&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ExampleIOC.sh console&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which opens a connection to &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;, the Linux terminal multiplexer. Type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; at the IOC prompt to exit, or use &amp;lt;code&amp;gt;Ctrl-a Ctrl-d&amp;lt;/code&amp;gt; (detach) to leave the IOC running in the background and return to the terminal. &amp;lt;code&amp;gt;Ctrl-a [&amp;lt;/code&amp;gt; will change screen to scrollback-mode, where you will be able to examine the stored history of IOC output. Use &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; to search forward through the text, and &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; to search backwards, for example to find errors.&lt;/div&gt;</summary>
		<author><name>Tguruswamy</name></author>
	</entry>
</feed>