Added OBSW Watchdog #67

Merged
meierj merged 20 commits from mueller/added-watchdog into develop 2021-07-31 08:51:56 +02:00
Showing only changes of commit 8c3d25f62d - Show all commits

View File

@ -148,6 +148,29 @@ When using Windows, run theses steps in MSYS2.
# <a id="host-commands"></a> Useful and Common Commands (Host)
## Build generation
Replace `Debug` with `Release` for release build. Add `-G "MinGW Makefiles` or `-G "Ninja"`
on Windows or when `ninja` should be used. You can build with `cmake --build . -j` after
build generation. You can finds scripts in `cmake/scripts` to perform the build commands
automatically.
### Q7S OBSW
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
### Q7S Watchdog
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DBUILD_WATCHDOG=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
## Connect to EIVE flatsat
### DNS
@ -192,6 +215,12 @@ Other useful tmux commands:
You can quit scroll mode with `q`.
- Kill a tmux session: run `ctrl + b` and then `k`.
- Detach from a tmux session: run `ctrl + b` and then `d`
- [Pipe last 3000 lines](https://unix.stackexchange.com/questions/26548/write-all-tmux-scrollback-to-a-file)
into file for copying or analysis:
1. `ctrl + b` and `:`
2. `capture-pane -S -3000` + `enter`
3. `save-buffer /tmp/tmux-output.txt` + `enter`
### SSH console
@ -587,7 +616,7 @@ pscp -scp -P 22 eive@192.168.199.227:</directory-to-example-file/>/example-file
More detailed information about the used q7s commands can be found in the Q7S user manual.
# <a id="q7s"></a> Q7S
# <a id="q7s"></a> Q7S OBC
## Launching an application at start-up
@ -666,13 +695,31 @@ creating directories. To do this, the parition needs to be mounted.
systemctl status example
```
## Current user systemd services
The following custom `systemd` services are currently running on the Q7S and can be found in
the `/etc/systemd/system` folder.
You can query that status of a service by running `systemctl status <serviceName>`.
### `eive-watchdog`
The watchdog will create a pipe at `/tmp/watchdog-pipe` which can be used both by the watchdog and
the EIVE OBSW. The watchdog will only read from this pipe while the OBSW will only write
to this pipe. The watchdog checks for basic ASCII commands as a first basic feature set.
The most important functionality is that the watchdog cant detect if a timeout
has happened. This can happen beause the OBSW is hanging (or at least the CoreController thread) or
there is simply now OBSW running on the system. It does to by checking whether the FIFO is
regulary written to, which means the EIVE OBSW is alive.
If the EIVE OBSW is alive, a special file called `/tmp/obsw-running` will be created.
This file can be used by any other software component to query whether the EIVE OBSW is running.
The EIVE OBSW itself can be configured to check whether this file exists, which prevents two
EIVE OBSW instances running on the Q7S at once.
If a timeout occurs, this special file will be deleted as well.
The watchdog and its configuration will be directly integrated into this repostory, which
makes adaptions easy.
### `tcfagent`
This starts the `/usr/bin/agent` program to allows remote debugging. Might not be part of