[xen-tools] Argo's Host.pm: getRX and getTX values
Ward Vandewege
ward at pong.be
Sun Nov 12 20:59:03 CET 2006
Hi Steve,
So; it seems that the values Argo sends back for RX and TX are from the
perspective of the dom0. This is because the getRX and getTX functions
get their info from /proc/net/dev/ in the dom0.
Now; the problem is that this is not very logical. When the 'info' or 'tx' or
'rx' functions are called, they get the domU's name as a parameter. A user
would expect to get the numbers from the perspective of the domU, because
she's asking for information about the domU, not the dom0.
I suggest we switch the RX and TX values so that they are returned in a more
logical fashion. I'd be happy to submit a patch.
What do you think?
Thanks,
Ward.
--
Pong.be -( "In my opinion M$ is a lot better at making money than )-
Virtual hosting -( it is at making good operating systems." -- Linus )-
http://pong.be -( Torvalds )-
GnuPG public key: http://gpg.dtype.org
-------------- next part --------------
--- Host.pm-orig 2006-11-11 16:10:13.000000000 -0500
+++ Host.pm 2006-11-12 14:47:16.000000000 -0500
@@ -594,7 +594,7 @@
open( NET, "<", "/proc/net/dev" );
foreach my $line ( <NET> )
{
- if ( $line =~ /^vif$id/ )
+ if ( $line =~ /^vif$id\./ )
{
if ( $line =~ /(.*):([ \t]*)([0-9]+)/ )
{
@@ -661,7 +661,7 @@
open( NET, "<", "/proc/net/dev" );
foreach my $line ( <NET> )
{
- if ( $line =~ /^vif$id/ )
+ if ( $line =~ /^vif$id\./ )
{
if ( $line =~ /([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)$/ )
{
@@ -674,6 +674,61 @@
}
More information about the xen-tools-discuss
mailing list