Month: October 2010

Perl-CGI Session und Cookie howto

Perl-CGI Session und Cookie howto

Einführung –

Fast 1 Jahr zurück, kämpfte ich eine Menge für die Umsetzung Session und Cookie in Perl-CGI-Anwendung. So dachte an meine Arbeit mit Ihnen allen teilen.
Ich wollte es auf meine Weise zu tun …

Mariä Himmelfahrt, ist Ihr Webserver Apache dh aktivieren, damit Sie CGI-Skripte ausführen

Step 1] Write Auth.pm Perl module –

Please simply copy following Auth.pm perl module for authentication using Session and Cookies…

[root@arun ~]# cat /var/application/module/Auth.pm

package Auth;

### Subroutine to authenticate user
sub  User
{
my ($ref_page) = (@_);
### Session information
my $sid = $ref_page->cookie(“APP_SID”) || undef;
my $session = CGI::Session->load(undef,$sid);
if ( $session->is_expired ) { print $ref_page->redirect(-location => ‘../arun.html’);}
elsif ( $session->is_empty) { print $ref_page->redirect(-location => ‘../arun.html’);}
else { print $ref_page->header();}
# don’t forget to create dir ‘/var/tmp’
# with proper ownership/permission
#$session = new CGI::Session(undef, $sid, {Directory=>’/var/tmp’});
#################################################
return($session->param(‘login_user’));
}

1;
[root@arun ~]#

Step 2] authe_me.pl –

authe_me.pl file is used to set cookies and verify username/password. You may use MySQL DB to store username and password.
In this case you have to this file…

[root@arun ~]# cat /var/application/www/cgi-bin/auth_me.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth; ## our module

### Header
########################
my $page = CGI->new();
##print $page->header();

##########
if ( $ENV{REQUEST_METHOD} eq “POST” )
{
my %form;
my $session_dir=”/var/tmp”;
my ($admin_user,$admin_password) = (“admin”,”arun123″);

foreach my $key (param()) { $form{$key} = param($key);}
##
if (($form{username}) && ($form{password}))
{

### Session Details ###
CGI::Session->name(“APP_SID”);
## Create new session
my $session = new CGI::Session(undef, undef, {Directory=>$session_dir});
## Set cookies
my $cookie = $page->cookie(-name=>$session->name(),-value=>$session->id(),-expires=>’+2h’,-path=>’/’);
## Store data in session variable and save it
$session->param(‘login_user’,$form{username}); # OR
##$session->param(-name=>’login_user’,-value=>$form{username});
$session->save_param($page, [“login_user”]);

## Session and Cookie expiration time is SAME.
$session->expire(“+2h”);
#### Session Details end ####

## if login successful redirect to main.pl else login page
if (($form{username} eq $admin_user) and ($form{password} eq $admin_password))
{ print $page->redirect(-location => ‘main.pl’,-cookie=>$cookie);}
else { print $page->redirect(-location => ‘../arun.html’); }
############################
} else { print $page->redirect(-location => ‘../arun.html’); }
}

[root@arun ~]#

Step 3] Create Login Page –

[root@arun ~]# cat /var/application/www/arun.html
<html>
<title>Arun Login Page</title>

<!– Form start –>
<table align=’center’ border=’1′>
<form method=”POST” action=”cgi-bin/auth_me.pl”>
<tr>
<td><label>Login</label></td>
<td><input name=”username” type=”text”></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input name=”password” type=”password”><br/></td>
</tr>
<tr>
<td><input value=”Submit” type=”submit”></td>
</tr>

</form>
</table>

</html>

[root@arun ~]#

Step 4] Create main page where Session and Cookie authentication verified – main.pl

[root@arun ~]# cat /var/application/www/cgi-bin/main.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth;

### Header
my $page = CGI->new();
## check authentication
my $login_name=Auth::User($page);
###
print $page->start_html( -title=>’Arun Main Page’);

print “<h3>This is Main Page</h3></br>”;
print “<br>Login Name – $login_name”;

#end
[root@arun ~]#

Step 5] Please access login page and try http://your_ipaddr/arun.html

Thank you,
Arun Bagul

Perl CGI – सेशन और कुकी हाउटू

Perl CGI – सेशन और कुकी हाउटू

परिचय –

लगभग 1 साल पहले, मैं पर्ल CGI आवेदन में सत्र और कुकी को लागू करने के लिए एक बहुत संघर्ष किया. ऐसा करने के लिए आप के साथ अपने काम सभी शेयर सोचा.
मैं इसे अपने तरीके से करना चाहता था …

धारणा है, अपने वेब सर्वर यानी अपेक को CGI स्क्रिप्ट चलाने के लिए सक्षम है

Step 1] Write Auth.pm Perl module –

Please simply copy following Auth.pm perl module for authentication using Session and Cookies…

[root@arun ~]# cat /var/application/module/Auth.pm

package Auth;

### Subroutine to authenticate user
sub  User
{
my ($ref_page) = (@_);
### Session information
my $sid = $ref_page->cookie(“APP_SID”) || undef;
my $session = CGI::Session->load(undef,$sid);
if ( $session->is_expired ) { print $ref_page->redirect(-location => ‘../arun.html’);}
elsif ( $session->is_empty) { print $ref_page->redirect(-location => ‘../arun.html’);}
else { print $ref_page->header();}
# don’t forget to create dir ‘/var/tmp’
# with proper ownership/permission
#$session = new CGI::Session(undef, $sid, {Directory=>’/var/tmp’});
#################################################
return($session->param(‘login_user’));
}

1;
[root@arun ~]#

Step 2] authe_me.pl –

authe_me.pl file is used to set cookies and verify username/password. You may use MySQL DB to store username and password.
In this case you have to this file…

[root@arun ~]# cat /var/application/www/cgi-bin/auth_me.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth; ## our module

### Header
########################
my $page = CGI->new();
##print $page->header();

