1 | .. $Id: usage.rst 624 2011-08-21 20:15:37Z jemian $ |
---|
2 | |
---|
3 | Adding EPICS Process Variables |
---|
4 | ------------------------------------------------------------------ |
---|
5 | |
---|
6 | The EPICS Process Variables to be logged are |
---|
7 | entered in the ``pvlist.xml`` file. Follow the |
---|
8 | pattern for the other entries in that file. |
---|
9 | Here 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 | |
---|
19 | Updating EPICS PVs into RRD databases |
---|
20 | ------------------------------------------------------------------ |
---|
21 | |
---|
22 | :note: TODO: APS server now has the necessary parts. Revise the docs. |
---|
23 | |
---|
24 | RRD needs some more parts (database and graphing scripts) |
---|
25 | to be built before plots will be available on the WWW. |
---|
26 | Documentation on how those parts are |
---|
27 | created has not yet been written. Until then, |
---|
28 | examine :mod:`rrdCreate` and :mod:`cgiCreate` |
---|
29 | for hints. |
---|
30 | |
---|
31 | Generating plots of logged data |
---|
32 | ------------------------------------------------------------------ |
---|
33 | |
---|
34 | The APS XOR WWW server is configured for RRDTOOL support |
---|
35 | to generate the plots on demand from their associated RRD databases. |
---|
36 | The plots will only be generated on demand from a |
---|
37 | web browser request, and then only |
---|
38 | as needed by the time-granularity of the plot. |
---|
39 | Thus, the plots will not be re-generated unless necessary. |
---|
40 | |
---|
41 | Until the XOR WWW server had rrdcgi capability, the plots and HTML pages |
---|
42 | were generated by calling rrdcgi directly from a command-line job. |
---|
43 | The Python program ``htmlCreate.py`` generated |
---|
44 | all HTML pages and related plots from the set of CGI scripts. |
---|
45 | It was run from a UNIX cron job. This is no longer used. |
---|
46 | |
---|
47 | RRDtool support was added to the WWW server in July 2010. |
---|
48 | The WWW server needs to identify the CGI files by suffix. |
---|
49 | Appending ``.cgi`` to all the CGI files will allow the files |
---|
50 | to be properly identified and rendered. (tested and works) |
---|
51 | |
---|
52 | The plots directory needs to be writable by the WWW server |
---|
53 | user (nobody) and have the group sticky bit set |
---|
54 | |
---|
55 | Configuration of the infrastructure |
---|
56 | ------------------------------------------------------------------ |
---|
57 | |
---|
58 | :note: under construction |
---|
59 | |
---|
60 | It is necessary to understand UNIX command shell scripts, |
---|
61 | EPICS PV communications, php, |
---|
62 | Python, rrdtool, and WWW servers to configure the |
---|
63 | infrastructure of this support. |
---|
64 | |
---|
65 | crontab configuration |
---|
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
67 | |
---|
68 | A cron job is used to keep the software running. |
---|
69 | This avoids an unprivileged user from needing root access to modify |
---|
70 | the OS startup configuration. This file will need to be edited |
---|
71 | for 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 | |
---|
85 | assets |
---|
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
87 | |
---|
88 | These 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 |
---|