-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not printing data out in real time just printing out all at once at the end of loop. #36
Comments
Hi.
Almost certainly your pipeline is being buffered, so the data isn't
being sent to feedgnuplot as it comes in, but all at once at the end.
This isn't something feedgnuplot can fix, since the issue is outside of
its control.
The buffering could be happening at every stage in the pipeline, and you
need to make sure to turn off the buffering at every step:
1. I don't know what rtauto-usb2001tc is. If, for example, it's a C
application that writes data with printf(), you need to
fflush(stdout) after printing every record. If it isn't using
printf(), you need to do something similar
2. I don't know how tee works internally, and you may need to run it
under 'unbuffer', or after an 'stdbuf' command
3. awk: if this is GNU awk, you can so '{print $1,$3; fflush();}'
This is a very well known feature of pipes, and a very common source of
confusion. Look up: stdbuf unbuffer expect
|
Thanks so much for your suggestions it helped me a lot and I got my old
thermocouple plotting in real time. It's a long command to use and it
looks crazy but it works for my needs.
./rtauto-usb2001tc 1200 | tee output_temp.csv | unbuffer tail -f
output_temp.csv | stdbuf -o0 awk -W interactive '{print substr($2, 9,
length($2)),$4;fflush();}' | feedgnuplot --stream --domain --title "Plasma
water Temperature vs Time\n <process to run for 1200 seconds>" --set
timestamp --ylabel 'Temperature' --xlabel 'Time' --set 'xtics rotate'
--with linespoints
|
Thanks so much for your suggestions it helped me a lot and I got my old thermocouple plotting in real time. It's a long command to use and it looks crazy but it works for my needs.
Rick |
Greetings
I'm testing out Feedgnuplot and I'm having some issues.
I can execute a program ./rtauto-usb2001tc that gets real time temperature from a thermocouple and displays it on the screen. The data in the columns represent the timestamp, temperature in Celsius, and temperature in Fahrenheit.
See First_animation.gif of what the program ./rtauto-usb2001tc does when executed.
The command I tried to plot real time data is below.
./rtauto-usb2001tc | tee output.csv | awk '{print $1 $3}' | feedgnuplot --stream --with linespoints
See Second_animation.gif of what the commands with feedgnuplot does when executed below.
Thanks for a great app!!
The text was updated successfully, but these errors were encountered: