I have Redis 6.2.6 installed and complied as an addition of Linuxcnc on my develepment system which is running the current Linuxcnc master. I think it will be very useful for routing command, status and other data between Linuxcnc's various blocks of code internally and also externally, not only to Labview but also to other alternatives.
I installed Redis in linuxcnc 2.9 master and compiled it as part of it. After starting Linuxcnc I opened up two terminal windows from within my Linuxcnc folder (CncMaster) in order to talk to Redis. The below are the results.
Opening the Redis server :
Open terminal in linuxcnc folder
$ . ./scripts/rip-environment
$ redis-server configs/cnc1/redis_configure/cnc1.redis.conf
From terminal display:
cnc1@cnc1-OptiPlex-9020:~/CncMaster$ redis-server configs/cnc1/redis_configure/cnc1.redis.conf
8941:C 16 Jan 2022 07:03:15.562 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
8941:C 16 Jan 2022 07:03:15.562 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=8941, just started
8941:C 16 Jan 2022 07:03:15.562 # Configuration loaded
8941:M 16 Jan 2022 07:03:15.562 * Increased maximum number of open files to 10032 (it was originally set to 1024).
8941:M 16 Jan 2022 07:03:15.562 * monotonic clock: POSIX clock_gettime
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 6.2.6 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 8941
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
8941:M 16 Jan 2022 07:03:15.563 # Server initialized
8941:M 16 Jan 2022 07:03:15.563 * Loading RDB produced by version 6.2.6
8941:M 16 Jan 2022 07:03:15.563 * RDB age 60 seconds
8941:M 16 Jan 2022 07:03:15.563 * RDB memory usage when created 0.77 Mb
8941:M 16 Jan 2022 07:03:15.563 # Done loading RDB, keys loaded: 0, keys expired: 0.
8941:M 16 Jan 2022 07:03:15.563 * DB loaded from disk: 0.000 seconds
8941:M 16 Jan 2022 07:03:15.563 * Ready to accept connections
Shutting down linuxcnc gives:
8941:signal-handler (1642349593) Received SIGTERM scheduling shutdown...
8941:M 16 Jan 2022 07:13:13.654 # User requested shutdown...
8941:M 16 Jan 2022 07:13:13.654 * Saving the final RDB snapshot before exiting.
8941:M 16 Jan 2022 07:13:13.716 * DB saved on disk
8941:M 16 Jan 2022 07:13:13.716 * Removing the pid file.
8941:M 16 Jan 2022 07:13:13.716 # Redis is now ready to exit, bye bye...
Redis has a command line interpreter (CLI) available.
Starting the Redis CLI, and getting server info and ability to program via the CLI:
Open a terminal in linuxcnc folder
$ . ./scripts/rip-environment
$ redis-cli
$ info server
This is the display from terminal from the info server command:
cnc1@cnc1-OptiPlex-9020:~/CncMaster$ . ./scripts/rip-environment
cnc1@cnc1-OptiPlex-9020:~/CncMaster$ redis-cli
127.0.0.1:6379> info server
# Server
redis_version:6.2.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:4dfbfc6a1caecbd5
redis_mode:standalone
os:Linux 5.10.0-9-rt-amd64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:c11-builtin
gcc_version:9.3.0
process_id:8941
process_supervised:no
run_id:ad17c2616987d8f3e3a3ab1c063db8ae7f4910d5
tcp_port:6379
server_time_usec:1642349330430826
uptime_in_seconds:335
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:14959378
executable:/home/cnc1/CncMaster/redis-server
config_file:/home/cnc1/CncMaster/configs/cnc1/redis_configure/cnc1.redis.conf
io_threads_active:0
127.0.0.1:6379>
CLI does not shut down when linuxcnc terminates so programming work is able to proceed.
Typing help as in the first line below in the CLI gives back the second and following lines:
127.0.0.1:6379> help
redis-cli 6.2.6
To get help about Redis commands type:
"help @<group>" to get a list of commands in <group>
"help <command>" for help on <command>
"help <tab>" to get a list of possible help topics
"quit" to exit
To set redis-cli preferences:
":set hints" enable online hints
":set nohints" disable online hints
Set your preferences in ~/.redisclirc
127.0.0.1:6379>
A lot more to do but its running and thus a good start.