netProbe: Linux based network Monitor 07

preview_player
Показать описание
I moved netProbe over to a Linux device. I use an Orange PI Zero because it is a similar form factor as the ESP32 version. I walk though the steps to set up the Orange PI and look at the changes I needed to make to the Esp32 version of netProbe to get it running . Finally, I do some network sanity checks to make sure the netProbe is reporting valid ping (latency) and bing (Bandwidth) numbers. Next video I want to try and wrap this all in a docker container to make deployment easier.

00:00 Introduction
00:48 Selected an Orange PI Zero as my Linux device. I like the size and comes with a built in ethernet adaptor.
00:55 I installed the Armbian version of Linux on the Orange PI. It is based on a recent version of Ubuntu.
01:07 These are the steps I went through to get my initial image and make sure Flask and Docker were included.
04:20 I saw on the web that people said the Orange PI Zero can run hot, so I took temperature reading to be sure it will run OK.
04:40 For creating the updated python code I used the “Remote SSH” extension on VSCode to easily work on code on the Orange PI.
07:51 I needed a plan, this shows how I plan on taking the ESP32 netProbe code and code I had done in the past for pythons versions of ping and bing and merge it all together.
11:20 I look at the changes I needed to make to the scheduler to change from micropython to python.
15:06 I renamed my project, my original name was backing me into a corner. Project is now called netProbeLinux.
16:30 I work on converting the microDot web services to use Flask. The two main challenges were, “request” was no longer ns explicit property of Flask routines, and I needed to share the HostStatus info via disk file rather than in memory.
19:59 I set up a cron job to start up the Scheduler and webservice when the Orange PI reboots.
21:19 A demonstration of the Linux version of netProbe running. Is much faster and can manage more hosts than the ESP32 version.
23:30 I was wanting to check that the latency and bandwidth results from the netProbe were accurate so set up a network Emulator to test it. I used Newt on a windows 7 machine, note this emulation functionality is now part of Visual Studio .
25:40 I check the results from netProbe, they line up very closely to the emulator setting (Few percentage points)

Resources

Orange PI

Orange Pi Zero Setup steps

1. Flash armbian image to sd card and start Orange PI
2. Find Orange PI on network and connect via ssh root/1234

when prompted - Update root password , create pi user

Log out and Log in as pi

3. Do “sudo apt update” and “sudo apt upgrade”
3.a sudo lsb_release -a to see Linux info
4. Run sudo orangepi-config to set a static IP address (Optional)

Install Flask

5. python3 -V
6. apt install python3-pip
7. pip3 install Flask

Test flask
8. mkdir my_flask_app
9. cd my_flask_app

from flask import Flask
app = Flask(__name__)

def hello_world():
return 'Hello World!'

if __name__ == '__main__':

Install docker

Test Docker
sudo systemctl status docker

python requests and Flask-CORs modules required for the netProbe web page function
13 pip3 install requests
14 sudo pip3 install -U flask-cors
Рекомендации по теме
Комментарии
Автор

Friend! This project is fantastic, as adding some probes helps a lot to understand the behavior of a network! I'm following your videos and I can say that everything using esp32 was incredible. I'll try to replicate the environment and come back here with the results.

WagnerUlisses