##########
if ( $ENV{REQUEST_METHOD} eq “POST” )
{
my %form;
my $session_dir=”/var/tmp”;
my ($admin_user,$admin_password) = (“admin”,”arun123″);

foreach my $key (param()) { $form{$key} = param($key);}
##
if (($form{username}) && ($form{password}))
{

### Session Details ###
CGI::Session->name(“APP_SID”);
## Create new session
my $session = new CGI::Session(undef, undef, {Directory=>$session_dir});
## Set cookies
my $cookie = $page->cookie(-name=>$session->name(),-value=>$session->id(),-expires=>’+2h’,-path=>’/’);
## Store data in session variable and save it
$session->param(‘login_user’,$form{username}); # OR
##$session->param(-name=>’login_user’,-value=>$form{username});
$session->save_param($page, [“login_user”]);

## Session and Cookie expiration time is SAME.
$session->expire(“+2h”);
#### Session Details end ####

## if login successful redirect to main.pl else login page
if (($form{username} eq $admin_user) and ($form{password} eq $admin_password))
{ print $page->redirect(-location => ‘main.pl’,-cookie=>$cookie);}
else { print $page->redirect(-location => ‘../arun.html’); }
############################
} else { print $page->redirect(-location => ‘../arun.html’); }
}

[root@arun ~]#

Step 3] Create Login Page –

[root@arun ~]# cat /var/application/www/arun.html
<html>
<title>Arun Login Page</title>

<!– Form start –>
<table align=’center’ border=’1′>
<form method=”POST” action=”cgi-bin/auth_me.pl”>
<tr>
<td><label>Login</label></td>
<td><input name=”username” type=”text”></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input name=”password” type=”password”><br/></td>
</tr>
<tr>
<td><input value=”Submit” type=”submit”></td>
</tr>

</form>
</table>

</html>

[root@arun ~]#

Step 4] Create main page where Session and Cookie authentication verified – main.pl

[root@arun ~]# cat /var/application/www/cgi-bin/main.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth;

### Header
my $page = CGI->new();
## check authentication
my $login_name=Auth::User($page);
###
print $page->start_html( -title=>’Arun Main Page’);

print “<h3>This is Main Page</h3></br>”;
print “<br>Login Name – $login_name”;

#end
[root@arun ~]#

Step 5] Please access login page and try http://your_ipaddr/arun.html

Thank you,
Arun Bagul

Perl CGI – Session et howto Cookie

Perl CGI – Session et howto Cookie

Introduction –

Près de 1 an en arrière, je me suis battu beaucoup pour la mise en œuvre de session et des cookies dans Perl CGI application. Donc, la pensée de partager mon travail avec vous tous.
Je voulais le faire à ma façon …

L’Assomption, à savoir votre apache serveur Web est activé pour exécuter des scripts CGI

Step 1] Write Auth.pm Perl module –

Please simply copy following Auth.pm perl module for authentication using Session and Cookies…

[root@arun ~]# cat /var/application/module/Auth.pm

package Auth;

### Subroutine to authenticate user
sub  User
{
my ($ref_page) = (@_);
### Session information
my $sid = $ref_page->cookie(“APP_SID”) || undef;
my $session = CGI::Session->load(undef,$sid);
if ( $session->is_expired ) { print $ref_page->redirect(-location => ‘../arun.html’);}
elsif ( $session->is_empty) { print $ref_page->redirect(-location => ‘../arun.html’);}
else { print $ref_page->header();}
# don’t forget to create dir ‘/var/tmp’
# with proper ownership/permission
#$session = new CGI::Session(undef, $sid, {Directory=>’/var/tmp’});
#################################################
return($session->param(‘login_user’));
}

1;
[root@arun ~]#

Step 2] authe_me.pl –

authe_me.pl file is used to set cookies and verify username/password. You may use MySQL DB to store username and password.
In this case you have to this file…

[root@arun ~]# cat /var/application/www/cgi-bin/auth_me.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth; ## our module

### Header
########################
my $page = CGI->new();
##print $page->header();

##########
if ( $ENV{REQUEST_METHOD} eq “POST” )
{
my %form;
my $session_dir=”/var/tmp”;
my ($admin_user,$admin_password) = (“admin”,”arun123″);

foreach my $key (param()) { $form{$key} = param($key);}
##
if (($form{username}) && ($form{password}))
{

### Session Details ###
CGI::Session->name(“APP_SID”);
## Create new session
my $session = new CGI::Session(undef, undef, {Directory=>$session_dir});
## Set cookies
my $cookie = $page->cookie(-name=>$session->name(),-value=>$session->id(),-expires=>’+2h’,-path=>’/’);
## Store data in session variable and save it
$session->param(‘login_user’,$form{username}); # OR
##$session->param(-name=>’login_user’,-value=>$form{username});
$session->save_param($page, [“login_user”]);

## Session and Cookie expiration time is SAME.
$session->expire(“+2h”);
#### Session Details end ####

## if login successful redirect to main.pl else login page
if (($form{username} eq $admin_user) and ($form{password} eq $admin_password))
{ print $page->redirect(-location => ‘main.pl’,-cookie=>$cookie);}
else { print $page->redirect(-location => ‘../arun.html’); }
############################
} else { print $page->redirect(-location => ‘../arun.html’); }
}

[root@arun ~]#

Step 3] Create Login Page –

[root@arun ~]# cat /var/application/www/arun.html
<html>
<title>Arun Login Page</title>

<!– Form start –>
<table align=’center’ border=’1′>
<form method=”POST” action=”cgi-bin/auth_me.pl”>
<tr>
<td><label>Login</label></td>
<td><input name=”username” type=”text”></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input name=”password” type=”password”><br/></td>
</tr>
<tr>
<td><input value=”Submit” type=”submit”></td>
</tr>

</form>
</table>

</html>

[root@arun ~]#

Step 4] Create main page where Session and Cookie authentication verified – main.pl

[root@arun ~]# cat /var/application/www/cgi-bin/main.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth;

