source: pvrrd/doc/source/usage.rst @ 624

Last change on this file since 624 was 624, checked in by jemian, 12 years ago

converted documentation into initial sphinx documentation -- most code modules need better docstrings

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author HeadURL Id
File size: 3.7 KB
Line 
1.. $Id: usage.rst 624 2011-08-21 20:15:37Z jemian $
2
3Adding EPICS Process Variables
4------------------------------------------------------------------
5
6The EPICS Process Variables to be logged are
7entered in the ``pvlist.xml`` file.  Follow the
8pattern for the other entries in that file.
9Here is an example::
10 
11  <EPICS_PV pv="S:SRcurrentAI" units="mA" min="-0.1" max="310" scale="lin">
12    APS storage ring current, mA
13  </EPICS_PV>
14  <EPICS_PV pv="33bmPLC:alarm:cg1:vac"
15      units="Torr" min="1e-5" max="2000" scale="log">
16    33BM DCM convectron gauge vacuum
17  </EPICS_PV>
18
19Updating EPICS PVs into RRD databases
20------------------------------------------------------------------
21
22:note: TODO: APS server now has the necessary parts.  Revise the docs.
23
24RRD needs some more parts (database and graphing scripts)
25to be built before plots will be available on the WWW.
26Documentation on how those parts are
27created has not yet been written.  Until then,
28examine :mod:`rrdCreate` and :mod:`cgiCreate`
29for hints.
30
31Generating plots of logged data
32------------------------------------------------------------------
33
34The APS XOR WWW server is configured for RRDTOOL support
35to generate the plots on demand from their associated RRD databases.
36The plots will only be generated on demand from a
37web browser request, and then only
38as needed by the time-granularity of the plot.
39Thus, the plots will not be re-generated unless necessary.
40
41Until the XOR WWW server had rrdcgi capability, the plots and HTML pages
42were generated by calling rrdcgi directly from a command-line job.
43The Python program ``htmlCreate.py`` generated
44all HTML pages and related plots from the set of CGI scripts.
45It was run from a UNIX cron job.  This is no longer used.
46
47RRDtool support was added to the WWW server in July 2010.
48The WWW server needs to identify the CGI files by suffix.
49Appending ``.cgi`` to all the CGI files will allow the files
50to be properly identified and rendered.  (tested and works)
51
52The plots directory needs to be writable by the WWW server
53user (nobody) and have the group sticky bit set
54
55Configuration of the infrastructure
56------------------------------------------------------------------
57
58:note: under construction
59
60It is necessary to understand UNIX command shell scripts,
61EPICS PV communications, php,
62Python, rrdtool, and WWW servers to configure the
63infrastructure of this support.
64
65crontab configuration
66^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
68A cron job is used to keep the software running.
69This avoids an unprivileged user from needing root access to modify
70the OS startup configuration.  This file will need to be edited
71for the proper path to the installed directory::
72
73          #     field          allowed values
74          #     -----          --------------
75          #     minute         0-59
76          #     hour           0-23
77          #     day of month   1-31
78          #     month          1-12 (or names, see below)
79          #     day of week    0-7 (0 or 7 is Sun, or use names)
80 
81  # make sure that EPICS --> RRD monitor tool is running, check every 5 minutes
82  # solaris cron does not support */5 notation from linux cron
83    10,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/joule/WEB33/www/rrd/checkup-epics2rrd.csh 2>&1 /dev/null
84
85assets
86^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
88These are the assets as configured for one particular installation::
89
90   cgi/                      (ignored by SVN)
91   data/                     (ignored by SVN)
92   html/                     (no longer needed)
93   other/
94   plots/                    (ignored by SVN)
95   checkup-epics2rrd.csh
96   cgiCreate.py
97   epics2rrd.csh
98   epics2rrd.log
99   epics2rrd.pid
100   epics2rrd.py
101   htmlCreate.py            (no longer needed)
102   index.php
103   Makefile
104   makeTagHTML.py
105   documentation.html
106   rrdCreate.py
107   xmlSupport.py
108   properties.xml
109   pvlist.xml
110
111   leo% svn pg svn:ignore .
112   xref.txt
113   plots
114   cgi
115   html
116   data
117   *.log
118   *.pyc
Note: See TracBrowser for help on using the repository browser.