SCU's for the power converters used at the magnet test stations

2024-04-25

The SCU's at the test station are SCU's as they will be used in the FAIR machine. These boot from the network and use the standard image. If the proper link is set for the particular SCU the powerconverter.sh init script is executed. This will then load the files relevant for the power converter.

SCU boot process

On asl machines (eg. asl731.acc.gsi.de) there is a directory for each SCU (named scuxl plus a 4 digit number, eg. 0063)
asl731: /common/export/nfsinit/scuxl0063/

During the SCU boot process, this directory is mounted on the SCU as
scuxl0063: /opt/nfsinit/scuxl0063/

and all executables (scripts and links) in this directory are executed (but subdirectories are not included).
(Please be aware: if one of the executables or scripts does not stop, the boot process will not finish. The initialisation of the SCU's used for controlling the power converter is based on this process.)

The following executables are needed for a correct initialization: 3 links and a script (in /common/export/nfsinit/scuxl0063/ ):
  • The script powerconverter_inc.sh (must be created or copied from another SCU) and defines the type:
# include for startup ... must be installed in any SCU which is used for
# operating a power converter for testing the superconducting magnets
POWER_CONVERTER_TYPE=pc_20_kA_STF_1
POWER_CONVERTER_DESCRIPTION="20 kA Power converter at STF: No. 1"
  • 3 Links will call scripts on a higher level, which are needed to initialize the SCUs. If the links are no present, they must be set with
[asl731: /common/export/nfsinit/scuxl0063] $ ln -s ../global/etherbone 20_etherbone
[asl731: /common/export/nfsinit/scuxl0063] $ ln -s ../global/fesa 50_fesa
[asl731: /common/export/nfsinit/scuxl0063] $ ln -s ../global/powerconverter 60_powerconverter

The first two links are needed for communication with ACU, but details arew unknown. The 3rd link will finally (after 5 steps in between) execute a script which one can read/modify in
asl731: /common/export/powerconverter/powerconverter_exec.sh

The outputs of this script are saved on the particular SCU on it's file system in the file
scuxl0063: /var/log/powerconverter_startup_script_exec.txt

Details: 60_powerconverter -> ../global/powerconverter -> ../global/generic. is mounting

asl731: /common/export/powerconverter/

as

scuxl0063: /opt/powerconverter/

and will execute there powerconverter.sh which will execute powerconverter_exec.sh. Afterwards, the dirctory opt/powerconverter/ is dismounted again.


The SCU's are booted from network. During the boot up process all executables (binaries and scripts if executable bit is set) in the nfsinit directory of the SCU will be executed. Here a link (set with $ ln -s ../global/powerconverter 60_powerconverter )
asl731: /common/export/nfsinit/$SCUNAME/60_powerconverter -> ../global/powerconverter

has to be found. This script will mount temporarily the directory

/common/export/powerconverter

and execute the script

 /common/export/powerconverter/powerconverter.sh

which will in turn execute the script

 /common/export/powerconverter/powerconverter_exec.sh

For e.g. for the SCU with name scuxl0063 the following link has to be set:

 /common/export/nfsinit/scuxl0063/60_powerconverter -> ../global/powerconverter 

The outputs of this script are saved on the particular SCU on it's file system in the file

/var/log/powerconverter_startup_script_exec.txt

Files structure on the asl cevelopment cluster

The power converters of the test stations will use an SCU as controller. The files relevant for these power converters are found at

/common/export/powerconverter

at the development server.

Boot process changes made on the SCU

During the boot process:
  • The devices dev/mbs is set read write for the group users.
  • A user mole is added with the same user as the fesa user. This is required to handle files on scratch data
  • Various scripts and programs are copied to the SCU
  • Selected progams are set suid root so that they can lock themself into memory (done by powerconverter_exec.sh).

Substructure of /common/export/powerconverter/

Selected files of the directories scripts and bin will be copied to the SCU while the subdirectory usr will be copied completely to the SCU.

scripts

The sub directory scripts of the directory /common/export/powerconverter/ contains the following files:
  • files which will be copied to the SCU:
    • boot_finished.sh is used to display a message on the SCU display that the boot up has finished (really ?)
    • powerconverter_shutdown.sh is used to write to the SCU display when a shut down is requested
    • powerconverter_profile.sh global sh profile
    • ash_history copied to the history of the user mole
  • clear_logs.py can be used to delete empty log files the powerconverter.bin program has created.
Only the files given above are copied to the SCU's local directory.

bin

Only the program scu_display of the directory bin is copied to the SCU

usr

usr is intended as common place for files used regularly on the SCU. Therefore
  • The total tree usr is copied to /usr/local on the SCU.
  • The files /usr/local/bin and /usr/local/scripts are within $PATH on the SCU.
  • Please be aware that all programs using certain real time functions must be set suid root!
  • This can not be done on the file system of the file server but must be on the SCU. This should be typically executed during the boot process (see /common/export/powerconverter/powerconverter_exec.sh).
  • Currently /usr/local/bin/power_converter.bin is set suid root
/usr/local/bin/power_converter.bin is the binary executed by the different shell scripts. These are placed in /usr/local/bin/ because power_converter.bin found in the same directory will be executed.

development

The tree development is copied to /usr/development on the SCU. It is suggested that all programs under test are copied here, so that the production systems are not affected.

If e.g. the program /usr/development/bin/powerconverter.bin shall be used then the following commands have to be executed by the user root:
$ cp /usr/development/bin/powerconverter.bin /usr/local
$ chmod +s /usr/local/powerconverter.bin

Please be aware that these changes will last unitl the next reboot is executed.

Clearing log files

Das Programm powerconverter.bin legt log Dateien an. Diese sind auf dem Cluster unter /common/fesadata/scratch/$SCUNAME/log/ zu finden, wobei $SCUNAME mit dem Hostnamen der jeweilgen SCU zu ersetzen sind. Dateien, die leer sind oder nur einen Platzhalter enthalten, können mittels des Kommandos
$ python clear_logs.py

gelöscht werden. Warnung: diese Löschung erfolgt rekursiv über den gesammten Baum!

SCU Startup

Durch einschalten der SCU wird ein Startprozess aus gelöst. Dieser führt die Datei, die unter diesem Pfad auf dem Entwicklungscluster liegt
/common/export/powerconverter/powerconverter.sh

aus. Diese führt dann
/common/export/powerconverter/powerconverter_exec.sh

Während dieses ausgeführt wird, ist dieses Verzeichnis auf der SCU unter
BASESRCDIR=/opt/powerconverter/

zugänglich. Dieses Verzeichnis wird, nachdem das Script powerconverter.sh ausgeführt wurde, wieder ausgehängt.

Diese führt dann folgende Aktionen aus:
  • ändert das root Passwort, um eine Fehlbedienung zu vermeiden,
  • legt einen zusätzlichen user mole mit dem zugehörigen Passwort an.
  • und kopiert verschiedene Dateien auf die SCU (führt auch chmod +s aus), die benötigt werden
    • das Netzgerät zu steueren
    • das DISPLAY vom Script heraus anzusprechen.
    • Für den mole user wird ein vorgegebenes historyfile (scripts/ash_history) im home Verzeichnis abgelegt. Dies erlaubt dem user durch scrollen die typischen Kommandos des Netzgeräts abzurufen.
    • Ferner wird ein shut_down script installiert.

Das Script powerconverter_exec.sh führt auch die lokale Datei powerconverter_inc.sh aus. (Florian: "diese Datei gibt es nicht. Wir haben sie von Hand von einer anderen SCU rüberkopiert.). Diese muss zwei Variablen enthalten:
  1. den Typ
  2. und die Beschreibung
# include for startup ... must be installed in any SCU which is used for
# operating a power converter for testing the superconducting magnets
POWER_CONVERTER_TYPE=pc_20_kA_STF_1
POWER_CONVERTER_DESCRIPTION="20 kA Power converter at STF: No. 1"

Der Typ wird im Script /common/export/powerconverter/powerconverter_exec.sh behandelt. In einer case structure wird untersucht, ob dieser Typ bekannt ist. Wenn ja wird eine entsprechende Meldung (/etc/motd) installiert, damit der user beim login sieht, auf welchem Netzgerät er arbeitet.

Am Ende des boot-Prozesses wird der Erfolg oder Misserfolg auch am SCU Display angezeigt. Während des boot-Prozesses werden verschiedene Statusmeldungen in der Datei
/var/log/powerconverter_startup_script.txt

abgelegt. Diese kann man durch Einloggen auf der SCU einsehen. Wird die SCU heruntergefahren, wird dies am SCU Display angezeigt. Jeder diese Statusmeldungen:
  1. löscht zuerst das SCU Display
  2. schreibt als erste Zeile das momentane Datum:
    1. aktueller Monat (numerisch) gefolgt von einem '/'
    2. aktueller Tag
    3. aktuelle Stunde gefolgt von einem ':'
    4. aktuelle Minute
  3. und dann die Statusmeldung.

List of SCU's

Currently the following SCU'S are used
  • scucl0022 in the 300 A power converter of the STF (currently in the STF container office).
  • scuxl0032 in the 400 A power converter of the MU1 (Zora) Calibration Magnet (STF)
  • scuxl0064 in the 20 kA power converter 1 of the STF
  • scuxl0117 in the 20 kA power converter 2 of the STF
  • scuxl0063 in the 20 kA power converter at the PTF
  • scuxl0163 not connected (currently in the STF container office)
  • scuxl0176 not connected (currently in the STF container office)
  • scuxl0230 not connected (currently in the STF container office)

Adding a SCU for the power converters

  1. On the development cluster change to the NFS init directory of the SCU. It is subdirectory with the name of the SCU of the directory /common/export/nfsinit. So for the scuxl0063 it is the directory /common/export/nfsinit/scuxl0063/
  2. There make a link of the powerconverter script
  3. Add the powerconverter_inc.sh with the appropriate definitions
  4. Update the powerconverter_exec.sh script to handle the particular class of power converter if required.

$ln -s  ../global/powerconverter 60_powerconverter

SCU Einloggen

Die SCU bieten einen SSH login service an. Alle SCU's werden im Beschleunigernetzwerk acc.gsi.de betrieben. Der Name der SCU ist auf der Einschubleiste vermerkt. Zum Einloggen ergibt sich der Hostname: NAME_DER_SCU.acc.gsi.de

Zum Bsp.:
$ ssh user@scuxl0032.acc.gsi.de

Ein einloggender User wird nicht am SCU display angezeigt, da dies das Netzgerät stören könnte.

-- PierreSchnizer - 2016-11-15
Topic revision: r16 - 2018-03-08, FlorianKaether - This page was cached on 2024-04-25 - 01:30.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)