### Header
my $page = CGI->new();
## check authentication
my $login_name=Auth::User($page);
###
print $page->start_html( -title=>’Arun Main Page’);

print “<h3>This is Main Page</h3></br>”;
print “<br>Login Name – $login_name”;

#end
[root@arun ~]#

Step 5] Please access login page and try http://your_ipaddr/arun.html

Thank you,
Arun Bagul

Perl CGI – Session en Cookie howto

Perl CGI – Session en Cookie howto

Inleiding –

Bijna 1 jaar terug, worstelde ik veel voor de uitvoering van sessie en cookie in Perl CGI-toepassing. Dus dacht om mijn werk met jullie allemaal delen.
Ik wilde het doen op mijn manier …

Aanname, is uw webserver bijvoorbeeld Apache ingesteld om CGI-scripts draaien

Step 1] Write Auth.pm Perl module –

Please simply copy following Auth.pm perl module for authentication using Session and Cookies…

[root@arun ~]# cat /var/application/module/Auth.pm

package Auth;

### Subroutine to authenticate user
sub  User
{
my ($ref_page) = (@_);
### Session information
my $sid = $ref_page->cookie(“APP_SID”) || undef;
my $session = CGI::Session->load(undef,$sid);
if ( $session->is_expired ) { print $ref_page->redirect(-location => ‘../arun.html’);}
elsif ( $session->is_empty) { print $ref_page->redirect(-location => ‘../arun.html’);}
else { print $ref_page->header();}
# don’t forget to create dir ‘/var/tmp’
# with proper ownership/permission
#$session = new CGI::Session(undef, $sid, {Directory=>’/var/tmp’});
#################################################
return($session->param(‘login_user’));
}

1;
[root@arun ~]#

Step 2] authe_me.pl –

authe_me.pl file is used to set cookies and verify username/password. You may use MySQL DB to store username and password.
In this case you have to this file…

[root@arun ~]# cat /var/application/www/cgi-bin/auth_me.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth; ## our module

### Header
########################
my $page = CGI->new();
##print $page->header();

##########
if ( $ENV{REQUEST_METHOD} eq “POST” )
{
my %form;
my $session_dir=”/var/tmp”;
my ($admin_user,$admin_password) = (“admin”,”arun123″);

foreach my $key (param()) { $form{$key} = param($key);}
##
if (($form{username}) && ($form{password}))
{

### Session Details ###
CGI::Session->name(“APP_SID”);
## Create new session
my $session = new CGI::Session(undef, undef, {Directory=>$session_dir});
## Set cookies
my $cookie = $page->cookie(-name=>$session->name(),-value=>$session->id(),-expires=>’+2h’,-path=>’/’);
## Store data in session variable and save it
$session->param(‘login_user’,$form{username}); # OR
##$session->param(-name=>’login_user’,-value=>$form{username});
$session->save_param($page, [“login_user”]);

## Session and Cookie expiration time is SAME.
$session->expire(“+2h”);
#### Session Details end ####

## if login successful redirect to main.pl else login page
if (($form{username} eq $admin_user) and ($form{password} eq $admin_password))
{ print $page->redirect(-location => ‘main.pl’,-cookie=>$cookie);}
else { print $page->redirect(-location => ‘../arun.html’); }
############################
} else { print $page->redirect(-location => ‘../arun.html’); }
}

[root@arun ~]#

Step 3] Create Login Page –

[root@arun ~]# cat /var/application/www/arun.html
<html>
<title>Arun Login Page</title>

<!– Form start –>
<table align=’center’ border=’1′>
<form method=”POST” action=”cgi-bin/auth_me.pl”>
<tr>
<td><label>Login</label></td>
<td><input name=”username” type=”text”></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input name=”password” type=”password”><br/></td>
</tr>
<tr>
<td><input value=”Submit” type=”submit”></td>
</tr>

</form>
</table>

</html>

[root@arun ~]#

Step 4] Create main page where Session and Cookie authentication verified – main.pl

[root@arun ~]# cat /var/application/www/cgi-bin/main.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth;

### Header
my $page = CGI->new();
## check authentication
my $login_name=Auth::User($page);
###
print $page->start_html( -title=>’Arun Main Page’);

print “<h3>This is Main Page</h3></br>”;
print “<br>Login Name – $login_name”;

#end
[root@arun ~]#

Step 5] Please access login page and try http://your_ipaddr/arun.html

Thank you,
Arun Bagul

的Perl的CGI – 会话和Cookie howto中

的Perl的CGI – 会话和Cookie howto中

简介 –

差不多一年后,我奋斗了Perl的CGI应用程序执行会话和cookie了很多。所以,认为与你分享我的所有工作。
我要尽我的方式…

假设,即您的Web服务器Apache是运行CGI脚本启用

Step 1] Write Auth.pm Perl module –

Please simply copy following Auth.pm perl module for authentication using Session and Cookies…

[root@arun ~]# cat /var/application/module/Auth.pm

package Auth;

### Subroutine to authenticate user
sub  User
{
my ($ref_page) = (@_);
### Session information
my $sid = $ref_page->cookie(“APP_SID”) || undef;
my $session = CGI::Session->load(undef,$sid);
if ( $session->is_expired ) { print $ref_page->redirect(-location => ‘../arun.html’);}
elsif ( $session->is_empty) { print $ref_page->redirect(-location => ‘../arun.html’);}
else { print $ref_page->header();}
# don’t forget to create dir ‘/var/tmp’
# with proper ownership/permission
#$session = new CGI::Session(undef, $sid, {Directory=>’/var/tmp’});
#################################################
return($session->param(‘login_user’));
}

1;
[root@arun ~]#

Step 2] authe_me.pl –

authe_me.pl file is used to set cookies and verify username/password. You may use MySQL DB to store username and password.
In this case you have to this file…

[root@arun ~]# cat /var/application/www/cgi-bin/auth_me.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth; ## our module

### Header
########################
my $page = CGI->new();
##print $page->header();

