Project

General

Profile

FNAL MC-1 Setup / Instructions

IP addresses of Machines

g2gateway01.fnal.gov (131.225.246.25) and internal: 192.168.30.1
-- this is the machine that can be accessed from outside of FNAL and the springboard to the g2trackerX machines.
This is kerberised and you log into it via the "G2Muon" account.

g2tracker0.fnal.gov (131.225.246.42/eth3) and internal: 192.168.30.115/eth0 and the AMC-13 fiber: 192.168.41.1/eth5
-- this is the DAQ frontend machine that is in the counting room and will have the tracker software installed. The /home/daq area is NFS exported to the other g2tracker1,2,3 severs in the ring..
This is kerberised and you log into it via the "daq" account.

g2tracker1.fnal.gov (131.225.246.43) and internal: 192.168.28.2
-- this is the 1u server in the rack by the 10 o'clock tracker.
One can log into the directly from g2tracker0 via "ssh daq". root is our favourite dish.

Here are some useful entries for ~/.ssh/config

Host                 gm2gateway 
HostName             g2gateway01.fnal.gov
User                 G2Muon

Host                 g2tracker0
HostName             g2tracker0.fnal.gov 
User                 daq
ProxyCommand         ssh -W %h:%p gm2gateway

Host                 gm2straw6 
HostName             gm2straw6.fnal.gov
User                 gm2

Host gm2gateway g2tracker0 gm2straw6 gm2straw7
GSSAPIAuthentication yes
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
GSSAPIDelegateCredentials yes

SSH Connections

Connect direct to g2trackerX via the gateway using the above ~/.ssh/config

ssh g2tracker0  # to connect to g2tracker0
ssh g2tracker0 -t ssh g2tracker1 # to connect to g2tracker1
ssh gm2gateway -t ssh g2tracker1-priv # to connect via password and the daq account if g2tracker0 is down

Proxy Connections to the web displays

ssh -nNT gm2gateway -L 3434:g2tracker0-priv:3344 -L 8181:g2tracker0-priv:8080 -L 5001:g2tracker0-priv:5002

Such that http://localhost:3344 is the DQM; http://localhost:8080 is the Tracker MIDAS; http://localhost:5001 is the HV/Vacuum/Gas/Water/Slow Control DB Monitor

RPC Connections

In order for the RPC connections to work over the 192.168 (-priv) network, /etc/krb5.conf was amended with two extra dns lines:

   allow_weak_crypto = true

# Extra two lines for RPC to work over -priv network
  dns_lookup_realm = false
  dns_lookup_kdc = false
#

[realms]
        FNAL.GOV = {

VNC Client connection

Create an SSH tunnel to the VNC port (5901 for display 1, 5902 for display 2) on g2tracker0 so that you can run firefox directly on g2tracker0 through the VNC client

ssh -t -L 5901:127.0.0.1:15901 gm2gateway ssh -L 15901:127.0.0.1:5901 g2tracker0
open vnc://localhost:5901 # password is alpha_2pi and this connects to display #1 and should open firefox in the VNC window

The VNC server should start at boot on g2tracker0 but can be started by hand via:

vncserver  :1

If there are multiple VNC sessions and each want to use firefox then spawn firefox via the terminal using

browser # this is a bash alias to the command: firefox --ProfileManager

then select either a different profile or make a new one then load firefox with this new profile.

IP addresses of mTCA cards

AMC13: 192.168.27.13 and 192.168.27.14
MCH: 192.168.27.15 (10/100 IP is not enabled)
FC7-2: 192.168.27.242 (slot 4, mac address: 00:0a:35:01:ea:f3)
FC7-1: 192.168.27.243 (slot 8??, mac address: ????)

Tracker DAQ software on g2tracker0

This is in:

/home/daq/tracker/online

and this is NFS exported to /home/daq on g2tracker1.

Database

The ODB is presently configured to use the postgres DB. One can connect directly to it via:

psql -U gm2_reader -d gm2_online_prod -h g2db-priv -p 5433

The connection string in DBase.cc is:

"pgsql://g2db-priv:5445/gm2_online_prod","gm2_writer","gm2_4_writer" 

More connection details are here

DQM

Instructions for running the DQM:

  • Start server on g2tracker0 : this converts from MIDAS to ART and pushes ART records to a socket

daqs
start-DQMServer.sh

  • Start a client : this reads ART records from the socket, makes the histos and publishes them to a webserver.

daqs
start-DQMClient.sh

Both of these start-DQMXXXX.sh commands are in: gm2trackerdaq/software/bin. They setup the offline, cd to the appropriate directory and run the gm2 command.

  • To run in offline mode

ssh g2tracker0
dqmfcl # this is a bash function that does: cd /home/daq/tracker/offline; source setup.sh; cd gm2Dev_v7_04_00/srcs/gm2dqm/art/fcl
gm2 -c TrackerDQMOfflineServer.fcl -s run_n.mid.gz

HV Logger

On g2tracker0

daqs
start-HVmonitors.sh # This runs the two HV monitors in a "screen" that gets the HV values via the serial /dev/ttyUSB and has to run on g2tracker1

Gas/Water and HV web display

On g2tracker0

daqs
start-WebMonitor.sh # This starts the webserver displaying the results and they go to: http://g2tracker0-priv:5002

There is a config file per tracker i.e. config_0.py, config_1.py, config_2.py -- the appropriate one gets loaded based on the hostname ie g2tracker1 loads config_2.py for tracker=2.

This will go over all the channels you listed in the config file and read them from the two HV crates. This is then displayed on the webpage.

Gas/Water Bubbler Images

These are controlled via cronjobs running on g2tracker2-priv and g2tracker-3 priv that create the html and png images displayed by the web monitor.

ssh g2tracker0 -t ssh g2tracker1
daq; cd ../../webcam
crontab webcam.crontab

List of processes / screens that should be running

g2tracker2/3
- webcam cron job : test with crontab -l

g2tracker0
5 screens:

xxxx.StrawTrackerDQMClient
xxxx.StrawTrackerDQMServer
xxxx.StrawTrackerWebMonitor
xxxx.StrawTrackerHVMonitorC10
xxxx.StrawTrackerHVMonitorC7

g2be1
5 screens:
xxxx.StrawTrackerDAQ
xxxx.StrawTrackerLVandSC02
xxxx.StrawTrackerLVandSC03
xxxx.StrawTrackerHV02
xxxx.StrawTrackerHV03