D
D
DeeZ2017-10-24 07:04:03
Computer networks
DeeZ, 2017-10-24 07:04:03

How to plot the values ​​returned by the script?

Are there any tools that allow you to visualize the result of the script in real time ?
For example, I have a script that does something and prints values ​​to stdout:

123
120
121
124
122

Want something like:
myscript.sh | draw me

Which will draw the graph. And when a new value was received, the graph was redrawn. In fact, you need gnuplot but in real time. Approximately how STG does it, but from my values.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander, 2019-07-25
@Lifestory

Used something like UBIQUITI NSM2
At a distance of 900m and 1300km of open space.
At a distance of 1300 meters, the transmission speed at the recipient's point reached 20Mb.
We also set these points at 200 meters, the speed loss was 30%

D
DeeZ, 2017-10-27
@DeeZ

I settled on LifeGraph , making a small wrapper over it:

#!/bin/bash
JAVA_HOME='/opt/jdk1.8.0_144/'
JG_JAR='LiveGraph.2.0.beta01.Complete.jar'
JG_HOME='/opt/LiveGraph/'
DATFILE=$(mktemp)
echo "##;##" > ${DATFILE}

${JAVA_HOME}/bin/java -jar ${JG_HOME}${JG_JAR} -f ${DATFILE} -gs ${JG_HOME}session.lggs -dss ${JG_HOME}session.lgdss -dfs ${JG_HOME}session.lgdfs &
myPID=$!

trap "echo trapped; rm ${DATFILE}; kill -9 ${myPID}; exit" SIGHUP SIGINT SIGTERM
while true; do
    if ps -p ${myPID}  > /dev/null
    then
        [email protected] >>  ${DATFILE}
    else
        rm ${DATFILE}
        exit
    fi
    sleep 1
done

use something like this (if you need several charts, then the returned values ​​\u200b\u200bmust be separated by a semicolon (123;323;2344;22)
LiveGraph.sh snmpget -v2c -O vqn -cpublic  192.168.45.5 .1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0

C
chupasaurus, 2017-10-24
@chupasaurus

Python + matplotlib animation

3
3vi1_0n3, 2017-10-24
@3vi1_0n3

RRDTool not considered?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question