##########
if ( $ENV{REQUEST_METHOD} eq “POST” )
{
my %form;
my $session_dir=”/var/tmp”;
my ($admin_user,$admin_password) = (“admin”,”arun123″);

foreach my $key (param()) { $form{$key} = param($key);}
##
if (($form{username}) && ($form{password}))
{

### Session Details ###
CGI::Session->name(“APP_SID”);
## Create new session
my $session = new CGI::Session(undef, undef, {Directory=>$session_dir});
## Set cookies
my $cookie = $page->cookie(-name=>$session->name(),-value=>$session->id(),-expires=>’+2h’,-path=>’/’);
## Store data in session variable and save it
$session->param(‘login_user’,$form{username}); # OR
##$session->param(-name=>’login_user’,-value=>$form{username});
$session->save_param($page, [“login_user”]);

## Session and Cookie expiration time is SAME.
$session->expire(“+2h”);
#### Session Details end ####

## if login successful redirect to main.pl else login page
if (($form{username} eq $admin_user) and ($form{password} eq $admin_password))
{ print $page->redirect(-location => ‘main.pl’,-cookie=>$cookie);}
else { print $page->redirect(-location => ‘../arun.html’); }
############################
} else { print $page->redirect(-location => ‘../arun.html’); }
}

[root@arun ~]#

Step 3] Create Login Page –

[root@arun ~]# cat /var/application/www/arun.html
<html>
<title>Arun Login Page</title>

<!– Form start –>
<table align=’center’ border=’1′>
<form method=”POST” action=”cgi-bin/auth_me.pl”>
<tr>
<td><label>Login</label></td>
<td><input name=”username” type=”text”></td>
</tr>
<tr>
<td><label>Password</label></td>
<td><input name=”password” type=”password”><br/></td>
</tr>
<tr>
<td><input value=”Submit” type=”submit”></td>
</tr>

</form>
</table>

</html>

[root@arun ~]#

Step 4] Create main page where Session and Cookie authentication verified – main.pl

[root@arun ~]# cat /var/application/www/cgi-bin/main.pl
#!/usr/bin/perl

sub BEGIN
{
unshift (@INC, ‘/var/application/module/’);
}

use strict;
use warnings;
use CGI qw(:standard);
use CGI::Session;
use Auth;

### Header
my $page = CGI->new();
## check authentication
my $login_name=Auth::User($page);
###
print $page->start_html( -title=>’Arun Main Page’);

print “<h3>This is Main Page</h3></br>”;
print “<br>Login Name – $login_name”;

#end
[root@arun ~]#

Step 5] Please access login page and try http://your_ipaddr/arun.html

Thank you,
Arun Bagul

Cómo probar el rendimiento de red y ancho de banda

Cómo probar el rendimiento de red y ancho de banda

Introducción –

La latencia de red y ancho de banda son los dos indicadores más probable que sea de interés al punto de referencia de una red. Aunque la mayoría de servicios y publicidad de los productos se centra en el ancho de banda, a veces, la latencia puede ser un indicador más importante.

** ¿Qué es el ancho de banda?

Ancho de banda (BW) en redes de computadoras se refiere a la velocidad de datos con el apoyo de una conexión de red o interfaz. BW se mide en términos de bits por segundo (bps).

** ¿Qué es la latencia de la red?

La latencia es una medida de tiempo de retraso experimentado en un sistema. La latencia de red se define simplemente como el tiempo de retardo observado como transmite los datos de un punto a otro. Hay una serie de factores que contribuyen a la latencia de la red. Estos incluyen la transmisión (medio de la conectividad), Distancia, routers y los retrasos de hardware.

Lista de proyectos utilizados para probar el rendimiento de red y ancho de banda –

1) bmon – monitor de ancho de banda y estimador de la tasa, es la consola basada en directo BW
2) bwbar – uso de ancho de banda en formato de texto y gráficos
3) BMW-ng – Bandwidth Monitor NG (Next Generation, en vivo PC, la consola basada en
4) Dstat – Dstat es un reemplazo para vmstat, iostat y ifstat.
5) iftop – el uso de ancho de banda en una interfaz, basada en la consola
6) iperf – Realizar las pruebas de rendimiento de redes apostar dos de acogida
7) ifstat – Informe interfaz de estadísticas
8) metros cúbicos – Color medidor de ancho de banda, basado en consola
9) etherape – Red Gráfica navegador tráfico
10) iptraf – interactivo colorido IP LAN Monitor, la consola y la interfaz gráfica basada en
11) netmrg – Es el demonio, apoyar mySQL, reúne datos de los dispositivos.
12) nuttcp – herramienta de red de medición del desempeño
13) nepim

NOTA ~ Para algunos de ellos los paquetes rpm o deb no están disponibles!

Paso 1] Cómo instalar en RedHat / RHCE, el sistema de CentOS base y el sistema basado en Dibian?

root@me:~# yum install netperf iperf nuttcp nepim lmbench

** Ubuntu –

root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg

Paso 2] Modo de uso – bmon, BWM-ng, Dstat, ifstat –

root@me:~# bmon

interface: lo at me.arun.world

#   Interface                RX Rate         RX #     TX Rate         TX #
───────────────────────────────────────────────────────────────────────────────
me.arun.host (source: local)
0   lo                         0.00B            0       0.00B            0
1   eth0                       0.00B            0       0.00B            0
2   eth2                       0.00B            0       0.00B            0
3   vboxnet0                   0.00B            0       0.00B            0
4   pan0                       0.00B            0       0.00B            0
5   ppp0                      69.39KiB         61       7.49KiB         44

root@me:~# bwm-ng

bwm-ng v0.6 (probing every 0.500s), press ‘h’ for help
input: /proc/net/dev type: rate
\         iface                   Rx                   Tx                Total
==============================================================================
lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth0:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth2:           0.00 KB/s            0.00 KB/s            0.00 KB/s
ppp0:          64.39 KB/s            7.92 KB/s           72.31 KB/s
——————————————————————————
total:          64.39 KB/s            7.92 KB/s           72.31 KB/s

