iftop ... screen being corrupted ...

Support section for FREESCO v0.4.x 3rd Party Packages

iftop ... screen being corrupted ...

Postby bob selby » Wed Nov 18, 2009 1:39 pm

Actually, corrupted is a bit strong :-)

I downloaded this package today and installed it - no problems. Seems to do exactly what I need ,
but what seems to be happening when I run it on tty8 (from startup) or manually on tty1 is that the screen starts off OK
but then it scrolls up a bit and the highlighting dissapears.

Almost as though the screen size is a bit out.

Running 4.0 + patches 1 and 2.

Any ideas??

There doesnt seem to be a config for it.

TIA
Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby bob selby » Wed Nov 18, 2009 2:41 pm

... more info on this ... it seems to be related to how busy the system is.

I ran iftop via a putty session and then ran it directly on tty1 and it was fine.

When I terminated the putty session the problem occurred on tty1.

When I ran it from work via a putty session (not running on tty8) it was messing the screen up
regularly.

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby Lightning » Wed Nov 18, 2009 8:32 pm

It definitely looks like it is not putting the bar graph in the right place. Which looks like there is a screen location issue with the bottom text that most likely is causing a carriage return which is probably causing the issue. I don't have the source for this package but I am guessing this can be resolved by Dingetje. The format becomes quite critical any time you use the bottom line on the screen for static text. :)
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: iftop ... screen being corrupted ...

Postby bob selby » Thu Nov 19, 2009 9:46 am

By way of an experiment I tried running it on a putty console with various vertical sizes (25, 50, 60).

It seems to use the whole height of the screen - but still messes up the screen.

So, it's sizing the screen OK - and as you say the formating on the last line is likely to be the problem.

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby bob selby » Mon Nov 23, 2009 9:38 am

I have noticed that the problem seems to happen when the number in the extreme botom right corner of the screen goes from displaying "Kb" to "b".

On a quiet machine I often see it slowly going down from (say) 6.27Kb .... 0.99Kb but as soon as it shifts to 938b the corruption occurs.

Nicely consistent - and explains why having multiple putty displays running iftop suppresses the problem (extra traffic keeping the value out of the danger zone).

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby Lightning » Mon Nov 23, 2009 10:09 pm

With that bit of information and some testing I see the difference. When using just "b" for bytes everything is shifted one character left. So when "Kb" is displayed the space to the right side of the string is shifted one character closer to the end of the line and most likely that is where part of the problem comes from. However that is not the complete issue because this version of iftop displays perfectly on my Slackware 3.9 development machine. So there is something else causing some problems as well, but most likely the problem could be resolved just by changing the "b" to "b " (b-space) in the source code and keeping the line length format consistent.

However looking at the difference in the display from FREESCO to Slackware it looks like it really needs another extra space added to the end of each line because the white speed bar graph is shown on top of each IP in FREESCO and it is displayed on the blank lines in between each IP in Slackware and adding one more space at the end may solve that issue.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: iftop ... screen being corrupted ...

Postby bob selby » Tue Nov 24, 2009 3:40 am

Lightning wrote:However looking at the difference in the display from FREESCO to Slackware it looks like it really needs another extra space added to the end of each line because the white speed bar graph is shown on top of each IP in FREESCO and it is displayed on the blank lines in between each IP in Slackware and adding one more space at the end may solve that issue.


Personally, I prefer it displaying the bar over the IP to which it applies (as long as its done by inverting the video so that it's still readable) - to my mind it's clearer and gives a more compact display.

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby bob selby » Mon Dec 14, 2009 3:21 am

... poke ...
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby dingetje » Tue Dec 29, 2009 10:50 am

I've seem to have lost the source code for the iftop 0.15 package, so I've patched iftop 0.17 and Lightning tweaked it a little bit so "b" and "B" are now the same length as "kb"/"kB".
Before making the package I think it's good if someone (that would be you Bob :wink: ) tries the new binary to find out if it would fix the reported problem.

The new binary can be snarfed from either one of below 2 locations:

Code: Select all
http://lewys-spot.dyndns.org/dingetje/iftop

http://dingetje.homeip.net/downloads/iftop


Quick installation:
Code: Select all
cd /pkg/sbin
mv iftop iftop015
snarf -n http://dingetje.homeip.net/downloads/iftop
chmod +x iftop


This will install the new iftop (0.17) and saves the original iftop as iftop015, so if all else fails, you can recover with:
Code: Select all
cd /pkg/sbin
mv iftop015 iftop


Please give it a go and let us know.
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Re: iftop ... screen being corrupted ...

Postby bob selby » Sun Jan 03, 2010 1:46 pm

Sorry to say that 0.17 exhibits the same problem as 0.15 :-(

A soon as it transitions between 1.00kb and 900b in the lower right it scrolls up a line.

I have confirmed that the help screen shows "version 0.17".

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby Lightning » Sun Jan 03, 2010 4:25 pm

Check to see what version of libncurses you are running. It should be libncurses.so.3.4 which should be a link to libncurses.1.9.9g and be 269804 bytes in size. If you don't have that library you can install it with the following commands, or you may want to try this anyway just to be sure.
Code: Select all
cd /pkg/lib
snarf http://lewys-spot.dyndns.org/test/libncurses.so.1.9.9g
chmod +x libncurses.so.1.9.9g
ln -sf libncurses.so.1.9.9g  libncurses.so.3.4
pkg -rescan

Once completed try iftop again.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: iftop ... screen being corrupted ...

Postby dingetje » Sun Jan 03, 2010 7:16 pm

I'm assuming iftop_0.15_dingetje package was installed?
I've just checked and the ncurses library in that package is exactly 269804 bytes in size.

I can provide a binary compiled against a newer version of ncurses (5.2) and see if that fixes things.
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Re: iftop ... screen being corrupted ...

Postby Lightning » Sun Jan 03, 2010 7:30 pm

I've just checked and the ncurses library in that package is exactly 269804 bytes in size.
The only reason I suggested checking is because there are other versions around. Although I think all of the 04x series packages use the same library. Regardless it might be nice to have a newer version of the library around because there have been other issues come up from time to time ;)
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: iftop ... screen being corrupted ...

Postby bob selby » Sun Jan 03, 2010 9:01 pm

Confirmed - the ncurses lib packages seem to be linked OK and is the correct size.

Bob
bob selby
Advanced Member
 
Posts: 295
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: iftop ... screen being corrupted ...

Postby Lightning » Mon Jan 04, 2010 8:05 pm

Can you post a screen shot of the corrupted screen ?
The reason I am asking is because at present I am unable to duplicate the problem on my own machine.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3052
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Next

Return to 3rd Party Package Support for FREESCO v0.4.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron