Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #31981

Linux Embedded: how to get info from a running service

From pozz <pozzugno@gmail.com>
Newsgroups comp.arch.embedded
Subject Linux Embedded: how to get info from a running service
Date 2023-08-07 23:28 +0200
Organization A noiseless patient Spider
Message-ID <uarnls$314pb$1@dont-email.me> (permalink)

Show all headers | View raw


I developed an application (in Python language) that is started by 
systemd at startup and stay running forever (until the box is rebooted 
or shutdown).

The user can get some info of the system by a web application, as a 
typical router or NAS. The user points his web browser to the local IP 
address of my Linux box and a graphical interface appears. This web 
application is written in Python (WSGI) deployed on the box thanks to 
nginx + gunicorn + Flask.

Now the question is: how to get infos from a running service such that 
they can be shown on the web application?
The infos are specific of my application, they aren't standard. I'm in 
control of the running service and WSGI application, so I can use 
whatever solution is better.

Of course this is a typical IPC scenario: one process is WSGI and the 
other is the running service.
I can use shared memory, message queues, named pipes, unix sockets, 
Internet sockets, D-Bus and many other mechanisms.

Is there one that is better to use in my case? After some reading, maybe 
D-Bus can be a good way. I understood systemd already uses D-Bus to 
exchange infos about its services and units.
However its implementation is not straightforward as a unix socket with 
custom messages.

What do you suggest?

PS: In the past I read only a few posts regarding Linux development, 
even if it's for embedded devices. However I don't know how to ask 
questions related to linux development, I noticed Usenet linux groups 
are somewhat dead.

Back to comp.arch.embedded | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-07 23:28 +0200
  Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 12:27 +0200
    Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-08 14:59 +0200
      Re: Linux Embedded: how to get info from a running service Grant Edwards <invalid@invalid.invalid> - 2023-08-08 14:31 +0000
      Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 16:31 +0200
        Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-08 17:14 +0200
          Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-08 18:54 +0200
            Re: Linux Embedded: how to get info from a running service pozz <pozzugno@gmail.com> - 2023-08-09 09:27 +0200
              Re: Linux Embedded: how to get info from a running service David Brown <david.brown@hesbynett.no> - 2023-08-09 10:29 +0200
                Re: Linux Embedded: how to get info from a running service Grant Edwards <invalid@invalid.invalid> - 2023-08-09 13:00 +0000

csiph-web