root@me:~# dstat
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
7   4  85   4   0   0| 281k  110k|   0     0 |   0     0 | 865  3013
8   4  88   0   0   0|   0     0 |7027B 1261B|   0     0 | 956  4505
8   5  86   0   0   0|   0     0 |  14k 1867B|   0     0 |1144  3332
9   5  86   0   1   0|   0     0 |  79k 2496B|   0     0 |1360  3366
18   8  74   0   0   0|   0     0 |  52k 6511B|   0     0 |1299  3618
8   6  85   0   1   0|   0     0 |  35k 5339B|   0     0 |1094  4231
6   4  90   0   0   0|   0     0 |   0  3164B|   0     0 | 953  2750 ^C
root@me:~#

root@me:~# ifstat
eth0                eth2                ppp0
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
0.00      0.00      0.00      0.00     95.73      4.31
0.00      0.00      0.00      0.00     67.93      8.17
0.00      0.00      0.00      0.00    106.77     13.70

** Inicio “iperf” servidor en un host (A) y el cliente en otro host (B) – para medir el rendimiento de red entre dos hosts.

* Host -A

root@me:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
[  4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 56171
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec

* Host -B
test@hostB:~$ iperf -c 192.168.0.1
————————————————————
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 49.5 KByte (default)
————————————————————
[  3] local 192.168.0.2 port 56171 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec
test@hostB:~$

root@me:~# iftop
root@me:~# cbm

Thank you,
Arun Bagul

كيفية اختبار أداء الشبكة وعرض النطاق الترددي

كيفية اختبار أداء الشبكة وعرض النطاق الترددي

— مقدمة

شبكة الكمون وعرض النطاق الترددي هي مقاييس اثنين من الأرجح أن تكون ذات فائدة عند مؤشر الشبكة. بالرغم من أن معظم الخدمات والمنتجات الإعلان يركز على عرض النطاق الترددي ، في بعض الأحيان يمكن أن يكون الكمون أهم متري.

** ما هو عرض النطاق الترددي؟

عرض النطاق الترددي (البيولوجية) في شبكات الحاسوب يشير إلى معدل البيانات التي تدعمها شبكة اتصال أو واجهة. يتم قياس وزن الجسم من حيث بت في الثانية (بت في الثانية).

** ما هي شبكة الكمون؟

الكمون هي مقياس لتأخير الوقت من ذوي الخبرة في هذا النظام. ويعرف ببساطة شبكة الكمون والتأخير الوقت كما لوحظ ينقل البيانات من نقطة واحدة إلى أخرى. وهناك عدد من العوامل التي تسهم في استتار الشبكة. وتشمل هذه نقل (متوسطة من الاتصال) ، المسافة والموجهات والتأخير أجهزة الكمبيوتر.

قائمة المشاريع استخدامها لاختبار أداء الشبكة وعرض النطاق الترددي —

1) bmon — رصد عرض النطاق الترددي ومعدل مقدر ، هو أساس وحدة والعيش الأسلحة البيولوجية
2) bwbar — استخدام عرض النطاق الترددي في النص والرسومات تنسيق
3) bwm – نانوغرام — عرض النطاق الترددي مراقب نغ (الجيل التالي ، ويعيش الأسلحة البيولوجية ، وحدة تستند
4) dstat — Dstat هو استبدال لiostat ، vmstat وifstat.
وحدة التحكم يستند استخدام عرض النطاق الترددي على واجهة ، — 5) iftop
رهان الإنتاجية شبكة إجراء اختبارات اثنين المضيف — 6) iperf
7) ifstat — تقرير واجهة إحصائيات
وحدة التحكم يستند لون باندوتز متر ، — 8) تدابير بناء الثقة
9) etherape — الرسومات متصفح شبكة المرور
10) iptraf — ملون التفاعلية الملكية الفكرية المحلية مراقب ، وحدة التحكم واجهة المستخدم الرسومية تستند
11) netmrg — إنه شيطان يستند إلى دعم الخلية ، تجمع البيانات من الأجهزة.
12) nuttcp — شبكة أداة قياس الأداء
13) nepim

ملاحظة ~ وبالنسبة للبعض منهم دورة في الدقيقة أو ديب حزم غير متوفرة!

خطوة 1] كيفية تثبيت على ردهات / RHCE ، CentOS النظام القائم والنظام القائم Dibian؟

root@me:~# yum install netperf iperf nuttcp nepim lmbench

** أوبونتو —

root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg

الخطوة 2] كيفية استخدام — bmon ، bwm ، نغ ، dstat ، ifstat —

root@me:~# bmon

interface: lo at me.arun.world

#   Interface                RX Rate         RX #     TX Rate         TX #
───────────────────────────────────────────────────────────────────────────────
me.arun.host (source: local)
0   lo                         0.00B            0       0.00B            0
1   eth0                       0.00B            0       0.00B            0
2   eth2                       0.00B            0       0.00B            0
3   vboxnet0                   0.00B            0       0.00B            0
4   pan0                       0.00B            0       0.00B            0
5   ppp0                      69.39KiB         61       7.49KiB         44

root@me:~# bwm-ng

bwm-ng v0.6 (probing every 0.500s), press ‘h’ for help
input: /proc/net/dev type: rate
\         iface                   Rx                   Tx                Total
==============================================================================
lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth0:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth2:           0.00 KB/s            0.00 KB/s            0.00 KB/s
ppp0:          64.39 KB/s            7.92 KB/s           72.31 KB/s
——————————————————————————
total:          64.39 KB/s            7.92 KB/s           72.31 KB/s

