Talk:Setup an FSG Info Page
Contents |
switch to other graphs
hi thanks for this tool. Do u think that it is possible to switch the Graph to WAN(in) or LAN(in) and so on... also possibility to show single LAN-ports 1,2 and 3.
greets cave 22:40, 16 April 2008 (CEST)
- hi this tool seem to be abandoned by his author (Dbeardls) since july 2006... I repaired his good job to be able to work on 4.3.8. But I haven't been able to do much more. No way that the graph show other than WAN-out. No way to show more than 1 graph. :-( Juansa 18:20, 17 April 2008 (CEST)
Network traffic
I noticed that the Network Traffic goes back to 0 around 4GB. I'm just reporting what ifconfig tells me so they must use a 32 bit int that just wraps at 2^32. I might be able to find a work around. But iptables is first. Dbeardsl 07:53, 21 June 2006 (CEST)
Screenshot
Please add an screenshot --Hormigo 22:42, 16 June 2006 (CEST)
- Done --Dbeardsl 01:39, 17 June 2006 (CEST)
Bug list
Hi, added a bug list to the page. Hope you dont mind. If you want to do it differently, just edit it the way you want. --Rbar 13:45, 3 July 2006 (CEST)
PPTP Dialup / VPN 'kills' graph
Hi There,
When using the FSG as PPTP router....the script malfunctions because of a different /proc/net/dev file! Also an active VPN does 'kill' the traffic graph.
Currently I resolved the issue by setting $numlines = 7 in common.php... Would it be possible to make the PHP dynamic on basis of the number of lines in this file ?? (sorry..no php expert my self)
Brgds,
Maarten van der Hoek
- Sure, I had never considered that... do you think you could do a "cat /proc/net/dev" on your FSG and copy and paste output to a private message to me on the forum? That would help, as I haven't set up my VPN server yet... By the way, you can sign your posts with four tilde characters ~~~~ = Dbeardsl 23:14, 13 July 2006 (CEST)
Network Traffic Graph error / JavaScript Error
Hello,
I have found a small bug in the OutputNetworkInterfacesJSON()function it returned with an extra "," althout of the line ($i == $numlines-1) ? "}" : "},"; that trigered a javascript error So i made the folowing modifications
{
$ifinfo = file("/proc/net/dev");
$interfaces = array("eth0"=>"LAN", "eth1"=>"WAN");
$return = "";
$return.= "({'Time':". customMicroTime(). ",";
$numlines = count($ifinfo);
for($i=2; $i<$numlines; $i++)
{
$line = &$ifinfo[$i];
if(!array_key_exists(trim(getStringBeforeString($line, ":")), $interfaces))
continue;
$values = customExplode($line, " :");
$return.= "'". $interfaces[$values[0]] ."':{";
$return.= "'rx':". $values[1];
$return.= ",'tx':". $values[9];
$return.= ($i == $numlines-1) ? "}" : "},";
}
$return=substr($return,0,-1);
$return.= "})";
echo $return;
}
Regards Gabe Solomon (solomongaby {at} yahoo (dot) com)
Some updates for FW 4.2.7
Here you can find some necessary changes needed for the "Sensor" area of the info page to work with FW 4.2.7
In the file "sensorutil.php" in the includes directory apply following changes:
Change line 2 to:
$sensorlocation = "/sys/devices/platform/IXP4XX-I2C.0/i2c-0/0-0028/";
Change function "readsensors" (starting at line 9) to:
function readsensors(&$sensorvalues)
{
global $integersensors, $firstnumbersensors, $sensors, $sensorlocation;
foreach($sensors as $sensor)
{
if ($sensor == "pwm1")
{
$input = "";
}
else
{
$input = "_input";
}
$value = file_get_contents("$sensorlocation$sensor$input");
$pieces = explode(" ", $value);
//For some of the sensors, the first value is the one we want
if(in_array($sensor, $firstnumbersensors))
$value = $pieces[0];
else
$value = $pieces[count($pieces)-1];
$value = floatval($value)/1000;
if($sensor == "pwm1")
{
$value = $value * 1000/ 255;
}
//Sanity checks
if($sensor == "fan1")
{
$value = $value * 1000;
if($value < 11000 && $value > 1)
array_push($sensorvalues[$sensor], $value);
}
else
array_push($sensorvalues[$sensor], $value);
}
}
This works for me. I'm not sure about the "Pulse Width". I scaled it in a way that it is in the interval from [0, 1].
- ZLO