[racktables-users] Re: IPv4 Question

  • From: Les Jones <lcjones@xxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 07 Aug 2009 10:13:22 -0400

Denis,

Excellent. Thank you!

Also, as a side note, in IPv4, the $used/$total is very helpful.
However, I have added this snippet of code to include the math to
display the actual percentage which gives a quick glimpse of overall
usage of IP space. I would like to suggest/request similar coding be
added to the racktables tree. I'm sure it could be written cleaner. :)

In V 0.17.2 at or near line1932 , I have added the following code which
displays on the main IPV4 Tree View.

1932                 renderProgressBar ($total ? $used/$total : 0);
1933                // SHOW IP PERCENTAGE
1934                                 echo "<br><small>${used} /
${total}</small><br>";
1935                                 $pused = ($used / $total)  * 100;
1936                                 echo "<font color=\"red\">";
1937                                 echo "<b>";
1938                                 echo round($pused);
1939                                 echo "%</b></font><small>
Utilization</small>";

And, as well as at or near line 2171 which displays in the summary
portal after a netblock is chosen to view

2171         renderProgressBar ($used/$total);
2172         echo "<br>&nbsp;${used} of ${total}<br>";
2173                 //SHOW IP PERCENTAGE
2174                 $pused = ($used / $total)  * 100;
2175                 echo "<b><font color=\"red\">";
2176                 echo  round($pused);
2177                 echo "%</font> Utilization</b></center></td></tr>\n";

*
Best to you.

Les

***********************************************************
Denis Ovsienko wrote:
>> Is there a way to remove/delete netblocks?
>>     
>
> Networks should be deleted on the "Manage" tab of IPv4 space page. There
> are two points, which can get into the way:
>
> 1. When IPV4_JAYWALK ("Enable IPv4 address allocations w/o covering
> network") mode is not enabled, the "delete" link isn't enabled for
> networks with at least one used (used by any means) address. However,
> sometimes it makes sense to delete and then re-create with a different
> masklen.
>
> 2. When a network contains other networks, its usage counter includes
> all of the counters of the nested networks. This math used to be
> misleading and useless, but 0.17.3 will feature an updated calculation
> function. I have tested it, it's not perfect, but definitely better,
> than the last release. Until that happens, managing aggregate prefixes
> often implies having IPV4_JAYWALK turned on.
>
>   


Other related posts: