https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162015-11-15T00:23:33ZpfSense bugtrackerpfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=224472015-11-15T00:23:33ZChris Buechlercbuechler@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li></ul> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=284652016-07-28T16:35:27ZLuca Moncelli
<ul></ul><p>IPv6 issue still present in 2.3.2</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=317672017-02-23T07:24:18ZJim Pingle
<ul><li><strong>Affected Version</strong> changed from <i>2.1-IPv6</i> to <i>All</i></li></ul> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=324572017-04-05T09:31:35ZPim Pishjochen@winteltosh.de
<ul></ul><p>When will this be resolved? This is a really old bug.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=324582017-04-05T09:51:27ZJim Pingle
<ul></ul><p>The underlying program, rate, still doesn't work with IPv6 as far as I'm aware.</p>
<p>I'd love to see rate swapped out for iftop (which does support IPv6) but the output of iftop isn't easy to parse and it has some issues running on interfaces that are disconnected or have no traffic, which makes it difficult to work with in an automated manner. iftop is also connection-oriented so it doesn't give per-host stats like rate. I have some testing code for it but I'm not terribly happy with how it operates yet. I don't see it replacing rate, but perhaps it might work as an add-on package.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397742019-01-15T23:55:46ZDaryl Morse
<ul></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>The underlying program, rate, still doesn't work with IPv6 as far as I'm aware.</p>
<p>I'd love to see rate swapped out for iftop (which does support IPv6) but the output of iftop isn't easy to parse and it has some issues running on interfaces that are disconnected or have no traffic, which makes it difficult to work with in an automated manner. iftop is also connection-oriented so it doesn't give per-host stats like rate. I have some testing code for it but I'm not terribly happy with how it operates yet. I don't see it replacing rate, but perhaps it might work as an add-on package.</p>
</blockquote>
<p>I looked at the man page for rate. It appears to have been written in 2003 by Mateusz Golicz <<a class="email" href="mailto:mteg@jaszczur.org">mteg@jaszczur.org</a>>, aka github.com/mteg. There doesn't appear to be a repository for rate, so you have to think he abandoned it and moved on. I tried emailing him, but he didn't reply. In the absence of the author, the code isn't going to fix itself.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397812019-01-17T11:22:05ZJoshua Sign
<ul></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>I'd love to see rate swapped out for iftop (which does support IPv6) but the output of iftop isn't easy to parse and it has some issues running on interfaces that are disconnected or have no traffic, which makes it difficult to work with in an automated manner. iftop is also connection-oriented so it doesn't give per-host stats like rate. I have some testing code for it but I'm not terribly happy with how it operates yet. I don't see it replacing rate, but perhaps it might work as an add-on package.</p>
</blockquote>
<p>Me too, I am looking for a way to replace rate by iftop.<br />Since iftop-1.0pre3 (2014-01-01), a text output mode was added, so it is possible to get an output like rate.<br />An awk script is good enough for that, i just test something like that :</p>
<pre>
# iftop -nNb -i eth0 -s 1 -o 2s -F 10.0.0.0/8 -t | awk -f iftop_parse.awk
10.0.50.233 3,27Kb 3,27Kb 1,87Kb 1,87Kb
216.58.198.206 1,87Kb 1,87Kb 3,27Kb 3,27Kb
10.0.50.233 1,59Kb 1,59Kb 2,18Kb 2,18Kb
216.58.204.101 2,18Kb 2,18Kb 1,59Kb 1,59Kb
10.0.48.251 896b 896b 0b 0b
224.0.0.18 0b 0b 896b 896b
10.0.51.217 660b 660b 0b 0b
239.255.255.250 0b 0b 660b 660b
10.0.51.9 644b 644b 0b 0b
239.255.255.250 0b 0b 644b 644b
</pre>
<p>The awk script is very simple :<br /><pre>
BEGIN {
FS = " "
numlist = 0
}
{
if ( numlist == 1 && $1 == "--------------------------------------------------------------------------------------------" ) {
numlist = 2
next
}
if ( numlist == 0 && $1 == "--------------------------------------------------------------------------------------------" ) {
numlist = 1
next
}
if ( numlist == 1 ) {
if ( $0 ~ "=>") {
SENDER = $2
STX = $4
STXAVG = $5
getline
RECEIVER = $1
RTX = $3
RTXAVG = $4
print SENDER" "STX" "STXAVG" "RTX" "RTXAVG
print RECEIVER" "RTX" "RTXAVG" "STX" "STXAVG
}
next
}
if ( $1 == "============================================================================================" ) {
numlist = 0
next
}
}
END {
}
</pre></p>
<p>I also notice no errors on disconnected interfaces or when there is no trafic.<br />(version 1.0pre4 of iftop, on 2.4.4 pfsense release)</p>
<p>Please tell me if I can help, or if I just waste our time.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397822019-01-17T12:02:28ZJim Pingle
<ul></ul><p>That does help a bit. It would be even better if iftop had an output mode like libxo where it would be trivial to parse the output, but I'm not sure how the project author(s) would feel about that.</p>
<p>Can you create a PR that changes rate to iftop? No need to worry about the dependency issues at first (adding iftop to base, that is), since we'd need to run it through manual tests before it gets merged anyhow.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397832019-01-17T12:14:45ZJoshua Sign
<ul></ul><p>ok i will work on it and create a PR to change rate by iftop as soon as it works<br />(normaly it should be ok on sunday or before)</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397872019-01-18T10:19:35ZJoshua Sign
<ul></ul><p>Hi Jim,</p>
<p>FYI, I just finish some tests : it seems to works as expected.</p>
<p>All we need to test is :</p>
<p>This awk script 'iftop_parser.awk' :<br /><pre>
BEGIN {
FS = " "
numlist = 0
nblines = 15
printf "\n\n"
}
{
if ( numlist == 1 && $1 == "--------------------------------------------------------------------------------------------" ) {
exit
}
if ( numlist == 0 && $1 == "--------------------------------------------------------------------------------------------" ) {
numlist = 1
next
}
if ( numlist == 1 ) {
if ( $0 ~ "=>" && nblines > 0 ) {
SENDER = $2
STX = pfFormat($4)
getline
RECEIVER = $1
RTX = pfFormat($3)
printf "%s;%s;%s\n", SENDER,RTX,STX
printf "%s;%s;%s\n", RECEIVER,STX,RTX
nblines--
if ( nblines < 1 ) {
exit
}
}
next
}
}
END {
}
function pfFormat(str) {
sub("b","",str)
return str
}
</pre></p>
<p>And these changes in /usr/local/www/bandwidth_by_ip.php :</p>
<p>- replace line 112 by the code bellow :<br /><pre>
$_grb = exec("/usr/bin/timeout 5 /usr/local/sbin/iftop -nNb -i {$real_interface} -s 1 -o 2s -t | /usr/bin/awk -f /root/iftop_parse.awk", $listedIPs);
// Functions format
// TODO : replace by existing function or put this in pfsense-utils.inc
function GMK2bits($val) {
$val = strtolower($val);
if ( strpos($val,"g") !== false ) {
$val = str_replace("g","",$val) * 1000 * 1000 * 1000;
} else if ( strpos($val,"m") !== false ) {
$val = str_replace("m","",$val) * 1000 * 1000;
} else if ( strpos($val,"k") !== false ) {
$val = str_replace("k","",$val) * 1000;
}
return $val*1;
}
function bits2GMK($val) {
$units = array ( 0 => "", 1 => "K", 2 => "M", 3 => "G" );
$u=0;
while ($val > 1000) {
$val = $val/1000;
$u++;
}
return round($val,2).$units[$u];
}
// END of Functions format
// order and group by
foreach ($listedIPs as $k => $line){
if ($line != "") {
$arrLine = explode (";", $line);
$ip = $arrLine[0];
$in = GMK2bits($arrLine[1]);
$out = GMK2bits($arrLine[2]);
if ( isset($arr_in[$ip]) ) {
$arr_in[$ip] += $in;
$arr_out[$ip] += $out;
} else {
$arr_in[$ip] = $in;
$arr_out[$ip] = $out;
}
}
}
if ($sort == "out") {
arsort($arr_out,SORT_NUMERIC);
$arrIP = array_keys($arr_out);
} else {
arsort($arr_in,SORT_NUMERIC);
$arrIP = array_keys($arr_in);
}
unset($listedIPs);
$listedIPs[] = "";
$listedIPs[] = "";
foreach ($arrIP as $k => $ip) {
$listedIPs[] = $ip.";".bits2GMK($arr_in[$ip]).";".bits2GMK($arr_out[$ip]);
}
</pre></p>
<p>- change separator ":" by ";" on the line 180 <br />(it was line 122 before adding the code above) :<br /><pre>
$infoarray = explode (";", $bandwidthinfo);
</pre><br />Unfortunally i don't use IPV6, so i can't test this part.<br />But it was necessary to change this separator to avoid IPV6 confict.</p>
<p>The exec of iftop may take between 1 or 2 seconds most of time.<br />But i experienced some cases where iftop wait more than 7 seconds before giving a result (or no result because not enough traffic).<br />Maybe thats what you experienced when you was talking about issues, so i add 'timeout 5' to the command line to ensure that iftop will not stay stucked and overload the system.<br />Yes it is a crappy solution, but it is not the best we can do.<br />This is even more usefull if there are many users on the status_graph.php : multiples concurrent processes are created. <br />We can look for another way to avoid multiples concurrent processes and increase performances. (i got some ideas)</p>
<p>Please tell me :<br />- if i miss something (i don't use '-F' or '-G' flag, maybe needed for ipv6?)<br />- if the order of IN/OUT bis are corrects... they seems to me<br />- where is the best place for the awk script ? (/etc ? /usr/local/bin ?)<br />- is there an equivalent of GMK2bits / bits2GMK in pfSense ? If there is not, should i add them to pfsense-utils.inc ?<br />- do we try to improve performances about concurrent processes if many users are on the same graph ?</p>
<p>It also should be possible to create a PR by adding iftop as an additional feature instead of replacing rate. (iftop must be added by pkg install)<br />This could be better to avoid any revert if somes have problems with iftop.<br />Otherwise, the old unused code can be removed.</p>
<p>I wait for your instructions and feedbacks if some of us can test it.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397932019-01-18T17:36:15ZDaryl Morse
<ul></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>Unfortunally i don't use IPV6, so i can't test this part.</p>
</blockquote>
<p>I have IPv6 so I would be happy to test when you have something ready. Can you provide it as a patch based on the latest development snapshot?</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397942019-01-18T18:10:06ZJoshua Sign
<ul></ul><p>yes it will be possible soon.</p>
<p>I just wrote this script to avoid process concurrent creation when many users are on the same graph.<br />My tests looks good.</p>
<p>I'll put it in the PR.</p>
<pre>
#!/bin/sh
# Usage
if [ $# -ne 1 ]; then
echo "Usage : $0 iface"
exit
fi
# files paths
pid_file=/var/run/iftop_$1.pid
cache_file=/var/db/iftop_$1.log
awk_script=/root/iftop_parse.awk
# Binaries paths
DATE=/bin/date
STAT=/usr/bin/stat
CUT=/usr/bin/cut
PS=/bin/ps
GREP=/usr/bin/grep
CAT=/bin/cat
RM=/bin/rm
IFTOP=/usr/local/sbin/iftop
AWK=/usr/bin/awk
# test if pid file exist
if [ -f $pid_file ]; then
# check how old is the file
curTS=`$DATE +%s`
pidTS=`$STAT -r $pid_file | $CUT -d " " -f 10`
# if more than 10 seconds,
# it must be a dead pid file (process killed?)
# or a stucked process that we should kill
if [ $(( curTS - pidTS )) -gt 10 ]; then
oldPID=`$CAT $pid_file`
# test if pid still exist
run=`$PS -p $oldPID | $GREP -F '$0'`
if [ "$run" != "" ]; then
kill -9 $oldPID
fi
$RM $pid_file
$RM $cache_file
exit
fi
if [ -f $cache_file ]; then
$CAT $cache_file
fi
exit
fi
echo -n $$ > $pid_file
$IFTOP -nNb -i $1 -s 1 -o 2s -t 2>> /dev/null | $AWK -f $awk_script > $cache_file.1
$CAT $cache_file.1 > $cache_file
$CAT $cache_file
$RM $pid_file
</pre>
<p>Then just change the exec in /usr/local/www/bandwidth_by_ip.php by</p>
<pre>
$_grb = exec("/root/iftop_parser.sh {$real_interface}", $listedIPs);
</pre>
<p>I'll create a PR soon.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397952019-01-18T18:17:58ZJoshua Sign
<ul><li><strong>File</strong> <a href="/attachments/2686">bandwidth_by_ip.php</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2686/bandwidth_by_ip.php">bandwidth_by_ip.php</a> added</li><li><strong>File</strong> <a href="/attachments/2687">iftop_parse.awk</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2687/iftop_parse.awk">iftop_parse.awk</a> added</li><li><strong>File</strong> <a href="/attachments/2688">iftop_parser.sh</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2688/iftop_parser.sh">iftop_parser.sh</a> added</li></ul><p>here are the files you need to easely test, it is faster thant the PR<br />just put the two scripts into the root directory, and replace the /usr/local/www/bandwidth_by_ip.php</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397972019-01-19T00:27:18ZJoshua Sign
<ul><li><strong>File</strong> <a href="/attachments/2689">pfSense_status_graph.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2689/pfSense_status_graph.patch">pfSense_status_graph.patch</a> added</li></ul><p>Here is the patch</p>
<p>/usr/local/bin/iftop_parser.sh must have +x</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=397982019-01-19T02:12:39ZJoshua Sign
<ul></ul><p>PR : <a class="external" href="https://github.com/pfsense/pfsense/pull/4039">https://github.com/pfsense/pfsense/pull/4039</a></p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398002019-01-19T12:33:04ZDaryl Morse
<ul></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>PR : <a class="external" href="https://github.com/pfsense/pfsense/pull/4039">https://github.com/pfsense/pfsense/pull/4039</a></p>
</blockquote>
<p>I installed this patch on the most recent snapshot, built on Sat Jan 19 05:32:33 EST 2019. I used <a class="external" href="http://ipv6-test.com/speedtest/">http://ipv6-test.com/speedtest/</a> to test it, because there are separate speedtests for ipv4 and ipv6, making it easy to see traffic for both protocols. I tried both WAN and LAN, but the patch doesn't show anything for ipv6. For ipv4, I did not see any difference with the patch applied or not applied. I did not reboot after applying the patch. Should I have?</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398012019-01-20T05:36:04ZJoshua Sign
<ul></ul><p>can you chexk over console if iftop shows you some IPV6 adresses just by : `iftop -n` ?</p>
<p>as far as i didn't have any ipv6, it will be difficult to test this part.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398022019-01-20T10:47:07ZDaryl Morse
<ul></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>can you chexk over console if iftop shows you some IPV6 adresses just by : `iftop -n` ?</p>
<p>as far as i didn't have any ipv6, it will be difficult to test this part.</p>
</blockquote>
<p>Sorry mate. iftop -n shows ipv4 and ipv6 traffic, but there is no indication of it in the list of hosts or ip addresses. iftop -n display formats ipv4 and ipv6 traffic exactly the same, except for the addresses (obviously). If you use iftop without -n, it's not possible to tell the difference between ipv4 and ipv6.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398042019-01-20T12:09:10ZJoshua Sign
<ul></ul><p>ok,</p>
<p>to debbug it you can check if there is any ip6 in this output : <br /><pre> /usr/local/bin/iftop_parser.sh eth0 </pre></p>
<p>if there is no ipv6 in the output, please check the output of this command line :<br /><pre> iftop -nNb -i eth0 -s 1 -o 2s -t </pre></p>
<p>You must find ipv6 here, so give me the output for example, the awk script may be wrong.<br />If there is no ipv6 here, i dont understand why.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398062019-01-20T15:58:46ZDaryl Morse
<ul></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>ok,</p>
<p>to debbug it you can check if there is any ip6 in this output : <br />[...]</p>
<p>if there is no ipv6 in the output, please check the output of this command line :<br />[...]</p>
<p>You must find ipv6 here, so give me the output for example, the awk script may be wrong.<br />If there is no ipv6 here, i dont understand why.</p>
</blockquote>
<p>My system does not have a device called eth0. It's using hn1 for the wan and hn0 for the lan. I'd say that's part of the problem.</p>
<p>I got permission denied when I tried to run the script from the console shell.</p>
<p>When I executed the iftop command, there was ipv4 and ipv6 output for both hn0 and hn1. Except for the address format, the output is indistinguishable for ipv4 and ipv6. It's a shame there isn't a way to select ipv4 or ipv6 because if it resolves the hostnames, there is no way to tell them apart.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398072019-01-20T16:01:14ZDaryl Morse
<ul></ul><p>just a thought, if you don't have ipv6, you could set up a tunnel with hurricane electric. It's free, it works very well, and it's easy to set up.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398092019-01-20T16:53:25ZJoshua Sign
<ul></ul><p>Daryl Morse wrote:</p>
<blockquote>
<p>I got permission denied when I tried to run the script from the console shell.</p>
</blockquote>
<p>please check if the script got +x permission, <br />or give it anyway, type this in console :<br /><pre>
chmod 755 /usr/local/bin/iftop_parser.sh
</pre></p>
<p>obiously, eth0 was un axemple, <br />you have to change it according your system.</p>
<p>in the iftop mode, the informations are grabbed by this command for your WAN card :<br /><pre>
iftop -nNb -i hn1 -s 1 -o 2s -t
</pre></p>
<p>and this one for you LAN card :<br /><pre>
iftop -nNb -i hn0 -s 1 -o 2s -t
</pre></p>
<p>Does it gives you ipv6 results ?</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398102019-01-20T17:57:24ZDaryl Morse
<ul><li><strong>File</strong> <a href="/attachments/2691">Capture iftop.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2691/Capture%20iftop.PNG">Capture iftop.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/2692">Capture iftop hn0.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2692/Capture%20iftop%20hn0.PNG">Capture iftop hn0.PNG</a> added</li><li><strong>File</strong> <a href="/attachments/2693">Capture iftop hn1.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2693/Capture%20iftop%20hn1.PNG">Capture iftop hn1.PNG</a> added</li></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>Daryl Morse wrote:</p>
<blockquote>
<p>I got permission denied when I tried to run the script from the console shell.</p>
</blockquote>
<p>please check if the script got +x permission, <br />or give it anyway, type this in console :<br />[...]</p>
<p>obiously, eth0 was un axemple, <br />you have to change it according your system.</p>
<p>in the iftop mode, the informations are grabbed by this command for your WAN card :<br />[...]</p>
<p>and this one for you LAN card :<br />[...]</p>
<p>Does it gives you ipv6 results ?</p>
</blockquote>
<p>I attached a screen capture of the output of the script. There are some errors.</p>
<p>I already told you the output of iftop shows ipv4 and ipv6 and they are identical except for the addresses. A couple of screen captures attached.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398112019-01-20T18:02:12ZDaryl Morse
<ul><li><strong>File</strong> <a href="/attachments/2694">iftop status graph.PNG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2694/iftop%20status%20graph.PNG">iftop status graph.PNG</a> added</li></ul><p>Another screen capture from the status graph.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398132019-01-20T18:48:50ZJoshua Sign
<ul></ul><p>ok,</p>
<p>the first file "File Capture iftop.PNG" show that there is a problem with the awk script.<br />This script is less than 40 lines and errors are about lines 43,76.</p>
<p>Can you check if this is the same file than this :<br /><a class="external" href="https://github.com/pfsense/pfsense/blob/8e73bf65ab51822b438872f13bdf7475ac370365/src/usr/local/bin/iftop_parse.awk">https://github.com/pfsense/pfsense/blob/8e73bf65ab51822b438872f13bdf7475ac370365/src/usr/local/bin/iftop_parse.awk</a></p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398142019-01-20T22:34:14ZDaryl Morse
<ul></ul><p>Joshua Sign wrote:</p>
<blockquote>
<p>ok,</p>
<p>the first file "File Capture iftop.PNG" show that there is a problem with the awk script.<br />This script is less than 40 lines and errors are about lines 43,76.</p>
<p>Can you check if this is the same file than this :<br /><a class="external" href="https://github.com/pfsense/pfsense/blob/8e73bf65ab51822b438872f13bdf7475ac370365/src/usr/local/bin/iftop_parse.awk">https://github.com/pfsense/pfsense/blob/8e73bf65ab51822b438872f13bdf7475ac370365/src/usr/local/bin/iftop_parse.awk</a></p>
</blockquote>
<p>I installed the script using the patch, so it must be the same.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398152019-01-21T04:12:29ZJoshua Sign
<ul><li><strong>File</strong> <a href="/attachments/2695">iftop_parse.awk.gz</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2695/iftop_parse.awk.gz">iftop_parse.awk.gz</a> added</li></ul><p>you are certainly in an issue with bads crlf in the awk script.<br />please update by this one, i gzip it to avoid any copy/paste problem.</p>
<p>fetch it in your pfsense and use this command line to replace the old one :</p>
<pre>
fetch https://redmine.pfsense.org/attachments/download/2695/iftop_parse.awk.gz
gzcat iftop_parse.awk.gz > /usr/local/bin/iftop_parse.awk
</pre> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398192019-01-21T09:42:57ZJim Pingle
<ul></ul><p>With some small modifications, it does work. See my comments on the PR (and future discussion should happen on the PR rather than here)</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398342019-01-21T17:52:19ZDaryl Morse
<ul></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>The underlying program, rate, still doesn't work with IPv6 as far as I'm aware.</p>
<p>I'd love to see rate swapped out for iftop (which does support IPv6) but the output of iftop isn't easy to parse and it has some issues running on interfaces that are disconnected or have no traffic, which makes it difficult to work with in an automated manner. iftop is also connection-oriented so it doesn't give per-host stats like rate. I have some testing code for it but I'm not terribly happy with how it operates yet. I don't see it replacing rate, but perhaps it might work as an add-on package.</p>
</blockquote>
<p>As I mentioned, I emailed the author of rate. He replied this morning and confirmed that he is no longer developing rate. He offered up the source code, if you don't have it already. Let me know if you are interested in the details.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=398382019-01-22T09:24:36ZJim Pingle
<ul></ul><p>Daryl Morse wrote:</p>
<blockquote>
<p>As I mentioned, I emailed the author of rate. He replied this morning and confirmed that he is no longer developing rate. He offered up the source code, if you don't have it already. Let me know if you are interested in the details.</p>
</blockquote>
<p>We already have access to the source code for rate, or it couldn't be compiled into our images. Adapting the GUI to use iftop is almost certainly easier than adapting rate to handle IPv6.</p>
<p>iftop is still being actively developed. If we attempt to adapt rate, then we'd be taking on all the technical debt of maintaining it going forward, on top of the work to make it function now.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=418402019-08-20T13:39:59ZJim Pingle
<ul></ul><p>See also: <a class="issue tracker-2 status-11 priority-4 priority-default closed" title="Feature: Abandon rate in favor of iftop (Duplicate)" href="https://redmine.pfsense.org/issues/7224">#7224</a></p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=422992019-09-11T14:09:03ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Pull Request Review</i></li><li><strong>Target version</strong> set to <i>2.5.0</i></li></ul> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=444752020-02-07T09:52:15ZRenato Botelhorenato@netgate.com
<ul><li><strong>Status</strong> changed from <i>Pull Request Review</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>Renato Botelho</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Pull request has been merged. Thanks!</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=445952020-02-13T00:31:30ZViktor Gurov
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>tested on 2.5.0.a.20200212.1057<br />works as expected</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=446022020-02-13T09:01:14ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>In Progress</i></li></ul><p>There is still a problem or two here.</p>
<p>The iftop binary is not present unless you manually install the pkg. Also the pfSense package (net-mgmt/pfSense-pkg-iftop) needs to be removed since net-mgmt/iftop can now be set as a dependency of the security/pfSense meta pkg.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=446032020-02-13T09:03:44ZJim Pingle
<ul></ul><p>Also it looks like there is an odd condition where the first time you switch to iftop, it doesn't want to display anything. But if you save it as default, navigate away for a few seconds, then go back, it shows data. I'd call it a fluke but it happened on two systems so far.</p>
<p>That could be moved to its own separate (potentially even post-2.5.0) issue if it persists after the pkg issue is sorted.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=482292020-10-01T05:54:26ZRenato Botelhorenato@netgate.com
<ul></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>There is still a problem or two here.</p>
<p>The iftop binary is not present unless you manually install the pkg. Also the pfSense package (net-mgmt/pfSense-pkg-iftop) needs to be removed since net-mgmt/iftop can now be set as a dependency of the security/pfSense meta pkg.</p>
</blockquote>
<p>It's done since Feb</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=482302020-10-01T05:55:22ZRenato Botelhorenato@netgate.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>Also it looks like there is an odd condition where the first time you switch to iftop, it doesn't want to display anything. But if you save it as default, navigate away for a few seconds, then go back, it shows data. I'd call it a fluke but it happened on two systems so far.</p>
<p>That could be moved to its own separate (potentially even post-2.5.0) issue if it persists after the pkg issue is sorted.</p>
</blockquote>
<p>I couldn't reproduce it on recent snapshots. As you said, this ticket is now completed and we can open a new one for specific bugs.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=482452020-10-01T09:50:34ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>I'd say it's working well enough for now. I tried it on a few more systems and it's OK, even on arm.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=491592020-11-02T13:07:05ZJim Pingle
<ul><li><strong>Category</strong> changed from <i>Web Interface</i> to <i>Traffic Graphs</i></li></ul> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=510492021-02-11T02:07:30ZPim Pishjochen@winteltosh.de
<ul></ul><p>I've upgraded to pfSense 2.5 RC but still there are no IPv6 addresses shown in the traffic graph for me. What am I doing wrong?</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=510532021-02-11T07:44:35ZJim Pingle
<ul></ul><p>It doesn't change to the new mode automatically. You have to change it from rate to iftop..</p>
<ul>
<li><strong>Status > Traffic Graph</strong></li>
<li>Set <strong>Mode</strong> to <strong>iftop</strong></li>
<li>Click <strong>Save</strong></li>
</ul>
<p>Make sure it's set to display IP Addresses, not hostnames, or you may not notice when it does report IPv6 traffic.</p>
<p>You might have to navigate away and back to the page for it to start working after the first change to the new mode.</p> pfSense - Bug #3334: Status/Traffic Graph isn't IPv6 readyhttps://redmine.pfsense.org/issues/3334?journal_id=510582021-02-11T08:26:45ZPim Pishjochen@winteltosh.de
<ul></ul><p>Thank you for pointing that out. Now it shows IPv6 addresses. Great work.</p>