Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-11 Thread Detlev Zundel
Hi Dima,

> Hi. Yeah, wayland is almost certainly the cuplrit. If you can talk to
> the gnuplot upstream to get it resolved, that'd be awesome.

Ok, I'll see what I can do.

And thanks for the awesome tool and the outstanding support!

Cheers
  Detlev

-- 
Warning: this comic occasionally contains strong language (which may be unsuit-
able for children), unusual humor (which may be unsuitable for adults), and ad-
vanced mathematics (which may be unsuitable for liberal-arts majors). /xkcd.org



Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-11 Thread Dima Kogan
Hi. Yeah, wayland is almost certainly the cuplrit. If you can talk to
the gnuplot upstream to get it resolved, that'd be awesome.



Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-11 Thread Detlev Zundel
Hi,

[...]

> I should have mentioned I only recently switched from GNOME on Xorg to
> GNOME on Wayland.  I hope it does not make a difference but I wanted to
> mention it.

Having written this paragraph I just reran the test once again and
noticed that the graph gets redrawn when I move the mouse on the desktop
so it enters and exits different windows.  At those moments in time, the
graph gets refreshed.  So I can get an updating graph by continuously
moving the mouse between my terminal window that I started the command
in and the gnuplot window.

With this in mind I switched back to GNOME on Xorg and sure enough
everything works as expected...

So the bug only shows in gnuplot under GNOME on Wayland.  It is
therefore likely a gnuplot bug instead of a problem in feedgnuplot.
Does this make sense?  Should I open a bug with gnuplot?

Thanks!
  Detlev

-- 
The 82558 B-step and later generation devices do not maintain a link
in D3 if PME is disabled or if the device does not have power.
-- Intel documentation



Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-11 Thread Detlev Zundel
Hi Dima,

> Hi. Notes inline.

Thanks for your quick reply!

>> I cannot get dynamic plots to work on my system.
>
> OK. I suspect this is something on your end, but let's run some
> experiments.

I am 100% sure it is something on my end.  The question is if it is my
fault or reproducible on other machines as well ;)

>> while true; do sleep 1; cat /proc/net/dev; done |
>>  gawk '/enp6s0/ {if(b) {print $2-b; fflush()} b=$2}' |
>>  feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds
>>
>> This opens up a gnuplot window but it is not updating every second as
>> it should. The lower left corner seems to be showing a coordinate and
>> this indeed updates every second, but the plot itself does not. From
>> time to time the plot gets redrawn but then again stays fixed.
>
> I can think of several potential causes. First off, let's eliminate X
> issues. Can you please add '--terminal "dumb 80 40"' to the feedgnuplot
> command? If that works properly, you'll see an ascii plot printed onto
> your console every second. Do you see that?

Works like a charm.

>> Doing more diagnosing, I used the --dump switch to see what is being fed into
>> gnuplot and when I manually run gnuplot and paste the fragments into it, it
>> works just fine. It seems to be related with the fact that gnuplot reads the
>> input from the pipe.
>
> Right. The second theory is that it's something related to buffering.
> That command should handle it, but let's see. Try this:
>
> 1. apt install mawk
>
> 2. while true; do sleep 1; cat /proc/net/dev; done |
>  mawk -Winteractive '/enp6s0/ {if(b) {print $2-b} b=$2}' |
>  feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds 
> --terminal 'dumb 80 40'
>
> So use "mawk -Winteractive" instead of "gawk", and remove the fflush().
> Does that make any difference?

Nope.  Same behaviour.  Position in lower left corner updates, graph
does not.  Only one update after approximately 8 seconds then again
fixed.

>> Maybe this is related to the gnuplot version in Bullseye?
>
> Maybe, but I doubt it. Please run the two experiments above, and we can
> go from there.

I should have mentioned I only recently switched from GNOME on Xorg to
GNOME on Wayland.  I hope it does not make a difference but I wanted to
mention it.

Any other ideas?

Thanks in advance!
  Detlev

-- 
Any fool can write code that a computer can understand. Good
programmers write code that humans can understand.
-- Martin Fowler



Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-10 Thread Dima Kogan
Hi. Notes inline.


Detlev Zundel  writes:

> I cannot get dynamic plots to work on my system.

OK. I suspect this is something on your end, but let's run some
experiments.


> while true; do sleep 1; cat /proc/net/dev; done |
>  gawk '/enp6s0/ {if(b) {print $2-b; fflush()} b=$2}' |
>  feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds
>
> This opens up a gnuplot window but it is not updating every second as
> it should. The lower left corner seems to be showing a coordinate and
> this indeed updates every second, but the plot itself does not. From
> time to time the plot gets redrawn but then again stays fixed.

I can think of several potential causes. First off, let's eliminate X
issues. Can you please add '--terminal "dumb 80 40"' to the feedgnuplot
command? If that works properly, you'll see an ascii plot printed onto
your console every second. Do you see that?


> Doing more diagnosing, I used the --dump switch to see what is being fed into
> gnuplot and when I manually run gnuplot and paste the fragments into it, it
> works just fine. It seems to be related with the fact that gnuplot reads the
> input from the pipe.

Right. The second theory is that it's something related to buffering.
That command should handle it, but let's see. Try this:

1. apt install mawk

2. while true; do sleep 1; cat /proc/net/dev; done |
 mawk -Winteractive '/enp6s0/ {if(b) {print $2-b} b=$2}' |
 feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds 
--terminal 'dumb 80 40'

So use "mawk -Winteractive" instead of "gawk", and remove the fflush().
Does that make any difference?


> Maybe this is related to the gnuplot version in Bullseye?

Maybe, but I doubt it. Please run the two experiments above, and we can
go from there.



Bug#984917: feedgnuplot: dynamic plots (--stream) do not work

2021-03-10 Thread Detlev Zundel
Package: feedgnuplot
Version: 1.57-1
Severity: important
Tags: upstream

I cannot get dynamic plots to work on my system.  To rule out a user error on
my end,
I quickly limited myself to the example from the manpage (adjusted to my
network interface enp6s0):


while true; do sleep 1; cat /proc/net/dev; done |
 gawk '/enp6s0/ {if(b) {print $2-b; fflush()} b=$2}' |
 feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds

This opens up a gnuplot window but it is not updating every second as it
should.  The lower left
corner seems to be showing a coordinate and this indeed updates every second,
but the plot itself
does not.  From time to time the plot gets redrawn but then again stays fixed.

In order to get more information on the possible culprit, I checked this script
on Ubuntu 18.04 and Debian Buster and on both systems it works fine.  Of course
the gnuplot and feedgnuplot versions are different.

I also cloned feedgnuplot from git without any effect, but sure enough the
Bullseye package is only a single commit behind git main and that commit is a
documentation change.

Doing more diagnosing, I used the --dump switch to see what is being fed into
gnuplot and when I manually run gnuplot and paste the fragments into it, it
works just fine. It seems to be related with the fact that gnuplot reads the
input from the pipe.

Maybe this is related to the gnuplot version in Bullseye?

Thanks in advance
  Detlev

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-3-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages feedgnuplot depends on:
ii  gnuplot-x11 [gnuplot-nox]  5.4.1+dfsg1-1
ii  liblist-moreutils-perl 0.430-2
ii  perl   5.32.1-3

feedgnuplot recommends no packages.

Versions of packages feedgnuplot suggests:
pn  vnlog