Project

General

Profile

Conventions and Tools » History » Version 27

Keith Matera, 05/10/2016 01:25 PM

1 1 Peter Shanahan
h1. Conventions and Tools
2 1 Peter Shanahan
3 1 Peter Shanahan
h2. Overview
4 1 Peter Shanahan
5 1 Peter Shanahan
The user interface environment to the DAQ system is hosted in VNC servers running on DAQ cluster computers at various sites.  Users interact with these via VNC viewers hosted on control room desktops, and for experts, on their own desktop or laptop.  
6 1 Peter Shanahan
7 3 Peter Shanahan
The NovaControlRoom package contains icons and scripts to automatically set up the needed ssh tunnels, and launch the VNC viewers.  See "docdb-8406":http://nova-docdb.fnal.gov:8080/cgi-bin/RetrieveFile?docid=8406;filename=UsingDesktopVNCIcons.pdf for a User's Guide.
8 1 Peter Shanahan
9 9 Peter Shanahan
h3. VNC Servers
10 9 Peter Shanahan
11 11 Peter Shanahan
To set up VNC servers for the control room, see the [[VNCSetup| VNC Setup How-To]].
12 10 Peter Shanahan
13 10 Peter Shanahan
h3. VNC Viewers
14 10 Peter Shanahan
15 10 Peter Shanahan
16 10 Peter Shanahan
The command to start a viewer is including in the script launched by the desktop icons described in the User's Manual mentioned above, but the underlying command is of the form
17 10 Peter Shanahan
<pre> vncviewer -Fullscreen -Shared -passwd ~/.vnc/passwd :<NN> </pre>
18 10 Peter Shanahan
where
19 10 Peter Shanahan
<pre> -Fullscreen # starts in full screen mode
20 10 Peter Shanahan
 -Shared # keeps other users from getting disconnected from the server when you connet
21 10 Peter Shanahan
 NN # two-digit port number (relative to 5900) </pre>
22 9 Peter Shanahan
23 13 Peter Shanahan
h2. Conventions
24 1 Peter Shanahan
25 4 Peter Shanahan
h3. VNC Servers
26 4 Peter Shanahan
27 26 Keith Matera
In the current model (as of 2016-05-10), we employ 2 VNC servers for each detector.  In order to allow for different desktop environments on a single host machine, each VNC server on is run under a different account, using a dedicated port.  We tend to use certain servers for particular functions, but this is subject to change.
28 1 Peter Shanahan
29 27 Keith Matera
The table below gives the VNC server host name used for each system:
30 1 Peter Shanahan
31 27 Keith Matera
| *Abbreviation* | *Host* | *Used in standard ROC?* |
32 27 Keith Matera
| NDOS | novadaq-ctrl-master | No |
33 27 Keith Matera
| NDSBTest | novadaq-ctrl-master | No |
34 27 Keith Matera
| FarDet | novadaq-far-master-02 | Yes |
35 27 Keith Matera
| NearDet | novadaq-near-master | Yes |
36 27 Keith Matera
| NearGateway | novadaq-near-gateway-01 | Yes |
37 27 Keith Matera
38 27 Keith Matera
(See [[novadaq_apdtest:]] for more information on NDSBTest)
39 27 Keith Matera
40 27 Keith Matera
The next table gives machine, account, and port information for each of the six stations used at a Remote Operation Center (ROC):
41 27 Keith Matera
42 27 Keith Matera
| *Station* |*Functions* | *Host* | *Account* | *Remote Port*| *Local Port* |
43 1 Peter Shanahan
| 1 | FD Run Control
44 27 Keith Matera
    Message Logger | FarDet | novacr01 | 5951 | 5981 |
45 1 Peter Shanahan
| 2 | FD Event Display
46 1 Peter Shanahan
  Online Monitoring
47 27 Keith Matera
  APD Cooling GUI  | FarDet | novacr02 | 5952 | 5982 |
48 27 Keith Matera
| 3 | Synoptics | NearGateway | novacr03 | 5902 | ???? |
49 26 Keith Matera
| 4 | Camera pages
50 27 Keith Matera
   beam pages | See | webpage | described | below |
51 9 Peter Shanahan
| 5 | ND Run Control
52 27 Keith Matera
    Message Logger| NearDet | novacr01 | 5951 | 5991 |
53 1 Peter Shanahan
| 6 | ND Event Display
54 1 Peter Shanahan
  Online Monitoring
55 27 Keith Matera
  APD Cooling GUI | NearDet | novacr02 | 5952 | 5992 |
56 1 Peter Shanahan
57 1 Peter Shanahan
The servers for each of these is set up to occupy a 2x2 monitor grid, with total pixel count 3840x2160. 
58 1 Peter Shanahan
59 1 Peter Shanahan
Two VNC servers run on the nova-daq-04 Control Room desktop in the Fermilab 1st floor control room, hosting webcam displays. From off-site, webcam and beam pages can be found on the "What to do on Shift links":http://nusoft.fnal.gov/nova/shift/links/ site.
60 1 Peter Shanahan
61 27 Keith Matera
This last table gives machine, account, and port information for all VNC sessions, including those not currently in use by a standard Remote Operation Center:
62 1 Peter Shanahan
63 27 Keith Matera
| *Machine* |*Remote Port* | *Local Port* | *ROC standard?* |
64 27 Keith Matera
| NDOS | 5951 | 5961 | No |
65 27 Keith Matera
| NDOS | 5952 | 5962 | No |
66 27 Keith Matera
| NDOS | 5953 | 5963 | No |
67 27 Keith Matera
| NDSBTest | 5955 | 5971 | No |
68 27 Keith Matera
| NDSBTest | 5956 | 5972 | No |
69 27 Keith Matera
| NDSBTest | 5957 | 5973 | No |
70 27 Keith Matera
| FarDet | 5951 | 5981 | Yes |
71 27 Keith Matera
| FarDet | 5952 | 5982 | Yes |
72 27 Keith Matera
| FarDet | 5953 | 5983 | No |
73 27 Keith Matera
| NearDet | 5951 | 5991 | Yes |
74 27 Keith Matera
| NearDet | 5952 | 5992 | Yes |
75 27 Keith Matera
| NearDet | 5953 | 5993 | No |
76 27 Keith Matera
| NearGateway | 5902 | ???? | Yes |
77 25 Keith Matera
78 27 Keith Matera
Note that VNC has a port base of 5900.  However, in addition to the VNC connection itself, it also uses a port for the X11 connection 100 higher than the VNC port.  Since general X11 connections use ports starting at 6010, and assuming less than 40 open connections is a safe bet, a good assumption for VNC port ranges that avoid conflicts with X11 would be 5900-5909 and 5950-5999.  
79 25 Keith Matera
80 25 Keith Matera
h3. ssh Tunnels
81 25 Keith Matera
82 25 Keith Matera
ssh tunnels are required to access the port for a VNC server on a remote host (e.g., novacr01@novadaq-ctrl-master.fnal.gov for station 1 on NDOS) from a localhost (e.g., your laptop, or a control room desktop).  Once launched, the tunnel can remain active indefinitely.  The ssh command has the form
83 25 Keith Matera
<pre>ssh -L <local_port>:localhost:<remote_port> -N -f -l <remote account> <remote host> </pre> 
84 25 Keith Matera
The ssh tunnel is authenticated using a kerberos ticket on the localhost, usually for a special use (i.e., non-personal) principle.  That principle must be in the k5login file for the remote account, and the remote host must be directly reachable from the localhost (i.e., the localhost must be in the fnal.gov domain.)
85 25 Keith Matera
86 25 Keith Matera
Since a single desktop will often have connections to the "same" display on multiple detectors, we need to have localhost port assignments vary by detector.  The scheme in use by the NovaControlRoom package is
87 19 Eric Flumerfelt
88 20 Eric Flumerfelt
89 19 Eric Flumerfelt
90 19 Eric Flumerfelt
h2. Example
91 19 Eric Flumerfelt
92 19 Eric Flumerfelt
*EXPERTS ONLY*
93 19 Eric Flumerfelt
On Windows, using RealVNC Viewer (renamed to vncviewer.exe), MIT Kerberos for Windows, and plink; the following batch file (FarDet1.bat) connects to the first screen of the Far Detector:
94 19 Eric Flumerfelt
Start plink -ssh -L 5981:localhost:5981 <Principal>@<Gateway> "ssh -L 5981:localhost:5951 -N novacr01@novadaq-far-master-02.fnal.gov"
95 1 Peter Shanahan
pause
96 1 Peter Shanahan
start vncviewer -Shared -passwd passwd localhost:81
97 1 Peter Shanahan
98 1 Peter Shanahan
passwd is a file with the MD5'd VNC viewer password, and <Gateway> is a machine connected to the Fermilab network accessible from the outside. Using the tables above, it is possible to connect to any detector/station combination.