mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 04:53:01 +02:00
Remaining work: - phc2sys YANG model (infix-phc2sys.yang, instance-index + servo params) - ts2phc YANG model (GPS/PPS → PHC → ptp4l GM path) - timemaster coordination (Phase 3, after phc2sys YANG is stable) - show ptp network (YANG action or background-polled topology container) - CMLDS (requires upstream linuxptp + 802.1ASdm foundation) - Full 12-bit sdoId, fault log, performance monitoring Backported patches from linuxptp master: - port: fix unicast negotiation recovery after FAULT_DETECTED - udp: fix port-specific ptp/p2p_dst_ipv4 configuration - pmc: avoid race conditions in agent update - phc2sys: wait until pmc agent is subscribed (startup race) - fix MAC driver incorrect SIOCGHWTSTAMP adjustment flags - pmc_agent: longer update interval when not subscribed - phc2sys: don't disable pmc agent with -s/-d/-w options - port_signaling: respect ptp_minor_version in message header - port: refresh link status on faults - uds: copy server socket ownership in pmc clients (non-root pmc) - uds: don't call chmod() on client socket - port: allow mixing wildcard and exact clock identities - Add pidfile support to ptp4l, phc2sys, and timemaster Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Introduction
Statd is designed to be integrated into Infix and supply the operational
database with data. To do this it uses companion binaries written in
python, these are located in the python directory.
Run outside Infix
Prerequisites
There are some requirements set on your computer to run statd locally.
- An Ubuntu based system
- lldpd
- python3
- libite
- libsrx
- python-poetry
- sysrepo (At least the same version as Infix)
- libyang (At least the same version as Infix)
Install YANG modules in local sysrepo
This requires that you first build Infix, since netopeer2 and sysrepo are responsible for installing their own YANG files.
user@host ~/infix$ export TARGET_DIR="output/target/"
user@host ~/infix$ export NETOPEER2_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/netopeer2/
user@host ~/infix$ export SYSREPO_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/sysrepo/
user@host ~/infix$ export LIBNETCONF2_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/libnetconf2/
user@host ~/infix$ export CONFD_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/confd/
user@host ~/infix$ export TEST_MODE_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/test-mode/
user@host ~/infix$ export ROUSETTE_SEARCHPATH=$TARGET_DIR/usr/share/yang/modules/rousette/
user@host ~/infix$ export SEARCH_PATH="$NETOPEER2_SEARCHPATH $SYSREPO_SEARCHPATH $LIBNETCONF2_SEARCHPATH $CONFD_SEARCHPATH $TEST_MODE_SEARCHPATH $ROUSETTE_SEARCHPATH"
user@host ~/infix$ ./utils/srload src/confd/yang/sysrepo.inc
user@host ~/infix$ ./utils/srload src/confd/yang/libnetconf2.inc
user@host ~/infix$ ./utils/srload src/confd/yang/netopeer2.inc
user@host ~/infix$ ./utils/srload src/confd/yang/confd.inc
user@host ~/infix$ ./utils/srload src/confd/yang/rousette.inc
user@host ~/infix$ ./utils/srload src/confd/yang/test-mode.inc
Build and install python companion binaries
user@host ~/infix/src/statd/python$ ./local_install.sh
This will install the binaries in ~/.local/bin
Build and install statd
user@host ~/infix/src/statd$ ./configure --with-yanger-dir=$HOME/.local/bin
user@host ~/infix/src/statd$ make
user@host ~/infix/src/statd$ sudo make install
Running statd
Since the yanger binary, for example, reads the shadow database, you
can expect different results if running statd as root or not.
user@host ~/infix/src/statd$ statd