yarda / chroma66202

User space utilities for chroma66202 digital power meter.
1 stars 1 forks source link

Create live.gnuplot #2

Closed jirka-h closed 8 years ago

jirka-h commented 8 years ago

GNUPLOT command file to plot live data created with

stdbuf -oL ./chroma66202 -cpt -r100000 -y1 | stdbuf -oL awk -F"CET;" '{print $1,$2}' >/tmp/data

jirka-h commented 8 years ago

GNUPLOT command file added

yarda commented 8 years ago

I was partly true in my previous comment, from the manual page:

Normally all files are block buffered. If a stream refers to a terminal (as stdout normally does), it is line buffered.

So when you use pipe ("|") it automagically switches to the block buffered mode for better performance. I think performance is not critical here as it can actually sample with maximal frequency of 1 Hz. More important is to have the complete result when the sample is taken/written to the stdout, thus I switched to the line buffered mode in 8f863691ad091726ebee80f5f4f27afe9dc9e408.

@jirka-h please update the PR and remove the stdbuf.

jirka-h commented 8 years ago

I have replaced this pull request with a new one.