COMPASSDCS - LOGBOOK 2012
INSTRUCTIONS
Login in the PC where SLiC for this crate is run (see SLiCs) as root.
>cd /home/SLiC
>source env.bash
Edit the file configInit.txt and add the necessary lines, following same scheme.
This is necessary only if a new board is inserted in a crate already existing in the config, or if a new crate is included.
If there are many new channels, it may be also necessary to edit configParams.txt and increase the cycle times. There are 3 cycles:
Fast (vMon, iMon, Status)
Medium (readback items: v0, i0, etc.)
Slow (crate parameters like CAENET ID, #channels, etc.)
Generate new config files:
>./generateConfigurations.pl configParams.txt configInit.txt config.txt dimMap.txt
Start SLiC:
>./SLiCApp ./config.txt ./ ./dimMap.txt > /dev/null&
(Or according to SLiCs if there is a 2nd SLiC on PC)
Identify first which is the SLiC/DIM to which these channels belong. For each SLiC/DIM there is an internal
datapoint_fwDimDefaultConfig#
(of type _FwDimConfig) where the mapping SLiC items ↔ PVSS dp elements is
stored (in client services and client commands elements).
Check which fwDimDefault is being used as default. For this, go to the Framework directory and edit the script:
>cd /dcs/packages/jcop_fw/scripts/libs/fwDevice
>pico fwDevice.ctl
and search fwDimDefault If necessary, change the default to the one that will take the new channels. Save.
From startConsole, start the control manager fwScripts.lst, so that the new fw default to DIM is used (this script will die after few seconds, which is normal).
Now open the FwDeviceEditorNavigator in vision mode (do not forget to change owner of the UI from the default operator to root first).
Add the channels under CAEN and the good crate, in the hardware view.
Confirm, from the para module, that the correct fwdimdefaultConfig# now contains mapping for the new channels, in clientServices and client Commands.
If adding channels in a SY527, you must delete by hand, from the para module, the items (.pw) from the list of ClientServices.
Add the new channels also in the logical view, at FwDeviceEditorNavigator.
Go to the scripts directory (> /dcs/home/scripts) and edit the SumAlerts_on_nodes.ctl, and modify as needed in nodes and channels. Run the script with:
>./runctl SumAlerts_on_nodes.ctl
This is to propagate correctly the sumAlerts to buttons in the panels.
Go to the corresponding project panel and check that the added channels are appearing in the table and updating.
Now put the .isOn alert on the new channels. For this, on a GEDI, open the panel teste_onoffcaen.pnl. Run this panel to propagate the alerts by clicking in the teste button.
Now the channels should be correctly displayed and updating. If not, stop and restart the corresponding DimApiManager.
Go to pccompass06.
Check if the OPC manager 8 is stopped or blocked (state 3 - purple color).
In case it is blocked, select the manager and do a "forced kill" with the mouse (right button).
Then, go to task manager, look for:
"ISEGHV~1.EXE" (if you find it, do select and "end process").
Once you have killed the server, the OPC DA client should restart it automatically in few seconds.
When the DIMs
are stopped or started, from the DCS panel of the project, there is no effect on
the SLiCs. To start or stop SLiCs
one must login as root in the corresponding linux PCs, and do it by hand (by killing the SLiC process).
If in pccompass07 CAEN HV tables show the purple color in all fields (v0, vMon, iMon) and if DIMs are running (check in the DCS
panel of the project) and dns is running (check in the prompt of a terminal window, with command >ps ef | grep dns) it probably
means that SLiC is stopped.
> ipcs
> ipcrm sem [sem ID]
> cd /home/SLiC
> source env.bash
> cd /home/beharrel/project/HSCAENET/driver
> ./a1303_load.2.6
> ssh -l root pclip05
> cd /home/SLiC
> source env.bash
>./ SLiCapp ./config.txt ./ ./dimMap.txt >/dev/null &
> ssh -l root pclip010
> cd /home/SLiC
> source env.bash
CAENET#2: > ./ SLiCapp ./config.txt ./ ./dimMap.txt >/dev/null &
CAENET#3: > ./ SLiCApp ./config2ndSLiC/config.txt ./ ./config2ndSLiC/dimMap.txt &
> ssh -l root pclip07
and same as for pclip05
> ssh -l root pclip09
and same as for pclip010
Login in pclip06 (or other Linux PC where the problem appears) as root
From a terminal window, start the security configuration program, by doing
> redhat-config-securitylevel-tui
Go to the config option
Allow eth0 and ssh
Explicitly allow ports for PVSS and utpd ports: 4998, 4892, 2506
Ok it to exit & saving, and restart iptables and ntpd by doing
> /sbin/service iptables restart
> /sbin/service ntpd restart (at this step, some ntpd failed messages appear)
> more /et/sysconfig/iptables
4998:tcp,4892:tcp,2506:tcp,7001:udp,3551:tcp,502:tcp
CAN Bus |
Client |
Server |
PC |
WIENER_CAN1 |
OPC DA Client 19 |
WienerOPCServer2 |
pccompass06 |
WIENER_CAN2 |
OPC DA Client 11 |
WienerOPCServer |
pccompass08 |
WIENER_CAN3 |
OPC DA Client 20 |
WienerOPCServer3 |
pccompass03 |
|
|
A 4
B 0
C F
D 7
E 4
Login in pccompass07 as compassdcs
> cd /dcs/projects
The DCS project is the contents of the subdir compassdcs.
Start a project administration PVSS console:
> startPA
Select the project we want to stop (compassdcs) and use the red semaphore to stop it. When the status of the project will be not running, close the PVSS admin console
> ps ef | grep pvss
This command must answer nothing (except for the grep PVSS issued), proving that no more PVSS processes are running.
> ps ef | grep lm Usually the PVSS locker is not killed when PVSS stops (bug).
If this command answer with a line: 500 [id] 1 0 [time]? [time] /dcs/pack/lm-ip a lockmgr you must kill this process by hand:
> kill [id]
Issue the ps command again, to be sure the locker was killed.
In the following directories, remove old versions of files:
/dcs/home/panels
/dcs/home/panels/objects
/dcs/home/log
By issuing the command (when inside the given directory):
> rm *.*.bak (the .bak is essential! Do not delete all the content of the dir by mistake!!!)
> cd /dcs/projets
> gtar --atime-preserve cvf comp07-copy[date].tar compassdcs/*
> gzip comp07-copy[date].tar
> mv comp07-copy[date].tar.gz /dcs_Backup/offline_backups/
Restart the PVSS project from the admin console. Check in the project console that all the important managers are started (some important ones may be in manual start mode).
Start a dcsUI , go to the DCS panel, and start the remote OPCs and DIMs.
This concerns the reading of the magnetic field from SM2, that can be viewed in the DCS from the "Magnets button".
The NMR meter is in the control room, after the DAQ computers. It is connected via RS232 (serial) to pccompass07.
The reading is done using the port /dev/ttyS3, which must have the necessary permissions (777).
The program to read from the port is in the directory:
/dcs/packages/compass/nmr/bpi
and is called readout_NMR. this program must be running at all times (during Run) in compass07.
Check if the program is running with the command:
> ps -ef|grep readout
This program runs interactively, in a virtual scream. To enter the virtual screen (readout), do:
> screen -r
By doing this, you regain the view of the virtual screen. You should see the program printing text to the screen, with a new value every few seconds.
To detach from the virtual screen, do: ctrl -a d
Do not logout before detaching from the virtual screen first. It would kill the program.
In case the program is stopped: as "compassdcs" do:
Reattach to the screen with > screen -r, if it still exists. If not, type simply > screen
You should see the prompt in the virtual screen. Then type:
> ./readout_NMR
The program starts running.
Detach from the virtual screen with ctrl -a d
Logout from "compassdcs" and eventually login again as "dcs" for normal operation.
On the PVSS side, start the manager PVSS00nmr from the console.
Check that the values in the "Magnets" panel start updating.
Switch on the PC.
Login as compassdcs and start the DIM NAME SERVER
> cd /dcs/packages/dim/linux
> dns &
Also from terminal window:
> startConsole
user: root
pw: as for system superuser
It enters the compassdcs project. Start the project from the green semaphore on top.
Check that all the important managers are started:
data
RDB Archive Manager
event
control1 (pvss_scripts.ctl)
simulation1
Distribution Manager
simulation13
dim1
dim2
dim3
dim4
dim5
dim5
dim6
dim11
control Compass_Survey.ctl
control smsTrigger.ctl
control SetTime.ctl
control hvChIsOnGuardian.ctl
control RF_WDP0.ctl
control Pixel_Lv_Stations_Status.ctl
control DIP_Status.ctl
control Ecal1_Hv_Laser_isOn.ctl
dip7
nmr (see how to stop/start the reading of SM2 magnetic field from NMR meter)
control RF_WPD0.ctl (first, start /dcs/packages/compass/mmdc/HTLoopTest from a "screen", like for nmr monitoring)
Once the project is started, close all windows, logout, login again as dcs → pw as old onl.
From a terminal window, do > dcsUI, with PVSS login operator (without password).
Go to the dcs panel in the project, start all the OPC managers, and DIMs if not yet started.
Check if sound volume is OK.
If the power cut affected pccompass04, one also needs to login to it as compassdcs, start the PVSS project (after the one of pccompass07), and start the managers running EcalScript.ctl, ScalersScript.ctl, TargetOracleScript.ctl, TargetMySQLScript.ctl, DipoleFieldOracleScript.ctl and PhysicsTriggersScript.ctl.
If you are in a Linux PC:
Login to a compass gateway (pccogw01 or pccogw02) with you afs account. From there launch: (ex: rdesktop pccompass06)
Log in to the COMPASS gateways (pccogw01 or pccogw02) with your personal afs account.
Set command: > ssh -l daq pccorc11 (no password required)
Set command: > add_comment (this will launch an application)
In the X application fill the required field with:
your name
detector (choose slow control from the listbox)
write comment
submit
A DIM server is running in a DAQ machine, and sending data to compass07
The DIM api manager for this reading is -num11
To check if the values are updating, go to the panel "DAQ" and "Temperatures"
If the PVSS main project (in pccompass07.cern.ch) loses communication with the Oracle DB where it stores its data (comp_pvss@compr), it sends an SMS to the DCS on-call mobile phone, and a time alarm "RDB_99: TimeAlarm" is displayed in the DCS main panel. If this alarm persists and one can't see historical data in the trending plots, try to find out if there is a network problem (with shift crew, DAQ expert or, ultimately, the helpdesk service), or a DB problem (with Dawid Wojcik or Maria Girone, from the Physics Databases Services).
Check the logs to find out when the problem started by typing, as compassdcs, e.g.
> tail -50 /dcs/home/log/PVSS_II.log
To check the connection to the DB, write, in the command line, as compassdcs,
> sqlplus comp_pvss@compr
At this point, open the Console of PVSS, as compassdcs:
> startConsole
If the line of the RDB manager is showing a "3" in purple, the manager is in a blocked state. Wait for brief minutes to see if it recovers by itself (green color, code "2"). If not, send a "kill" command to the manager by selecting its line with the mouse and pressing the second red button on the right of the Console window. The manager should then restart by itself. Check that the trends show historical values again.
N.B.: The names of the IT machines to which the PVSS project is connected can be checked with
> netstat | grep itrac