Pexor Pc 2025
Overview
The pexor pc hosts the PEXOR board (PCIexpress to optical fibre) with special firmware for trbnet protocol. It is part of the hades vlan and offers the central
trbnetd that may receive commands from
trbcmd via RPC from all connected machines.
Main usage: DAQ "slow control"
- frontend-configuration at startup
- monitoring (hmon)
Existing hardware
hadesp31
Currently in the cave.
todo: specs here
Will be replaced before end of 2026
hadespexp02
The spare system; usually waiting in HADES lower counting house
Currently upgrading in Joerns office
--
Main.JoernAdamczewski - 2025-10-29 - 11:15
Mechanism to mimic the ip of hadesp31:
- system service
changemac.service is invoked in the scope of /etc/systemd/system/network-online.target.wants
- it will call script
/usr/local/sbin/changemac_hadesp31 to change mac identity before it is registered by dhcp of hades vlan
- Therefore no other configuration has to be adjusted when exchanging the pexor pc during beamtimme. it just appears as hadesp31 which is accessible as DAQOPSERVER for the trbcmd
- The log is written to
/var/log/changemac.log
- When running in GSI vlan, the script can be replaced by
/usr/local/sbin/changemac_hadesp31.deactivated. In this case the changemac.service does nothing and the Pc appears as hadespexp02 in GSI network (maintenance und upgrade work)
- The full script is available as a copy
/usr/local/sbin/changemac_hadesp31.sav
- A backup of service and script file is available at
lxhadesdaq:/home/hadaq/joern/hadespexp02 (in tsm and drbd)
status before 2025
- OS: Linux hadespexp02 5.12.0-2-default #1 SMP Thu Apr 29 12:08:56 UTC 2021 (c4830af) x86_64 x86_64 x86_64 GNU/Linux
- gcc version 10.3.0 (SUSE Linux)
- openSUSE Tumbleweed, Release: 20210504
- libtrbnet: last commit on Sat Sep 14 00:58:11 2019
- installation of trbnettools is at
home/hadaq/trbnettools2020/trbnettools/
status October 2025
do "zypper dup"
- OS: Linux hadespexp02 6.17.5-1-default #1 SMP PREEMPT_DYNAMIC Fri Oct 24 08:36:26 UTC 2025 (00da826) x86_64 x86_64 x86_64 GNU/Linux
- gcc version 15.2.1 20251006 (SUSE Linux)
- openSUSE Tumbleweed, Release: 20251027
installation of trbnetsoftware
- new clone of
git://jspc29.x-matter.uni-frankfurt.de/projects/trbnettools.git is at home/hadaq/trbnettools2025/trbnettools/
- new clone of
git://jspc29.x-matter.uni-frankfurt.de/projects/hadesdaq.git at home/hadaq/trbnettools2025/hadesdaq/
Problems when compiling pexor kernel module
Kernel module is build standalone in home/hadaq/trbnettools2025/trbnettools/pexor/kernel-module (call "make" here).
- Adjustments in pexor_trb.c for new kernel (changed
class_create interface, did this like in mbspex/pexor sources before)
- Required to manually provide vmlinux:
ln -s /sys/kernel/btf/vmlinux /lib/modules/$(uname -r)/build/
- need to build tool
resolve_btfids
- cd /usr/src/linux/tools/bpf/resolve_btfids/
- make
- ln -s /usr/src/linux/tools/bpf /usr/src/linux-6.17.5-1-obj/x86_64/default/tools/
OK then.
Installation of kernel module to system
- as root:
mkdir /lib/modules/6.17.5-1-default/hades;
-
cp /home/hadaq/trbnettools2025/trbnettools/pexor/kernel-module/pexor.ko /lib/modules/6.17.5-1-default/hades/
-
depmod -A : will update the module dependencies at /lib/modules/6.17.5-1-default/modules.dep etc
-
modprobe pexor : install module manually -> it is loaded, appears at /dev/pexor-0 and /sys/class/pexor/pexor-0
- NOTE: the rules to open
/dev/pexor-0 for group pexor (additional for user hadaq ) are still at /etc/udev/rules.d/100-pexor-udev.rules
Building and installing trbnetd
- do "make distclean; make PEXOR=1" in
/home/hadaq/trbnettools2025/trbnettools/
- several compiler warnings ( concerning
strncpy, unused variables) -> TODO fix!
- in
libtrbnet_perl : make[2]: * No rule to make target '/usr/lib/perl5/5.32.1/x86_64-linux-thread-multi/Config.pm', needed by 'Makefile'. Stop.
- perl version is 5.42.0 now! -> remove old libtrbnet_perl/Makefile first! Will then be newly generated from Makefile.PL
- NEW: libtrbnet_python, not build by top Makefile (but also not required for HADES)
- "make PEXOR=1 install":
- creates
bin, binlocal, lib, liblocal, in /home/hadaq/trbnettools2025/trbnettools/
- does not install kernel module to system (was done manually, see above)
- can not install perl libs to system -> redo this with root account
- manually build
command_server at /home/hadaq/trbnettools2025/hadesdaq/utils/src/command_server/
-
gcc ./command_server.c
-
mv a.out command_server
-
cd /home/hadaq/trbnettools2025; ln -s hadesdaq/utils/src/command_server/command_server .
-
trbnetd and command_server (still required?) is launched at boot time with /home/hadaq/bootup_script.sh (via hadaq crontab)
- change path in
bootup_script.sh to new installation.
- manually kill running trbnetd and invoke
bootup_script.sh; check with trbcmd
hadaq@hadespexp02:~> trbcmd i 0xffffffff
0xfc00 0x1111222233334444 0x01
>WARNING: Status-Bits are active:
>WARNING: CommonStatusBits: 0x0041, Channel#3 StatusBits: 0x0000
>WARNING: COM_AnswerMissing: One endpoint didn't react
This is OK, since pexor board is not configured yet (address 0xfc00) and nothing connected at SFPS here
- reboot machine and check trbcmd i again:
-
- after trbcmd reset (several times) we get correct answer, see above
Synchronization with central master repository
account hadaq@lxhadesdaq can push to git@jspc29.x-matter.uni-frankfurt.de/trbnettools
- we use relay repository at lxhadesdaq://home/hadaq/joern/git/trbnettools
- add new remote hadespexp02_gsi -> ssh://eelpc024.gsi.de/home/hadaq/trbnettools2025/trbnettools (when in gsi network!)
- "git pull origin" (gets latest from jspc29)
- "git pull hadespexp02_gsi master"
- "git push origin"
--
Main.JoernAdamczewski - 2025-10-30 - 11:18