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

Last change on this file since 616 was 616, checked in by jemian, 11 years ago

refinements based on actual installation experience

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