1

I am re-wording this question due to a better understanding of systemd. You will see below in my updates that I became aware of journalctl. The initial responses to my question pointed me to rsyslog.

I apologise as I mis-used the comments and they appear to have been lost.

Journalctl and syslog: How does it actually work? touches on what I think I need to do, but I am rather lost.

Do I need to configure omjournal to 'share' journald with syslog?

Ideally, I would like to distinguish these log entries in Synology Log Center. The Log Center allows General(System)/Connection(Connection))/File Transfer(SMB)/Drives(not shown) to be viewed. Should rsyslog add to General/System? Hopefully I can distinguish by User= as configured within the systemd.service file.

FYI: The linked Redhat article mentions the following omjournal configuration

module(load="imuxsock"
    SysSock.Use="on"
    SysSock.Name="/run/systemd/journal/syslog")

NB Synology DSM does not have syslog located in this path, but others

root@my_nas:/run/systemd/journal# ls -l
total 4
srw-rw-rw- 1 root root   0 Feb 22 15:16 dev-log
-rw-r--r-- 1 root log    0 Feb 22 15:16 flushed
-rw-r--r-- 1 root log    8 Feb 22 15:16 kernel-seqnum
srw-rw-rw- 1 root root   0 Feb 22 15:16 socket
srw-rw-rw- 1 root root   0 Feb 22 15:16 stdout
drwxr-xr-x 2 root log  660 Apr  7 11:59 streams

Other questions related to my investigation


UPDATE -- after some encouragement that my quest my not be illogical... Another question within this forum discusses journalctl, saying "By default stdout and stderr of a systemd unit are sent to syslog". View stdout/stderr of systemd service The linked description of journalctl states "If one or more match arguments are passed, the output is filtered accordingly." You will see below that journalctl does provide some information but not 'everything' expected from stdout (no errors expected).

Further update -- Strangely, journalctl does not 'log' the initial 'console' output (stdout) when the python program starts, but it does log stdout when sling service starts to stream. My next step will be to view journalctl within Synology Log Center, which may be the suggested rsyslog. Any suggestions welcome :) (Annoying I am not getting the initial output, as I perceive this will contain the error detail if the service does not start as expected)

sudo journalctl -u sling.service
-- Logs begin at Tue 2023-04-04 15:36:34 IST, end at Fri 2023-04-07 14:25:48 IST. --
Apr 07 11:59:17 my_nas systemd[1]: Stopping SlingBox Server Service...
Apr 07 11:59:17 my_nas systemd[1]: Stopped SlingBox Server Service.
Apr 07 11:59:23 my_nas systemd[1]: Started SlingBox Server Service.
Apr 07 11:59:23 my_nas systemd[1]: Starting SlingBox Server Service...
Apr 07 13:41:47 my_nas python3[4609]: Version : 4.01 Running on Linux-4.4.180+-x86_64-with-glibc2.2.5 pid= 4609 slingbox_server.py
Apr 07 13:41:47 my_nas python3[4609]: Using config file config.ini
Apr 07 13:41:47 my_nas python3[4609]: Connection Manager Running on port 8080 with 10 max streams using URL slingbox.
Apr 07 13:41:47 my_nas python3[4609]: Building page for Slingbox
Apr 07 13:41:47 my_nas python3[4609]: Using built in default remote page definition.
Apr 07 13:41:47 my_nas python3[4609]: Starting Streamer Thread for Slingbox
Apr 07 13:41:47 my_nas python3[4609]: Broadcast Responder Running
Apr 07 13:41:47 my_nas python3[4609]: Streamer Running:  10 config.ini SLINGBOX 8080 8080 8388608
Apr 07 13:41:47 my_nas python3[4609]: starting up on  port 8080 8388608
Apr 07 13:41:47 my_nas python3[4609]: 8080 Checking for slingbox at ('192.168.0.15', 5301) 0
Apr 07 13:41:47 my_nas python3[4609]: 8080 ('192.168.0.15', 5301) OK
Apr 07 13:41:47 my_nas python3[4609]: 8080 Using slingbox at  ('192.168.0.15', 5301)
Apr 07 13:41:47 my_nas python3[4609]: Streamer:  8080 Waiting for first stream, flushing any IR requests that arrive while not connected to slingbox

sudo systemctl status sling.service ● sling.service - SlingBox Server Service Loaded: loaded (/etc/systemd/system/sling.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2023-04-07 11:59:23 IST; 2h 55min ago Main PID: 4609 (python3) Memory: 6.8M CGroup: /system.slice/sling.service └─4609 /bin/python3 slingbox_server.py

Chrizk
  • 11
  • You's welcome :-) I think this'd be a good time to delete these comments. Comment space isn't intended for discussion, so the open space is a bit limited, and we're getting to the point when this gets moved to a chat room. That makes it less easy for others to pitch in. If you have some updates to the question, just edit it, so everything relevant is available for everyone. – Peregrino69 Apr 07 '23 at 10:47

0 Answers0