source: epicsdf/doc/build/html/installation.html @ 1046

Last change on this file since 1046 was 1046, checked in by jemian, 10 years ago

refs #12, provides the publishing tool and changed the URL to point to the new location

  • Property svn:executable set to *
  • Property svn:mime-type set to text/html
File size: 25.3 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>Installation Instructions for Pilatus Detectors &mdash; epicsdf 1.0 documentation</title>
12   
13    <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
14    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '',
19        VERSION:     '1.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="_static/jquery.js"></script>
26    <script type="text/javascript" src="_static/underscore.js"></script>
27    <script type="text/javascript" src="_static/doctools.js"></script>
28    <link rel="top" title="epicsdf 1.0 documentation" href="index.html" />
29    <link rel="up" title="Contents" href="contents.html" />
30    <link rel="next" title="EPICS IOC support documentation" href="epics/index.html" />
31    <link rel="prev" title="Contents" href="contents.html" /> 
32  </head>
33  <body>
34    <div class="related">
35      <h3>Navigation</h3>
36      <ul>
37        <li class="right" style="margin-right: 10px">
38          <a href="genindex.html" title="General Index"
39             accesskey="I">index</a></li>
40        <li class="right" >
41          <a href="py-modindex.html" title="Python Module Index"
42             >modules</a> |</li>
43        <li class="right" >
44          <a href="epics/index.html" title="EPICS IOC support documentation"
45             accesskey="N">next</a> |</li>
46        <li class="right" >
47          <a href="contents.html" title="Contents"
48             accesskey="P">previous</a> |</li>
49        <li><a href="index.html">epicsdf 1.0 documentation</a> &raquo;</li>
50          <li><a href="contents.html" accesskey="U">Contents</a> &raquo;</li> 
51      </ul>
52    </div>
53      <div class="sphinxsidebar">
54        <div class="sphinxsidebarwrapper">
55  <h3><a href="index.html">Table Of Contents</a></h3>
56  <ul>
57<li><a class="reference internal" href="#">Installation Instructions for Pilatus Detectors</a><ul>
58<li><a class="reference internal" href="#install-epics-database-in-existing-ioc">Install EPICS database in existing IOC</a></li>
59<li><a class="reference internal" href="#install-gui-support">Install GUI support</a></li>
60<li><a class="reference internal" href="#install-enthought-python-distribution">Install Enthought Python Distribution</a><ul>
61<li><a class="reference internal" href="#test-pyepics">Test PyEPICS</a></li>
62</ul>
63</li>
64<li><a class="reference internal" href="#install-epicsdf-python-client-code">Install <tt class="docutils literal"><span class="pre">epicsdf</span></tt> Python client code</a><ul>
65<li><a class="reference internal" href="#test-epicsdf">Test epicsdf</a></li>
66<li><a class="reference internal" href="#configure-epicsdf">Configure <tt class="docutils literal"><span class="pre">epicsdf</span></tt></a></li>
67<li><a class="reference internal" href="#start-periodic-cron-task">Start periodic <tt class="docutils literal"><span class="pre">cron</span></tt> task</a></li>
68<li><a class="reference internal" href="#a-few-vi-editor-commands">a few VI editor commands</a></li>
69</ul>
70</li>
71</ul>
72</li>
73</ul>
74
75  <h4>Previous topic</h4>
76  <p class="topless"><a href="contents.html"
77                        title="previous chapter">Contents</a></p>
78  <h4>Next topic</h4>
79  <p class="topless"><a href="epics/index.html"
80                        title="next chapter">EPICS IOC support documentation</a></p>
81  <h3>This Page</h3>
82  <ul class="this-page-menu">
83    <li><a href="_sources/installation.txt"
84           rel="nofollow">Show Source</a></li>
85  </ul>
86<div id="searchbox" style="display: none">
87  <h3>Quick search</h3>
88    <form class="search" action="search.html" method="get">
89      <input type="text" name="q" />
90      <input type="submit" value="Go" />
91      <input type="hidden" name="check_keywords" value="yes" />
92      <input type="hidden" name="area" value="default" />
93    </form>
94    <p class="searchtip" style="font-size: 90%">
95    Enter search terms or a module, class or function name.
96    </p>
97</div>
98<script type="text/javascript">$('#searchbox').show(0);</script>
99        </div>
100      </div>
101
102    <div class="document">
103      <div class="documentwrapper">
104        <div class="bodywrapper">
105          <div class="body">
106           
107  <div class="section" id="installation-instructions-for-pilatus-detectors">
108<h1>Installation Instructions for Pilatus Detectors<a class="headerlink" href="#installation-instructions-for-pilatus-detectors" title="Permalink to this headline">¶</a></h1>
109<p>There are several steps to the installation process.  This page was written during the
110installation of this code at 15ID-D on the USAXS/SAXS Pilatus 100k detector.  You might
111need to change some values to fit your situation.</p>
112<ol class="arabic simple">
113<li>Install the EPICS database into an existing IOC.</li>
114<li>Install GUI support screens for MEDM or CSS-BOY</li>
115<li>Install Enthought Python Distribution with PyEPICS on Pilatus host computer.</li>
116<li>Install (and test and configure) <tt class="docutils literal"><span class="pre">epicsdf.py</span></tt> on Pilatus host computer.</li>
117<li>Start <tt class="docutils literal"><span class="pre">cron</span></tt> task to keep epicsdf.py running on Pilatus host computer.</li>
118</ol>
119<div class="section" id="install-epics-database-in-existing-ioc">
120<h2>Install EPICS database in existing IOC<a class="headerlink" href="#install-epics-database-in-existing-ioc" title="Permalink to this headline">¶</a></h2>
121<p>These instructions assume the support database will run in an existing
122EPICS IOC.  In this example, <tt class="docutils literal"><span class="pre">&lt;TOP&gt;</span></tt>
123is the absolute directory path to the IOC&#8217;s top-level directory.
124In that directory, there will be some directory <em>someApp</em> where the source
125code for the IOC resides.</p>
126<ol class="arabic">
127<li><p class="first">Check out support from subversion:</p>
128<div class="highlight-python"><pre>cd /tmp
129svn co https://subversion.xray.aps.anl.gov/bcdaext/epicsdf epicsdf
130cd epicsdf</pre>
131</div>
132</li>
133<li><p class="first">Copy support database to <tt class="docutils literal"><span class="pre">&lt;TOP&gt;/someApp/Db</span></tt> directory:</p>
134<div class="highlight-python"><pre>cd /net/s15dserv/xorApps/epics/synApps_5_4/ioc/15iddLAX/15iddLAXApp/Db
135cp /tmp/epicsdf/epics/epicsdf.db ./
136svn add epicsdf.db
137svn propset svn:eol-style native epicsdf.db
138svn propset svn:keywords "Author Date Id Revision Url" epicsdf.db</pre>
139</div>
140</li>
141<li><p class="first">Copy autosave request file to &lt;TOP&gt;/iocBoot/iocNAME directory:</p>
142<div class="highlight-python"><pre>cd /net/s15dserv/xorApps/epics/synApps_5_4/ioc/15iddLAX/iocBoot/ioc15iddLAX
143cp /tmp/epicsdf/epics/epicsdf.req ./
144svn add epicsdf.req
145svn propset svn:eol-style native epicsdf.req
146svn propset svn:keywords "Author Date Id Revision Url" epicsdf.req</pre>
147</div>
148</li>
149<li><p class="first">Call support database from <tt class="docutils literal"><span class="pre">st.cmd</span></tt> file (edit that file and add like this <em>before</em> <tt class="docutils literal"><span class="pre">iocInit</span></tt>):</p>
150<div class="highlight-python"><div class="highlight"><pre><span class="c"># 2011-08-01,PRJ</span>
151<span class="c"># database support for &quot;df&quot; command on Pilatus detector computer</span>
152<span class="c"># https://subversion.xray.aps.anl.gov/bcdaext/epicsdf/doc/build/html/index.html</span>
153<span class="n">dbLoadRecords</span><span class="p">(</span><span class="s">&quot;$(TOP)/15iddLAXApp/Db/epicsdf.db&quot;</span><span class="p">,</span> <span class="s">&quot;P=15iddLAX:,D=p100k:&quot;</span><span class="p">)</span>
154</pre></div>
155</div>
156</li>
157<li><p class="first">Register autosave request from <tt class="docutils literal"><span class="pre">auto_settings.req</span></tt> file (edit that file and add anywhere, usually at the end):</p>
158<div class="highlight-python"><pre># 2011-08-01,PRJ
159# database support for "df" command on Pilatus detector computer
160# https://subversion.xray.aps.anl.gov/bcdaext/epicsdf/doc/build/html/index.html
161file epicsdf.req P=$(P),D=p100k:</pre>
162</div>
163</li>
164</ol>
165<p>Keep the directory <tt class="docutils literal"><span class="pre">/tmp/epicsdf</span></tt> for use in the next step, to install the GUI support.</p>
166</div>
167<div class="section" id="install-gui-support">
168<h2>Install GUI support<a class="headerlink" href="#install-gui-support" title="Permalink to this headline">¶</a></h2>
169<p>There are support screens for MEDM and CSS-BOY in the <tt class="docutils literal"><span class="pre">epics/</span></tt>
170subdirectory.</p>
171<ul class="simple">
172<li><tt class="docutils literal"><span class="pre">epics/epicsdf.adl</span></tt> : MEDM screen, needs macros <tt class="docutils literal"><span class="pre">P</span></tt> and <tt class="docutils literal"><span class="pre">D</span></tt> defined</li>
173<li><tt class="docutils literal"><span class="pre">epics/epicsdf.opi</span></tt> : CSS-BOY screen, needs macros <tt class="docutils literal"><span class="pre">P</span></tt> and <tt class="docutils literal"><span class="pre">D</span></tt> defined</li>
174<li><tt class="docutils literal"><span class="pre">epics/starter.opi</span></tt> : CSS-BOY screen, defines <tt class="docutils literal"><span class="pre">P</span></tt> and <tt class="docutils literal"><span class="pre">D</span></tt> and calls <tt class="docutils literal"><span class="pre">epicsdf.opi</span></tt></li>
175</ul>
176<p>Copy these screens to the appropriate directory for the tool you use:</p>
177<div class="highlight-python"><pre>cd /net/s15dserv/xorApps/epics/synApps_5_4/ioc/15iddLAX/15iddLAXApp/op/adl
178cp /tmp/epicsdf/epics/epicsdf.adl ./
179svn add epicsdf.adl</pre>
180</div>
181<p>The MEDM screen can be called from the command line with a command such as:</p>
182<div class="highlight-python"><pre>medm -x -macro P=15iddLAX:,D=p100k: epicsdf.adl &amp;</pre>
183</div>
184<p>The directory <tt class="docutils literal"><span class="pre">/tmp/epicsdf</span></tt> can be discarded now.</p>
185</div>
186<div class="section" id="install-enthought-python-distribution">
187<h2>Install Enthought Python Distribution<a class="headerlink" href="#install-enthought-python-distribution" title="Permalink to this headline">¶</a></h2>
188<table class="docutils field-list" frame="void" rules="none">
189<col class="field-name" />
190<col class="field-body" />
191<tbody valign="top">
192<tr class="field-odd field"><th class="field-name">warning:</th><td class="field-body">Procedure to install PyEPICS is flawed.
193On Linux, fails to find libCom.so.3.14...
194Works when matching libCom.so.(ver.sion) is copied to same place.</td>
195</tr>
196</tbody>
197</table>
198<p>These instructions describe installation of 32-bit support on the Pilatus host computer (usually SUSE Linux).</p>
199<ol class="arabic">
200<li><p class="first">Copy deployment software to Pilatus host computer:</p>
201<div class="highlight-python"><pre>cd /tmp
202svn co https://subversion.xray.aps.anl.gov/bcdaext/epd_deployment epd_deployment
203cd epd_deployment</pre>
204</div>
205</li>
206<li><p class="first">Copy Enthought installer to Pilatus host computer:</p>
207<div class="highlight-python"><pre>cp /APSshare/epd/downloads/epd-7.1-2-rh5-x86_64.sh ./images
208chmod +x ./images/epd-7.1-2-rh5-x86_64.sh</pre>
209</div>
210</li>
211<li><dl class="first docutils">
212<dt>Check the installation script for valid paths against what is available on the Pilatus host computer.</dt>
213<dd><p class="first">There are several scripts.  Here, just edit the macros in the 64-bit script</p>
214<ul class="simple">
215<li><tt class="docutils literal"><span class="pre">install-rhel5-64.sh</span></tt>: installer shell script for 64-bit support</li>
216</ul>
217<table border="1" class="docutils">
218<colgroup>
219<col width="19%" />
220<col width="81%" />
221</colgroup>
222<thead valign="bottom">
223<tr class="row-odd"><th class="head"><p class="first last">macro</p>
224</th>
225<th class="head"><p class="first last">meaning</p>
226</th>
227</tr>
228</thead>
229<tbody valign="top">
230<tr class="row-even"><td><p class="first last"><tt class="docutils literal"><span class="pre">SRC</span></tt></p>
231</td>
232<td><p class="first last">relative path to the Enthought installer script</p>
233</td>
234</tr>
235<tr class="row-odd"><td><p class="first last"><tt class="docutils literal"><span class="pre">LIBCA</span></tt></p>
236</td>
237<td><p class="first last">absolute path to EPICS <tt class="docutils literal"><span class="pre">libCa.so</span></tt> built for this OS</p>
238</td>
239</tr>
240<tr class="row-even"><td><p class="first last"><tt class="docutils literal"><span class="pre">EPD_ROOT</span></tt></p>
241</td>
242<td><p class="first last">absolute path under which this EPD will be installed</p>
243</td>
244</tr>
245</tbody>
246</table>
247<table class="docutils field-list" frame="void" rules="none">
248<col class="field-name" />
249<col class="field-body" />
250<tbody valign="top">
251<tr class="field-odd field"><th class="field-name">note:</th><td class="field-body"><blockquote class="first">
252<div><p>Consider adding the path defined by <tt class="docutils literal"><span class="pre">${EPD_ROOT}/bin</span></tt>
253to the shell <tt class="docutils literal"><span class="pre">PATH</span></tt> variable.</p>
254</div></blockquote>
255<table class="last docutils field-list" frame="void" rules="none">
256<col class="field-name" />
257<col class="field-body" />
258<tbody valign="top">
259<tr class="field-odd field"><th class="field-name">note:</th><td class="field-body">Suggest <tt class="docutils literal"><span class="pre">EPD_ROOT=/home/det/epd</span></tt> for Pilatus detectors.  This makes
260the Python executable available at
261<tt class="docutils literal"><span class="pre">/home/det/epd/rh5-x86_64/bin/python</span></tt></td>
262</tr>
263</tbody>
264</table>
265</td>
266</tr>
267</tbody>
268</table>
269<p>These parameters seem to work well:</p>
270<blockquote class="last">
271<div><p>SRC=/tmp/epd_deployment/images/epd-7.1-2-rh5-x86_64.sh
272LIBCA=/home/det/epics/base-3.14.9/lib/linux-x86_64/libca.so.3.14
273EPD_ROOT=/home/det/epd</p>
274</div></blockquote>
275</dd>
276</dl>
277</li>
278<li><p class="first">Run installation script:</p>
279<div class="highlight-python"><pre>/bin/sh ./install-rhel5-64.sh</pre>
280</div>
281</li>
282</ol>
283<p>The directory <tt class="docutils literal"><span class="pre">/tmp/epd_deployment</span></tt> can be discarded now.</p>
284<ol class="arabic" start="5">
285<li><p class="first">Consider defining this environment variable:</p>
286<div class="highlight-python"><pre>EPD=/home/det/epd/rh5-x86_64</pre>
287</div>
288</li>
289</ol>
290<div class="section" id="test-pyepics">
291<h3>Test PyEPICS<a class="headerlink" href="#test-pyepics" title="Permalink to this headline">¶</a></h3>
292<p>Test the Python EPICS support (<a class="reference external" href="http://cars9.uchicago.edu/software/python/pyepics3/">PyEPICS</a>)
293by printing the APS storage ring current.</p>
294<div class="highlight-python"><pre>command_line&gt; ${EPD}/bin/python
295import epics
296print epics.caget('S:SRcurrentAI')</pre>
297</div>
298<p>This can be run as:</p>
299<div class="highlight-python"><pre>${EPD_ROOT}/bin/python test_pyepics.py</pre>
300</div>
301<p>If this fails on the <tt class="docutils literal"><span class="pre">import</span> <span class="pre">epics</span></tt> statement, then the <tt class="docutils literal"><span class="pre">libCa.so</span></tt> module
302is probably not found.</p>
303</div>
304</div>
305<div class="section" id="install-epicsdf-python-client-code">
306<h2>Install <tt class="docutils literal"><span class="pre">epicsdf</span></tt> Python client code<a class="headerlink" href="#install-epicsdf-python-client-code" title="Permalink to this headline">¶</a></h2>
307<ol class="arabic">
308<li><p class="first">Check out support from subversion:</p>
309<div class="highlight-python"><pre>cd ~
310svn co https://subversion.xray.aps.anl.gov/bcdaext/epicsdf epicsdf
311cd epicsdf</pre>
312</div>
313</li>
314<li><p class="first">Revise <tt class="docutils literal"><span class="pre">self.sender</span></tt> in <tt class="file docutils literal"><span class="pre">src/epicsdf.py</span></tt>.
315Specify the name of a valid APS email address as the sender.
316The <tt class="xref py py-meth docutils literal"><span class="pre">epicsdf.sendmail()</span></tt>
317sends mail using the <tt class="docutils literal"><span class="pre">mail</span></tt> program on the host operating system.  By default, the
318Pilatus detectors are in the <tt class="docutils literal"><span class="pre">dectris.localdomain</span></tt> which is not allowed to send
319mail within the APS.</p>
320</li>
321</ol>
322<div class="section" id="test-epicsdf">
323<h3>Test epicsdf<a class="headerlink" href="#test-epicsdf" title="Permalink to this headline">¶</a></h3>
324<dl class="docutils">
325<dt>Try running the program directly.  Note the program accepts a single PV prefix</dt>
326<dd><p class="first">as its argument (including the <tt class="docutils literal"><span class="pre">df:</span></tt>):</p>
327<div class="last highlight-python"><pre>/home/det/epd/rh5-x86_64/bin/python src/epicsdf.py 15iddLAX:p100:df:</pre>
328</div>
329</dd>
330</dl>
331</div>
332<div class="section" id="configure-epicsdf">
333<h3>Configure <tt class="docutils literal"><span class="pre">epicsdf</span></tt><a class="headerlink" href="#configure-epicsdf" title="Permalink to this headline">¶</a></h3>
334<dl class="docutils">
335<dt>Verify that the starter shell script <tt class="docutils literal"><span class="pre">shell/epicsdf.sh</span></tt> works properly.</dt>
336<dd><p class="first">Move to the <tt class="docutils literal"><span class="pre">shell</span></tt> directory and edit both files.  Adjust these items:</p>
337<table border="1" class="last docutils">
338<colgroup>
339<col width="25%" />
340<col width="75%" />
341</colgroup>
342<thead valign="bottom">
343<tr class="row-odd"><th class="head">macro</th>
344<th class="head">example value</th>
345</tr>
346</thead>
347<tbody valign="top">
348<tr class="row-even"><td>DATABASE_PREFIX</td>
349<td>15iddLAX:p100:df:</td>
350</tr>
351<tr class="row-odd"><td>APP_BASE_DIR</td>
352<td>/home/det/epicsdf</td>
353</tr>
354<tr class="row-even"><td>PYTHON</td>
355<td>/home/det/epd/rh5-x86_64/bin/python</td>
356</tr>
357</tbody>
358</table>
359</dd>
360</dl>
361<p>These parameters seem to work well (replace <tt class="docutils literal"><span class="pre">yyyyyyy:zzzzzz</span></tt> with correct PV parts):</p>
362<blockquote>
363<div>DATABASE_PREFIX=yyyyyyy:zzzzzz:df:
364APP_BASE_DIR=/home/det/epicsdf
365PYTHON=/home/det/epd/rh5-x86_64/bin/python</div></blockquote>
366<p>Test this by running each of these commands individually and looking at the output
367in the <tt class="docutils literal"><span class="pre">shell/epicsdf.log</span></tt> log file:</p>
368<div class="highlight-python"><pre>shell/epicsdf.sh start           # should start the program
369shell/epicsdf.sh status          # should say program is running
370shell/epicsdf.sh stop            # should stop program
371shell/epicsdf.sh restart         # should start program
372shell/epicsdf.sh restart         # should stop and then start program
373shell/epicsdf.sh checkup         # does nothing this time
374shell/epicsdf.sh stop            # should stop program
375shell/epicsdf.sh checkup         # should start program
376shell/epicsdf.sh checkup         # does nothing this time</pre>
377</div>
378<p>For convenience, you could also (enter the <tt class="docutils literal"><span class="pre">shell</span></tt> directory and)
379type <tt class="docutils literal"><span class="pre">make</span> <span class="pre">start</span></tt>, <tt class="docutils literal"><span class="pre">make</span> <span class="pre">stop</span></tt>, ...</p>
380<p>Note:
381The first time <tt class="docutils literal"><span class="pre">shell/epicsdf.sh</span></tt> is run, the log file will contain some
382error information since the PID file has not yet been created.  No problem
383for the first time.  Maybe some additional code will be added to work around this.
384<strong>Ignore this error if it occurs the first time.</strong>  You could even scrape it out
385of the log file.</p>
386<div class="highlight-python"><pre># ===== shell/epicsdf.sh start =====  Tue Aug  2 15:01:29 CDT 2011  ==================================
387/bin/cat: /home/det/epicsdf/shell/epicsdf.pid: No such file or directory
388ERROR: List of process IDs must follow -p.
389********* simple selection *********  ********* selection by list *********
390-A all processes                      -C by command name
391-N negate selection                   -G by real group ID (supports names)
392-a all w/ tty except session leaders  -U by real user ID (supports names)
393-d all except session leaders         -g by session OR by effective group name
394-e all processes                      -p by process ID
395T  all processes on this terminal     -s processes in the sessions given
396a  all w/ tty, including other users  -t by tty
397g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
398r  only running processes             U  processes for specified users
399x  processes w/o controlling ttys     t  by tty
400*********** output format **********  *********** long options ***********
401-o,o user-defined  -f full            --Group --User --pid --cols --ppid
402-j,j job control   s  signal          --group --user --sid --rows --info
403-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
404-l,l long          u  user-oriented   --sort --tty --forest --version
405-F   extra full    X  registers       --heading --no-heading --context
406                    ********* misc options *********
407-V,V  show version      L  list format codes  f  ASCII art forest
408-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
409-M,Z  security data     c  true command name  -c scheduling class
410-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy
411# started 9233: /home/det/epd/rh5-x86_64/bin/python /home/det/epicsdf/src/epicsdf.py 15iddLAX:p100:df:</pre>
412</div>
413</div>
414<div class="section" id="start-periodic-cron-task">
415<h3>Start periodic <tt class="docutils literal"><span class="pre">cron</span></tt> task<a class="headerlink" href="#start-periodic-cron-task" title="Permalink to this headline">¶</a></h3>
416<p>To ensure that the Python client program is restarted wfter a host reboot
417(or some other reason it has stopped), a periodic cron task checks that
418there is a PID running on the system and that PID is our python job.  This
419is done by periodically calling:</p>
420<div class="highlight-python"><pre>epics/epicsdf.sh checkup</pre>
421</div>
422<p>which will start a new client program if it is not running.
423The <tt class="docutils literal"><span class="pre">cron</span></tt> task is started by:</p>
424<div class="highlight-python"><div class="highlight"><pre><span class="n">crontab</span> <span class="o">-</span><span class="n">e</span>
425</pre></div>
426</div>
427<table class="docutils field-list" frame="void" rules="none">
428<col class="field-name" />
429<col class="field-body" />
430<tbody valign="top">
431<tr class="field-odd field"><th class="field-name">note:</th><td class="field-body">You will probably need to know how to use the <tt class="docutils literal"><span class="pre">vi</span></tt> editor.  Good luck!</td>
432</tr>
433</tbody>
434</table>
435<p>Add these contents to the end of the list, save, and then quit the editor.
436(Runs a <em>checkup</em> every 5 minutes.):</p>
437<div class="highlight-python"><pre># cron task
438#  epicsdf-
439#     watch some local disk partition and report it to EPICS,
440#     send emails if space runs low
441*/5 * * * * /home/det/epicsdf/shell/epicsdf.sh checkup</pre>
442</div>
443</div>
444<div class="section" id="a-few-vi-editor-commands">
445<h3>a few VI editor commands<a class="headerlink" href="#a-few-vi-editor-commands" title="Permalink to this headline">¶</a></h3>
446<p>These are the few VI editor commands to help you edit the <tt class="docutils literal"><span class="pre">cron</span></tt> task.
447The notation <tt class="docutils literal"><span class="pre">[esc]</span></tt> means to press the <em>escape</em> key.  If you need more
448help, you need the manual.</p>
449<table border="1" class="docutils">
450<colgroup>
451<col width="24%" />
452<col width="76%" />
453</colgroup>
454<thead valign="bottom">
455<tr class="row-odd"><th class="head">command</th>
456<th class="head">meaning</th>
457</tr>
458</thead>
459<tbody valign="top">
460<tr class="row-even"><td>i</td>
461<td>start <em>insert</em> mode (so you can enter text)</td>
462</tr>
463<tr class="row-odd"><td>[esc]</td>
464<td>leave insert mode</td>
465</tr>
466<tr class="row-even"><td>:w!</td>
467<td>save: write the contents back to the file
468but do not quit <tt class="docutils literal"><span class="pre">vi</span></tt> yet.</td>
469</tr>
470<tr class="row-odd"><td>:q!</td>
471<td>quit: Leave the program.  If you have not
472saved first with <tt class="docutils literal"><span class="pre">:w!</span></tt>, your changes
473will be lost &#8211; forever.
474This is how you do a <em>cancel - no save</em>.</td>
475</tr>
476<tr class="row-even"><td>ZZ</td>
477<td>save and quit</td>
478</tr>
479</tbody>
480</table>
481</div>
482</div>
483</div>
484
485
486          </div>
487        </div>
488      </div>
489      <div class="clearer"></div>
490    </div>
491    <div class="related">
492      <h3>Navigation</h3>
493      <ul>
494        <li class="right" style="margin-right: 10px">
495          <a href="genindex.html" title="General Index"
496             >index</a></li>
497        <li class="right" >
498          <a href="py-modindex.html" title="Python Module Index"
499             >modules</a> |</li>
500        <li class="right" >
501          <a href="epics/index.html" title="EPICS IOC support documentation"
502             >next</a> |</li>
503        <li class="right" >
504          <a href="contents.html" title="Contents"
505             >previous</a> |</li>
506        <li><a href="index.html">epicsdf 1.0 documentation</a> &raquo;</li>
507          <li><a href="contents.html" >Contents</a> &raquo;</li> 
508      </ul>
509    </div>
510    <div class="footer">
511        &copy; Copyright 2011, Pete Jemian.
512      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
513    </div>
514  </body>
515</html>
Note: See TracBrowser for help on using the repository browser.