I'm planning to using a 128x64 LCD display, I want to show some data from other programs.
I was thinking to run this task in the background with some different screens.
CPU load, memory usage, disk usage, network usage.
Since this is general information, this is polled py the "lcd program" itself.
... After a while ...
Information from program A
... and so on, multiple programs ...
This cycles between the screens with the most recent data sent, some programs run every 5 minutes for example.
Now the question, how to feed the data in the program?
I've searched some information about named pipes, but most information is for daemons and couldn't find a good example for my purpose.
Is this the best way or other suggestions? I want to keep it as simple as possible for the clients to put data in (something like value1;10)
4 posts • Page 1 of 1
You could use shared memory, pipes, sockets, or files. What's best (if there is a best) would depend on the details of what you are trying to achieve and how it's expected to grow. I'd probably start with pipes.
A named pipe is probably the easiest way to do inter process communication, although, it does have its drawbacks. Use the Unix/Linux command to create a FIFO file, mkfifo <filename> or as an example mkfifo /tmp/myfifo. After that you can write to /tmp/myfifo (if that's the name used when you created the fifo) from one process, then read from /tmp/myfifo from the other process.