root@me:~# dstat
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
7   4  85   4   0   0| 281k  110k|   0     0 |   0     0 | 865  3013
8   4  88   0   0   0|   0     0 |7027B 1261B|   0     0 | 956  4505
8   5  86   0   0   0|   0     0 |  14k 1867B|   0     0 |1144  3332
9   5  86   0   1   0|   0     0 |  79k 2496B|   0     0 |1360  3366
18   8  74   0   0   0|   0     0 |  52k 6511B|   0     0 |1299  3618
8   6  85   0   1   0|   0     0 |  35k 5339B|   0     0 |1094  4231
6   4  90   0   0   0|   0     0 |   0  3164B|   0     0 | 953  2750 ^C
root@me:~#

root@me:~# ifstat
eth0                eth2                ppp0
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
0.00      0.00      0.00      0.00     95.73      4.31
0.00      0.00      0.00      0.00     67.93      8.17
0.00      0.00      0.00      0.00    106.77     13.70

** ابدأ “iperf” ملقم على مضيف واحد (أ) والعميل على مضيف آخر (ب) — شبكة لقياس الإنتاجية بين البلدين المضيفين.

* Host -A

root@me:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
[  4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 56171
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec

* Host -B
test@hostB:~$ iperf -c 192.168.0.1
————————————————————
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 49.5 KByte (default)
————————————————————
[  3] local 192.168.0.2 port 56171 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec
test@hostB:~$

root@me:~# iftop
root@me:~# cbm

Thank you,
Arun Bagul

केसे करना है नेटवर्क और बैंडविड्थ का परीक्षण

केसे करना है नेटवर्क और बैंडविड्थ का परीक्षण

परिचय –

विलंबता नेटवर्क और बैंडविड्थ दो सबसे हित के होने की संभावना मीट्रिक्स हैं जब आप बेंचमार्क एक नेटवर्क. हालांकि अधिकांश सेवा और उत्पाद विज्ञापन समय पर बैंडविड्थ, पर केंद्रित एक अधिक विलंबता मीट्रिक महत्वपूर्ण हो सकता है.

** क्या बैंडविड्थ है?

बैंडविड्थ (BW) कंप्यूटर नेटवर्किंग में डेटा एक नेटवर्क कनेक्शन या अंतरफलक के द्वारा समर्थित दर को दर्शाता है. BW प्रति सेकंड बिट (bps) के संदर्भ में मापा जाता है.

** क्या नेटवर्क विलंबता है?

विलंबता समय में देरी का एक उपाय एक प्रणाली में अनुभव होता है. नेटवर्क विलंबता बस के रूप में समय में देरी एक बिंदु से डाटा संचारित रूप में एक और करने के लिए मनाया परिभाषित किया गया है. वहाँ कारकों की है कि नेटवर्क विलंबता में योगदान का एक नंबर रहे हैं. इन ट्रांसमिशन में शामिल हैं (संपर्क के माध्यम), दूरस्थ Routers, और कंप्यूटर हार्डवेयर देरी.

नेटवर्क  और बैंडविड्थ का परीक्षण करने के लिए परियोजनाओं (टूल्स) की सूची –

1) bmon – बैंडविड्थ की निगरानी और, यह आधारित सांत्वना है दर अनुमानक, BW रहते हैं
2) bwbar – पाठ और ग्राफ़िकल में बैंडविड्थ उपयोग प्रारूप
) BWM-एनजी 3 – बैंडविड्थ की निगरानी एनजी (अगली पीढ़ी, BW रहते हैं, आधारित सांत्वना
4) dstat – Dstat vmstat iostat, और ifstat के लिए एक प्रतिस्थापन है.
5) iftop – एक अंतरफलक पर बैंडविड्थ उपयोग, आधारित सांत्वना
6) iperf – प्रदर्शन नेटवर्क throughput परीक्षणों दो मेजबान शर्त
7) ifstat – रिपोर्ट इंटरफ़ेस सांख्यिकी
8) सीबीएम – रंग बैंडविड्थ मीटर, आधारित सांत्वना
9) etherape – ग्राफिकल नेटवर्क यातायात ब्राउज़र
10) iptraf – इंटरएक्टिव रंगीन आईपी लैन मॉनिटर कंसोल, और GUI आधारित
11) netmrg – यह आधारित डेमॉन, mySQL समर्थन, उपकरणों से इकट्ठा डेटा है.
12) nuttcp – नेटवर्क प्रदर्शन मापन उपकरण
13) nepim

नोट उनमें से कुछ के लिए rpm या देब संकुल ~ उपलब्ध नहीं हैं!

कदम 1]  RedHat / RHCE, CentOS और Dibian आधारित प्रणाली पर स्थापित करने के लिए  –

root@me:~# yum install netperf iperf nuttcp nepim lmbench

** Ubuntu –

root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg

कदम 2]  bmon, BWM-एनजी, dstat, ifstat का उपयोग कैसे करें   –

root@me:~# bmon

interface: lo at me.arun.world

#   Interface                RX Rate         RX #     TX Rate         TX #
───────────────────────────────────────────────────────────────────────────────
me.arun.host (source: local)
0   lo                         0.00B            0       0.00B            0
1   eth0                       0.00B            0       0.00B            0
2   eth2                       0.00B            0       0.00B            0
3   vboxnet0                   0.00B            0       0.00B            0
4   pan0                       0.00B            0       0.00B            0
5   ppp0                      69.39KiB         61       7.49KiB         44

root@me:~# bwm-ng

bwm-ng v0.6 (probing every 0.500s), press ‘h’ for help
input: /proc/net/dev type: rate
\         iface                   Rx                   Tx                Total
==============================================================================
lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth0:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth2:           0.00 KB/s            0.00 KB/s            0.00 KB/s
ppp0:          64.39 KB/s            7.92 KB/s           72.31 KB/s
——————————————————————————
total:          64.39 KB/s            7.92 KB/s           72.31 KB/s

