"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/21-development.md" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

21-development.md  (icinga2-2.11.5):21-development.md  (icinga2-2.12.0)
skipping to change at line 73 skipping to change at line 73
Distribution | Command Distribution | Command
-------------------|------------------------------------------ -------------------|------------------------------------------
Debian/Ubuntu | `apt-get install gdb` Debian/Ubuntu | `apt-get install gdb`
RHEL/CentOS | `yum install gdb` RHEL/CentOS | `yum install gdb`
Fedora | `dnf install gdb` Fedora | `dnf install gdb`
SLES/openSUSE | `zypper install gdb` SLES/openSUSE | `zypper install gdb`
#### GDB Run <a id="development-debug-gdb-run"></a> #### GDB Run <a id="development-debug-gdb-run"></a>
Since v2.11 we would attach to the umbrella process spawned with `/usr/lib/icing Run the icinga2 binary `/usr/lib{,64}/icinga2/sbin/icinga2` with gdb, `/usr/bin/
a2/sbin/icinga2`, icinga2` is a shell wrapper.
therefore rather attach to a running process.
``` ```
gdb --args /usr/lib/icinga2/sbin/icinga2 daemon
(gdb) set follow-fork-mode child
```
When gdb halts on SIGUSR2, press `c` to continue. This signal originates from th
e umbrella
process and can safely be ignored.
> **Note**
>
> Since v2.11 we would attach to the umbrella process spawned with `/usr/lib/ici
nga2/sbin/icinga2`,
> therefore rather attach to a running process.
>
```
# Typically the order of PIDs is: 1) umbrella 2) spawn helper 3) main process # Typically the order of PIDs is: 1) umbrella 2) spawn helper 3) main process
pidof icinga2 pidof icinga2
gdb -p $(pidof icinga2 | cut -d ' ' -f3) gdb -p $(pidof icinga2 | cut -d ' ' -f3)
``` ```
> **Note** > **Note**
> >
> If gdb tells you it's missing debug symbols, quit gdb and install > If gdb tells you it's missing debug symbols, quit gdb and install
> them: `Missing separate debuginfos, use: debuginfo-install ...` > them: `Missing separate debuginfos, use: debuginfo-install ...`
skipping to change at line 365 skipping to change at line 378
Since v2.11 we would attach to the umbrella process, therefore rather Since v2.11 we would attach to the umbrella process, therefore rather
attach to a running process. attach to a running process.
``` ```
# Typically the order of PIDs is: 1) umbrella 2) spawn helper 3) main process # Typically the order of PIDs is: 1) umbrella 2) spawn helper 3) main process
pidof icinga2 pidof icinga2
lldb -p $(pidof icinga2 | cut -d ' ' -f3) lldb -p $(pidof icinga2 | cut -d ' ' -f3)
``` ```
In case you'll need to attach to the main process immediately, you can delay
the forked child process and attach to the printed PID.
```
$ icinga2 daemon -DInternal.DebugWorkerDelay=120
Closed FD 6 which we inherited from our parent process.
[2020-01-29 12:22:33 +0100] information/cli: Icinga application loader (version:
v2.11.0-477-gfe8701d77; debug)
[2020-01-29 12:22:33 +0100] information/RunWorker: DEBUG: Current PID: 85253. Sl
eeping for 120 seconds to allow lldb/gdb -p <PID> attachment.
```
```
lldb -p 85253
```
When lldb halts on SIGUSR2, press `c` to continue. This signal originates from t
he umbrella
process and can safely be ignored.
Breakpoint: Breakpoint:
``` ```
> b checkable.cpp:57 > b checkable.cpp:57
> b icinga::Checkable::ProcessCheckResult > b icinga::Checkable::ProcessCheckResult
``` ```
Full backtrace: Full backtrace:
``` ```
skipping to change at line 1381 skipping to change at line 1411
/usr/local/icinga2/lib/icinga2/sbin/icinga2 daemon /usr/local/icinga2/lib/icinga2/sbin/icinga2 daemon
``` ```
#### Debian 10 <a id="development-linux-dev-env-debian"></a> #### Debian 10 <a id="development-linux-dev-env-debian"></a>
Debian Buster doesn't need updated Boost packages from packages.icinga.com, Debian Buster doesn't need updated Boost packages from packages.icinga.com,
the distribution already provides 1.66+. For older versions such as Stretch, the distribution already provides 1.66+. For older versions such as Stretch,
include the release repository for packages.icinga.com as shown in the [setup in structions](02-installation.md#package-repositories-debian-ubuntu-raspbian). include the release repository for packages.icinga.com as shown in the [setup in structions](02-installation.md#package-repositories-debian-ubuntu-raspbian).
``` ```
$ docker run -ti ubuntu:bionic bash $ docker run -ti debian:buster bash
apt-get update apt-get update
apt-get -y install apt-transport-https wget gnupg apt-get -y install apt-transport-https wget gnupg
apt-get -y install gdb vim git cmake make ccache build-essential libssl-dev biso n flex default-libmysqlclient-dev libpq-dev libedit-dev monitoring-plugins apt-get -y install gdb vim git cmake make ccache build-essential libssl-dev biso n flex default-libmysqlclient-dev libpq-dev libedit-dev monitoring-plugins
apt-get -y install libboost-all-dev apt-get -y install libboost-all-dev
``` ```
``` ```
ln -s /usr/bin/ccache /usr/local/bin/gcc ln -s /usr/bin/ccache /usr/local/bin/gcc
 End of changes. 4 change blocks. 
4 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)