Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Contatore dati ricevuti/trasmessi
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Federiconet
n00b
n00b


Joined: 12 Sep 2003
Posts: 67
Location: Brianza

PostPosted: Mon Dec 22, 2003 3:03 am    Post subject: Contatore dati ricevuti/trasmessi Reply with quote

Ciao, ho questo problema: avrei bisogno di un programma (simile a DU Meter di windows) che mi tenga il conto dei byte trasmessi e ricevuti durante la connessione Ho trovato un applet per Gnome che mi visualizza il traffico in tempo reale, solo che non mi tiene un conto totale... Esiste?! :?:

Grazie! :)
Back to top
View user's profile Send private message
malteo
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2003
Posts: 101
Location: Pescara, Italy

PostPosted: Mon Dec 22, 2003 3:13 am    Post subject: Reply with quote

KPPP ha un ottimo sistema di log (ovviamente, per connessioni modem) e gkrellm ha anche il conteggio dei bytes in entrata e uscita sull'interfaccia di rete (un pò grezzo).

Ciao :)

[ot]P.S.: che pokerino stasera, ragazzi... :D [/ot]
Back to top
View user's profile Send private message
Ginko
Guru
Guru


Joined: 01 May 2002
Posts: 371
Location: nearby my linux laptop

PostPosted: Mon Dec 22, 2003 9:52 am    Post subject: Reply with quote

Code:
/sbin/ifconfig eth0

--Gianluca
Back to top
View user's profile Send private message
Federiconet
n00b
n00b


Joined: 12 Sep 2003
Posts: 67
Location: Brianza

PostPosted: Mon Dec 22, 2003 1:03 pm    Post subject: Reply with quote

Peccato, io ho l'adsl e uso rpppoe :(

Con ifconfig però non mi tiene il conto complessivo, quando spengo azzera tutto...
Back to top
View user's profile Send private message
Ginko
Guru
Guru


Joined: 01 May 2002
Posts: 371
Location: nearby my linux laptop

PostPosted: Mon Dec 22, 2003 1:21 pm    Post subject: Reply with quote

Federiconet wrote:
Con ifconfig però non mi tiene il conto complessivo, quando spengo azzera tutto...

Mhh, sento puzza di bash script messo in local.start e local.stop :-)

--Gianluca
Back to top
View user's profile Send private message
Federiconet
n00b
n00b


Joined: 12 Sep 2003
Posts: 67
Location: Brianza

PostPosted: Mon Dec 22, 2003 1:43 pm    Post subject: Reply with quote

Ginko wrote:
Federiconet wrote:
Con ifconfig però non mi tiene il conto complessivo, quando spengo azzera tutto...

Mhh, sento puzza di bash script messo in local.start e local.stop :-)


tradotto?! :lol:
Back to top
View user's profile Send private message
doom.it
Guru
Guru


Joined: 23 May 2003
Posts: 430
Location: Pavia, Italy

PostPosted: Mon Dec 22, 2003 1:45 pm    Post subject: Reply with quote

ti butto li un idea....

Fai uno scriptino da lanciare ogni voltache vuoi aggiornare il contatore che faccia
Code:

let totale_RX=$totale_RX+`ifconfig ppp0 | grep "RX bytes:" | cut -d ":" -f 2 | cut -d " " -f 1`

let totale_TX=$totale_TX+`ifconfig ppp0 | grep "TX bytes:" | cut -d ":" -f 4 | cut -d " " -f 1`

echo "RX " & $totale_RX > /usr/contatore
echo "TX " & $totale_TX >> /usr/contatore


All'avvio del PC ovviamente ci vorra uno scriptino che faccia
Code:

totale_RX=`grep "RX" /usr/contatore | cut -d " " -f 2`
totale_TX=`grep "TX" /usr/contatore | cut -d " " -f 2`


Poi metti appunto il secondo script in /etc/conf.d/local.start e il primo lo fai eseguire come cronjob ogni minuto... e puoi accedere al numero di byte trasmessi o inviati in ogni momento tramite il file /usr/contatore... nella prima riga hai il numero di byte ricevuti, nella seconda gli inviati.
_________________
I have discovered photography. Now I can kill myself. I have nothing else to learn.
Pablo Picasso
Back to top
View user's profile Send private message
doom.it
Guru
Guru


Joined: 23 May 2003
Posts: 430
Location: Pavia, Italy

PostPosted: Mon Dec 22, 2003 1:54 pm    Post subject: Reply with quote

oddio in realtà mi sorge il dubbio circa quale sia lo spazio di rappresentabilità degli interi di bash... rischi che dopo un po let non regga piu la somma... non ne ho proprio idea...
inquel caso bisogna passare a python, o a qualche soluzione piu intelligente ;)
_________________
I have discovered photography. Now I can kill myself. I have nothing else to learn.
Pablo Picasso
Back to top
View user's profile Send private message
Federiconet
n00b
n00b


Joined: 12 Sep 2003
Posts: 67
Location: Brianza

PostPosted: Mon Dec 22, 2003 2:48 pm    Post subject: Reply with quote

Grazie :wink:

forse ho trovato la soluzione con iptraf fatto girare in background
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum