pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41843?usp=email )
Change subject: logging: Improve file & stderr log documentation
......................................................................
logging: Improve file & stderr log documentation
Change-Id: I90114f634ae0411e58d2f3da86d5a2e470b4d828
---
M common/chapters/logging.adoc
1 file changed, 20 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/common/chapters/logging.adoc b/common/chapters/logging.adoc
index b8365ec..abc5941 100644
--- a/common/chapters/logging.adoc
+++ b/common/chapters/logging.adoc
@@ -288,6 +288,7 @@
local address, upon creation of the GSMTAP log target, an attempt will be made to create a dummy sink socket
to avoid such problems automatically.
+[[logging_file]]
==== Logging to a file
As opposed to Logging to the VTY, logging to files is persistent and
@@ -300,9 +301,10 @@
----
OsmoBSC> enable
OsmoBSC# configure terminal
-OsmoBSC(config)# log file /path/to/my/file
+OsmoBSC(config)# log file /path/to/my/file <1>
OsmoBSC(config-log)#
----
+<1> Configure a file logging target writing to /path/to/my/file
This leaves you at the config-log prompt, from where you can set the
detailed configuration for this log file. The available commands at
@@ -310,6 +312,19 @@
`logging filter`, `logging level` as well as `logging color`
and `logging timestamp`.
+The file logging target will by default use a synchronous non-blocking I/O
+write. If writing cannot be performed synchronously (would block), the message
+is stored in a workqueue where asynchronous write (driven by poll event loop)
+will be performed at a later stage. The file logging target can be configured
+during the VTY `log file` VTY command to perform blocking I/O with the
+`blocking-io` parameter. This I/O mode should not be used in any osmocom program
+driven by an event loop (which includes any program using a VTY), since it may
+block the thread for an unspecified (potentially long or even infinite) amount
+of time and hence prevent the event loop to run and process events. This I/O
+mode should only be used under specific circumstances, like debugging a crash,
+in which case it's interesting to get the logging output to the UDP socket and
+hence recorded before the program crashes.
+
TIP: Don't forget to use the `copy running-config startup-config` (or
its short-hand `write file`) command to make your logging configuration
persistent across application re-start.
@@ -440,3 +455,7 @@
OsmoBSC(config)# log stderr
OsmoBSC(config-log)#
----
+
+The stderr logging target can be configured during the VTY `log stderr` VTY
+command to perform blocking I/O with the `blocking-io` parameter. See
+<<logging_file>> for more information.
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41843?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I90114f634ae0411e58d2f3da86d5a2e470b4d828
Gerrit-Change-Number: 41843
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41844?usp=email )
(
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: logging: Improve systemd-journal log documentation
......................................................................
logging: Improve systemd-journal log documentation
Change-Id: I9a67b9b8c38868004a794164724cdffc5b86a044
---
M common/chapters/logging.adoc
1 file changed, 19 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/common/chapters/logging.adoc b/common/chapters/logging.adoc
index abc5941..4cf2e15 100644
--- a/common/chapters/logging.adoc
+++ b/common/chapters/logging.adoc
@@ -440,6 +440,25 @@
being passed to systemd. No additional fields will be attached, except the
logging level (`PRIORITY`). This mode is similar to _syslog_ and _stderr_.
+NOTE: systemd-journal logging target uses libsystemd, which implements _Native
+Journal Protocol_ (_AF_UNIX _DATAGRAM_ socket). That socket is internally
+configured in synchronous blocking I/O mode, which means transmitting a big
+amount of messages or text over it in a short amount of time (before
+systemd-journald has time to read it) could potentially block the osmocom
+program's thread issuing the logging. libsystemd currently sets the _AF_UNIX_
+socket `SO_SNDBUF` to 8MB. In Linux, the `SO_SNDBUF` value being set on the
+socket will be trimmed by the kernel to a maximum allowed by sysctl
+`net.core.wmem_max`. Hence, if you want to be on a safer side minimizing
+dropping messages or blocking the process (depending on the I/O mode set), make
+sure sysctl `net.core.wmem_max` on your system is set to `8388608` (8MB) or
+more. Besides, the kernel limits the amount of messages queued in _AF_UNIX_
+sockets to value set in sysctl `net.unix.max_dgram_qlen`, so you may also want
+to increase that one to be on the safe side if planning to log with a high
+frequency.
+
+NOTE: Linux Kernel used to have a `net.core.wmem_max` of `212992`(208KB) until
+recently (2025, a6d4f25888b83b8300aef28d9ee22765c1cc9b34), where it was
+increased to `4194304` (4MB) .
==== Logging to stderr
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41844?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I9a67b9b8c38868004a794164724cdffc5b86a044
Gerrit-Change-Number: 41844
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, osmith.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email )
Change subject: ttcn3-bts-test: bpftrace: filter by executable name
......................................................................
Patch Set 3:
(1 comment)
File ttcn3-bts-test/bpftrace/ksys_write_delay.bt:
https://gerrit.osmocom.org/c/docker-playground/+/41778/comment/98e25dcb_3cd… :
PS2, Line 28: kretprobe:ksys_write / comm == str($1) && @start[tid] /
> I've removed the additional `comm == str($1)` for `kretprobe`.
We may actually need this "comm == str($1) && ", not because is really needed, but because bpftrace in debian13 is buggy and otherwise it throws an error with an error trying to access a non-existing entry in the "start" map for "tid".
This works fine on older (debian12) and newer (archlinux) bpftrace.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Gerrit-Change-Number: 41778
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jan 2026 12:08:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, fixeria, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41844?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: logging: Improve systemd-journal log documentation
......................................................................
logging: Improve systemd-journal log documentation
Change-Id: I9a67b9b8c38868004a794164724cdffc5b86a044
---
M common/chapters/logging.adoc
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/44/41844/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/41844?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I9a67b9b8c38868004a794164724cdffc5b86a044
Gerrit-Change-Number: 41844
Gerrit-PatchSet: 7
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>