root@me:~# dstat
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
7   4  85   4   0   0| 281k  110k|   0     0 |   0     0 | 865  3013
8   4  88   0   0   0|   0     0 |7027B 1261B|   0     0 | 956  4505
8   5  86   0   0   0|   0     0 |  14k 1867B|   0     0 |1144  3332
9   5  86   0   1   0|   0     0 |  79k 2496B|   0     0 |1360  3366
18   8  74   0   0   0|   0     0 |  52k 6511B|   0     0 |1299  3618
8   6  85   0   1   0|   0     0 |  35k 5339B|   0     0 |1094  4231
6   4  90   0   0   0|   0     0 |   0  3164B|   0     0 | 953  2750 ^C
root@me:~#

root@me:~# ifstat
eth0                eth2                ppp0
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
0.00      0.00      0.00      0.00     95.73      4.31
0.00      0.00      0.00      0.00     67.93      8.17
0.00      0.00      0.00      0.00    106.77     13.70

** “iperf” – होस्ट (ए) और होस्ट (ब) सर्वर पर, दो मेजबान के बीच नेटवर्क throughput को मापने के लिए.

* Host -A

root@me:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
[  4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 56171
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec

* Host -B
test@hostB:~$ iperf -c 192.168.0.1
————————————————————
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 49.5 KByte (default)
————————————————————
[  3] local 192.168.0.2 port 56171 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec
test@hostB:~$

root@me:~# iftop
root@me:~# cbm

धन्यवाद,
अरुण

Bagaimana kinerja Pengujian Jaringan dan Bandwidth

Bagaimana kinerja Pengujian Jaringan dan Bandwidth

Pendahuluan –

Jaringan latency dan Bandwidth adalah dua metrik paling mungkin menarik ketika Anda patokan jaringan. Meskipun layanan yang paling dan iklan produk berfokus pada bandwidth, pada waktu latency dapat menjadi lebih penting metrik.

** Apa itu Bandwidth?

Bandwidth (BW) dalam jaringan komputer mengacu pada data rate didukung oleh koneksi jaringan atau antarmuka. BW diukur dalam bit per detik (bps).

** Apa itu Jaringan latency?

Latency adalah ukuran waktu tunda yang dialami dalam suatu sistem. Jaringan latency hanya didefinisikan sebagai waktu tunda diamati sebagai mentransmisikan data dari satu titik ke titik lain. Ada sejumlah faktor yang berkontribusi terhadap latensi jaringan. Ini termasuk transmisi (medium konektivitas), Jarak, Router dan keterlambatan perangkat keras komputer.

Daftar Proyek yang digunakan untuk menguji kinerja jaringan dan Bandwidth –

1) bmon – memantau Bandwidth dan estimator rate, itu adalah berbasis konsol, hidup BW
2) bwbar – Penggunaan Bandwidth Teks dan format grafis
3) BWM-ng – Bandwidth Monitor NG (Next Generation, hidup BW, konsol berbasis
4) dstat – Dstat adalah pengganti untuk vmstat, iostat dan ifstat.
5) iftop – Penggunaan Bandwidth pada sebuah antarmuka, konsol berbasis
6) iperf – Lakukan tes throughput Jaringan bertaruh dua host
7) ifstat – Laporan Interface Statistik
8) cbm – Warna Bandwidth Meter, konsol berbasis
9) etherape – Grafis browser jaringan lalu lintas
10) iptraf – Interactive Colorful IP LAN Monitor, konsol dan berbasis GUI
11) netmrg – Ini adalah daemon berbasis, dukungan mySQL, Mengumpulkan data dari perangkat.
12) nuttcp – kinerja alat ukur Jaringan
13) nepim

CATATAN ~ Untuk beberapa dari mereka rpm atau deb paket tidak tersedia!

Langkah 1] Bagaimana menginstal pada Redhat / RHCE, sistem berbasis CentOS dan sistem berbasis Dibian?

root@me:~# yum install netperf iperf nuttcp nepim lmbench

** Ubuntu –

root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg

Langkah 2] Bagaimana menggunakan – bmon, BWM-ng, dstat, ifstat –

root@me:~# bmon

interface: lo at me.arun.world

#   Interface                RX Rate         RX #     TX Rate         TX #
───────────────────────────────────────────────────────────────────────────────
me.arun.host (source: local)
0   lo                         0.00B            0       0.00B            0
1   eth0                       0.00B            0       0.00B            0
2   eth2                       0.00B            0       0.00B            0
3   vboxnet0                   0.00B            0       0.00B            0
4   pan0                       0.00B            0       0.00B            0
5   ppp0                      69.39KiB         61       7.49KiB         44

root@me:~# bwm-ng

bwm-ng v0.6 (probing every 0.500s), press ‘h’ for help
input: /proc/net/dev type: rate
\         iface                   Rx                   Tx                Total
==============================================================================
lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth0:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth2:           0.00 KB/s            0.00 KB/s            0.00 KB/s
ppp0:          64.39 KB/s            7.92 KB/s           72.31 KB/s
——————————————————————————
total:          64.39 KB/s            7.92 KB/s           72.31 KB/s

root@me:~# dstat
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
7   4  85   4   0   0| 281k  110k|   0     0 |   0     0 | 865  3013
8   4  88   0   0   0|   0     0 |7027B 1261B|   0     0 | 956  4505
8   5  86   0   0   0|   0     0 |  14k 1867B|   0     0 |1144  3332
9   5  86   0   1   0|   0     0 |  79k 2496B|   0     0 |1360  3366
18   8  74   0   0   0|   0     0 |  52k 6511B|   0     0 |1299  3618
8   6  85   0   1   0|   0     0 |  35k 5339B|   0     0 |1094  4231
6   4  90   0   0   0|   0     0 |   0  3164B|   0     0 | 953  2750 ^C
root@me:~#

root@me:~# ifstat
eth0                eth2                ppp0
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
0.00      0.00      0.00      0.00     95.73      4.31
0.00      0.00      0.00      0.00     67.93      8.17
0.00      0.00      0.00      0.00    106.77     13.70

** Mulai “iperf” server di satu host (A) dan klien pada host yang lain (B) – untuk mengukur throughput jaringan antara dua host.

* Host -A

