diff options
author | damien <damien@mandriva.com> | 2001-04-06 02:53:42 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-04-06 02:53:42 +0000 |
commit | 11581fc7cd86defc01e641d14fc974eac6b5cbe4 (patch) | |
tree | c20f72d92b8d9f6357d69656b3779a6dc19afe32 /perl-install | |
parent | 05b7c72ac663af8b8e31a6a93daea96190a3f1dd (diff) | |
download | drakx-backup-do-not-use-11581fc7cd86defc01e641d14fc974eac6b5cbe4.tar drakx-backup-do-not-use-11581fc7cd86defc01e641d14fc974eac6b5cbe4.tar.gz drakx-backup-do-not-use-11581fc7cd86defc01e641d14fc974eac6b5cbe4.tar.bz2 drakx-backup-do-not-use-11581fc7cd86defc01e641d14fc974eac6b5cbe4.tar.xz drakx-backup-do-not-use-11581fc7cd86defc01e641d14fc974eac6b5cbe4.zip |
updated
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/net_monitor | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index 3c7096e27..d4f7a9350 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -48,10 +48,8 @@ gtkadd($window1, 0, gtkpack_(new Gtk::VBox(0,5), 1, gtkadd(gtkset_shadow_type(new Gtk::Frame("Statistics"), 'etched_out'), gtkpack__(gtkset_border_width(new Gtk::VBox(0,5),5), - gtkpack__(new Gtk::HBox(0,0), _("Receiving Average Speed : "), my $label_avsr = new Gtk::Label("")), - gtkpack__(new Gtk::HBox(0,0), _("Receiving Current Speed : "), my $label_cusr = new Gtk::Label("")), - gtkpack__(new Gtk::HBox(0,0), _("Sending Average Speed : "), my $label_avst = new Gtk::Label("")), - gtkpack__(new Gtk::HBox(0,0), _("Sending Current Speed : "), my $label_cust = new Gtk::Label("")), + gtkpack__(new Gtk::HBox(0,0), _("Receiving Speed : "), my $label_sr = new Gtk::Label("")), + gtkpack__(new Gtk::HBox(0,0), _("Sending Speed : "), my $label_st = new Gtk::Label("")), ) ), 0, my $button_connect = new Gtk::Button("connect"), @@ -74,6 +72,8 @@ my $time_tag = Gtk->timeout_add(1000, sub { my $transmit = $monitor->{$intf}{val}->[8]; my $refr = $monitor->{$intf}{referencer}; my $reft = $monitor->{$intf}{referencet}; + $monitor->{sr} += $recv - $refr; + $monitor->{st} += $transmit - reft; push(@{$monitor->{$intf}{stack_r}}, $recv - $refr); shift @{$monitor->{$intf}{stack_r}} if @{$monitor->{$intf}{stack_r}} > 300; $labelr->set(formatXiB($recv - $monitor->{$intf}{initialr})); @@ -82,10 +82,11 @@ my $time_tag = Gtk->timeout_add(1000, sub { shift @{$monitor->{$intf}{stack_t}} if @{$monitor->{$intf}{stack_t}} > 300; $monitor->{$intf}{referencet} = $transmit; $labelt->set(formatXiB($transmit - $monitor->{$intf}{initialt})); - $monitor->{$intf}{avgsr}+=reicv; - $monitor->{$intf}{avgst}+=transmit; draw_monitor($monitor->{$intf}); } + $label_sr->set(formatXiB($monitor->{sr}) . "/s"); + $label_st->set(formatXiB($monitor->{st}) . "/s"); + $monitor->{$_} = 0 foreach ('sr', 'st'); 1; }); my $time_tag = Gtk->timeout_add(5000, \&update); @@ -136,8 +137,8 @@ sub update { $monitor->{$intf}{pixmap_db}, 0, 0, 0, 0, 300, 150); }); } - $label_avs->set(""); } + 1; } sub draw_monitor { |