Caution
This software is experimental and subject to change.
Clone the entire repo
git clone https://github.com/G-PST/pmu-data-analytics.git
Running the CLI using cargo:
cargo run --help
All data will be identical with the exception of timestamps
First build the containers
docker-compose build
Then run
docker-compose up
Data will be randomized and simulate a single PDC/PMU
Assuming you have build the container using the instructions above. You can download and run the open-pdc server and pmu buffer using the command below.
docker-compose -f docker-compose-openpdc.yml up --no-attach open-pdc
You can log in to the local openPDC instance and update the configuration. The default username and password are.
USER
.\admin
PASSWORD
admin
You can also install the latest release of openPDC with more features here
cargo run mock-pdc
cargo run -- mock-pdc --ip localhost --port 8080
cargo run server
Assuming that the IP of the PDC server is 160.49.88.18
and the port enable is
3030
cargo run -- server --pdc-ip 160.49.88.18 --port 3030
cargo run -- server --pdc-ip localhost --port 8080
cargo run -- server --http-port 3030
While the server is running you can use Python to access the memory buffer using pandas:
import io
import pandas as pd
import requests
PORT = 8080 # Port where the Server was bind
url = f"http://127.0.0.1:{PORT}/data"
s = requests.get(url, timeout=10)
df = pd.read_feather(io.BytesIO(requests.get(url, timeout=10).content))
df.head()
cargo build --release
This will build the application binary in .target/release. For windows, the executable will be ./target/release/pmu.exe
You can add the executable to your path and run the commands similar to the commands above replacing cargo run with pmu.
cargo run server
vs
pmu server
or
./target/release/pmu mock-pdc