root@me:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
[  4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 56171
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec

* Host -B
test@hostB:~$ iperf -c 192.168.0.1
————————————————————
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 49.5 KByte (default)
————————————————————
[  3] local 192.168.0.2 port 56171 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec
test@hostB:~$

root@me:~# iftop
root@me:~# cbm

Thank you,
Arun Bagul

테스트하는 방법 네트워크 성능과 대역폭에

테스트하는 방법 네트워크 성능과 대역폭에

소개 –

네트워크 대기 시간과 대역폭이 통계에서 가장 관심이있을 가능성이 때 벤치 마크 네트워크. 대부분의 서비스 및 제품 광고를 가끔 대역폭에 초점을하더라도 대기 시간이 더 중요한 통계하실 수 있습니다.

** 대역폭이란 무엇입니까?

대역폭 (흑백) 컴퓨터 네트워크에서 네트워크 연결 또는 인터페이스에서 지원하는 데이터 전송 속도를 의미합니다. 바덴 뷔 템 베르크는 초당 비트 (bps)의 측면에서 측정됩니다.

네트워크 대기 시간 ** 무엇입니까?

지연 시간은 시스템에 경험이 시간 지연을 측정하기위한 것입니다. 시간 지연은 다른 한 지점에서 데이터 전송으로 관찰로 네트워크 지연 간단하게 정의됩니다. 네트워크 대기 시간에 기여하는 요인이 있습니다. 이들은, (연결 매체) 거리, 라우터 및 컴퓨터 하드웨어 지연 전송이 포함됩니다.

네트워크 성능과 대역폭을 테스트하는 데 사용되는 프로젝트 목록 –

1) bmon가 -, 그것은 기반 콘솔은 대역폭 모니터링 및 평가 견적 뷔 템 베르크 살
2) bwbar – 텍스트 및 그래픽의 대역폭 사용량 형식
3) bwm – 겨 – 대역폭 모니터 첸 (차세대 기반 콘솔 뷔 템 베르크 라이브
4) dstat – Dstat는 vmstat, iostat와 ifstat을 대신합니다.
5) iftop – 인터페이스에 대역폭 사용량은 기반 콘솔
6) iperf – 수행 네트워크 처리량 검사는 두 호스트를 내기
7) ifstat – 신고 인터페이스 통계
8) cbm이 – 색상 대역폭 미터, 기반 콘솔
9) etherape – 그래픽 네트워크 트래픽 브라우저
10) iptraf는 – 인터랙티브 다채로운 IP를 LAN을 모니터, 콘솔과 GUI 기반
11) netmrg – 이건 데몬 기반, MySQL을 지원, 장치에서 수집 데이터입니다.
12) nuttcp – 네트워크 성능 측정 도구
13) nepim

참고 그들 중 일부에 대한 rpm 또는 뎁 패키지는 사용할 수 없습니다 ~!

1 단계]하는 방법에 설치할 수 레드햇 / RHCE, CentOS 기반 시스템과 Dibian 기반 시스템?

root@me:~# yum install netperf iperf nuttcp nepim lmbench

** 우분투 –

root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg

단계 2] 이용 방법 – bmon을 bwm – 겨, dstat, ifstat –

root@me:~# bmon

interface: lo at me.arun.world

#   Interface                RX Rate         RX #     TX Rate         TX #
───────────────────────────────────────────────────────────────────────────────
me.arun.host (source: local)
0   lo                         0.00B            0       0.00B            0
1   eth0                       0.00B            0       0.00B            0
2   eth2                       0.00B            0       0.00B            0
3   vboxnet0                   0.00B            0       0.00B            0
4   pan0                       0.00B            0       0.00B            0
5   ppp0                      69.39KiB         61       7.49KiB         44

root@me:~# bwm-ng

bwm-ng v0.6 (probing every 0.500s), press ‘h’ for help
input: /proc/net/dev type: rate
\         iface                   Rx                   Tx                Total
==============================================================================
lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth0:           0.00 KB/s            0.00 KB/s            0.00 KB/s
eth2:           0.00 KB/s            0.00 KB/s            0.00 KB/s
ppp0:          64.39 KB/s            7.92 KB/s           72.31 KB/s
——————————————————————————
total:          64.39 KB/s            7.92 KB/s           72.31 KB/s

root@me:~# dstat
—-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
7   4  85   4   0   0| 281k  110k|   0     0 |   0     0 | 865  3013
8   4  88   0   0   0|   0     0 |7027B 1261B|   0     0 | 956  4505
8   5  86   0   0   0|   0     0 |  14k 1867B|   0     0 |1144  3332
9   5  86   0   1   0|   0     0 |  79k 2496B|   0     0 |1360  3366
18   8  74   0   0   0|   0     0 |  52k 6511B|   0     0 |1299  3618
8   6  85   0   1   0|   0     0 |  35k 5339B|   0     0 |1094  4231
6   4  90   0   0   0|   0     0 |   0  3164B|   0     0 | 953  2750 ^C
root@me:~#

root@me:~# ifstat
eth0                eth2                ppp0
KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
0.00      0.00      0.00      0.00     95.73      4.31
0.00      0.00      0.00      0.00 root@me:~# yum install netperf iperf nuttcp nepim lmbench
root@me:~# apt-get install  bmon bwbar bwm-ng dstat cbm etherape iftop iperf ifstat iptraf netmrg
67.93      8.17
0.00      0.00      0.00      0.00    106.77     13.70

하나의 호스트 (A)를 다른 호스트 및 클라이언트 (나)에에 ** 시작 “iperf”서버 – 두 호스트 사이의 네트워크 처리량을 측정합니다.

* Host -A

root@me:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
[  4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 56171
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec

* Host -B
test@hostB:~$ iperf -c 192.168.0.1
————————————————————
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 49.5 KByte (default)
————————————————————
[  3] local 192.168.0.2 port 56171 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.11 GBytes  7.82 Gbits/sec
test@hostB:~$

root@me:~# iftop
root@me:~# cbm

Thank you,
Arun Bagul