May 2024 Milwaukee Linux Users Group (MLUG) Meeting

Skip to first unread message

Roger M. Jenson

May 2, 2024, 6:59:01 AMMay 2
to Milwaukee Linux Users Group

Does anyone have a favorite project, product demonstration, discussion
topic for the May 2024 MLUG Meeting?

Best Regards,
Roger M. Jenson


May 3, 2024, 12:58:50 PMMay 3
I'm trying to read status from a NAS device and lo! there's an XML interface that spews forth all the data anyone would ever want, at port 5000, in XML format.
Here's the problem. Both wget and netcat (nc) yank the data down for me just fine:
nc 5000 > widget.xml
But the thing is designed to dump the data, pause 10 seconds, then dump it all again, in case anything changed. Lather, rinse, repeat, forever. It never terminates.
I do know that the file starts with
<nul><soh><nul<soh>DRINASDM<?xml version="1.0" encoding="utf-8"?>
and ends with
There are non-printables in the preamble, and a null at the very end.
Anyone know how I can grab this data and make it terminate when it's pulled down one bucketful?

James Meyer

May 4, 2024, 10:37:53 PMMay 4
to, Tom
assuming this is a straight socket read and not http, the following program should do what you want

Change the 3 lines below to fit your env.
Most likely start will be  <ESATMUpdate>
End will be </ESATMUpdate>

This has extra debugging output, and also print the raw list.  
having it print the list to a file or in string format is straight forward.

#!/usr/bin/env python3
import socket
import time
import bufsock

# Give the server time to start up.

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# We use port 4444 so we don't need to be root to run this.

#set the host and port socket to read from
s.connect(("", 4452)) #<=====adjust this line

bs = bufsock.bufsock(s)

#set the start and ending string to capture between
startmatch="<startmatch>" #<=======adjust this line
endmatch="<endmatch>" #<=======adjust this line

add_to_bucket = False
while True:

    data = bs.readto('\n')
    #this print is debugging only
    #prints whats received from the socket
    if  startmatch in decoded_data:
        add_to_bucket = True
        print("found start")
    if add_to_bucket:
        print("adding to bucket")
    if  endmatch in decoded_data:
        print("found end match, stopping")
        add_to_bucket = False


#print the bucket contents

This forum online:!forum/MilwaukeeLUG
You received this message because you are subscribed to the Google Groups "Milwaukee Linux User's Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

James Meyer

May 4, 2024, 10:45:44 PMMay 4
to, Tom
This is what i used to replicate the continuous output of the NAS.
instead of 10 seconds sleep, it's 2 seconds and includes data that is not wanted (occurs outside the start/end string)

 jams@ace:~> cat
while [ "x"="x" ]
        echo "<startmatch>"
        sleep 2
        echo "<endmatch>"
        cat /etc/group

#start on port 4452 and run /home/jams/ to provide data to the socket
#The contents never end
jams@ace:~> socat TCP-LISTEN:4452,fork EXEC:/home/jams/


May 10, 2024, 10:54:32 AMMay 10
So I'm trying to run a thing, and like I always do when I see something cool on youtube, I got into trouble. As you will see from the below, I know almost nothing about docker.
The guy shows on his video, type git clone
and then type docker compose up and goodness will ensue.
It doesn't work that way on my machines. I tried on a Fedora 36 machine (docker 20.10.21) and also on a Fedora 39 machine (docker 24.0.5) and in both cases:
# docker compose up
docker: 'compose' is not a docker command.
I also tried this, which is NOT what the guy on the video typed:
# docker-compose up
ERROR: The Compose file './compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'
You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see
When he does it on the video, five different processes start up.
The git clone results in the following files being present:
├── compose.yml
├── config
│   ├── grafana
│   │   ├── dashboards
│   │   │   ├── main.yml
│   │   │   └── netprobe.json
│   │   └── datasources
│   │   └── automatic.yml
│   ├──
│   ├── prometheus
│   │   └── prometheus.yml
│   └── redis
│   └── redis.conf
├── Dockerfile
├── helpers
│   ├──
│   ├──
│   ├──
│   ├──
│   ├── __pycache__
│   │   └── network_helper.cpython-312.pyc
│   └──
├── logs
└── requirements.txt
I should point out that both these machines are headless and one of them is virtual. I could attach a keyboard & mouse to the Fedora 39 machine and run some GUI management tool, but I don't know what. I seem to have Whaler on here, but it doesn't run- complains about not being root.
Reply all
Reply to author
0 new messages