mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
added function to get max speed of eth - modified interface speed page
This commit is contained in:
parent
b98009fc65
commit
2deb319f57
6 changed files with 167 additions and 38 deletions
|
|
@ -1711,3 +1711,19 @@ function getservbyport(port_num, proto)
|
|||
-- io.write(port_num.."@"..proto.."\n")
|
||||
return(ntop.getservbyport(port_num, proto))
|
||||
end
|
||||
|
||||
-- getSpeedMax
|
||||
function getSpeedMax(ifname)
|
||||
|
||||
if(ifname == nil) then
|
||||
return -1
|
||||
end
|
||||
|
||||
if(ifname ~= "eth0") then
|
||||
return -1
|
||||
end
|
||||
|
||||
ifname = tostring(ifname)
|
||||
|
||||
return(ntop.getSpeedMax(ifname))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue