mirror of
https://codeberg.org/privacy1st/de-p1st-monitor
synced 2024-11-23 19:49:32 +01:00
docs: update README
This commit is contained in:
parent
a25e1cb67d
commit
118709eb87
46
README.md
46
README.md
@ -189,25 +189,34 @@ pip install graph-cli
|
||||
|
||||
3) Create plots
|
||||
|
||||
Create one plot for each .csv file:
|
||||
Create one plot for each .csv file with different resampling methods (https://pandas.pydata.org/pandas-docs/stable/reference/resampling.html#computations-descriptive-stats):
|
||||
|
||||
```shell
|
||||
sample_duration=4H
|
||||
function plot(){
|
||||
for file in "${@}"; do
|
||||
graph "${file}" -x 1 --resample "${sample_duration}" --resample-action "${action}" --figsize 1600x1000 -o "${file}".resample-"${sample_duration}-${action}".png || {
|
||||
echo "Error while processing ${file}"
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
for file in *.csv; do
|
||||
graph "${file}" -x 1 --resample "${sample_duration}" --figsize 1600x1000 -o "${file}".resample-"${sample_duration}"-mean.png || {
|
||||
echo "Error while processing ${file}"
|
||||
}
|
||||
done
|
||||
# MEAN
|
||||
sample_duration=24H
|
||||
action=mean
|
||||
plot {swap,memory}.csv {temp_,cpu_,sensor_script_}*.csv
|
||||
|
||||
for file in {swap,memory}.csv {temp_,drive_,net_,cpu_,filesystem_}*.csv; do
|
||||
graph "${file}" -x 1 --resample "${sample_duration}" --resample-action max --figsize 1600x1000 -o "${file}".resample-"${sample_duration}"-max.png || {
|
||||
echo "Error while processing ${file}"
|
||||
}
|
||||
done
|
||||
# MAX
|
||||
sample_duration=24H
|
||||
action=max
|
||||
plot {swap,memory}.csv {temp_,drive_,net_,cpu_,filesystem_,sensor_script_}*.csv
|
||||
|
||||
# SUM
|
||||
sample_duration=24H
|
||||
action=sum
|
||||
plot net_*.csv
|
||||
```
|
||||
|
||||
4) Optionally, create more plots
|
||||
4) Create more plots as you like
|
||||
|
||||
Some self-explaining examples:
|
||||
|
||||
@ -222,17 +231,6 @@ graph cpu_1min.csv -x 1 --resample 1H -o cpu_1min_resample-1H.png
|
||||
graph cpu_1min.csv -x 1 --resample 1H --figsize 1600x1000 -o cpu_1min_resample-1H.png
|
||||
```
|
||||
|
||||
```shel
|
||||
# resample using sum
|
||||
graph net_enp0s31f6.csv.exported.csv -x 1 --resample 1H --resample-action sum --figsize 1600x1000 -o net_enp0s31f6.csv.exported_resample-1H-sum.png
|
||||
```
|
||||
|
||||
```shel
|
||||
# resample using max
|
||||
graph cpu_1min.csv -x 1 --resample 1H --resample-action max --figsize 1600x1000 -o cpu_1min_resample-1H-max.png
|
||||
```
|
||||
|
||||
|
||||
### Example plots
|
||||
|
||||
![img](images/cpu_1min.csv.resample-1H.png)
|
||||
|
Loading…
Reference in New Issue
Block a user