Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto count RX/TX bytes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ya
n00b
n00b


Joined: 11 Aug 2005
Posts: 19

PostPosted: Thu Oct 13, 2005 1:30 pm    Post subject: howto count RX/TX bytes Reply with quote

i've made irssi script that runs:

Code:
ifconfig | grep "RX bytes" | cut -d ' ' -f 13 | cut -d '(' -f 2


i got reading of RX in megabytes ...

but whenever RX reaches 5 Gb it resets...

so i want that RX/TX counter doesn't resets, or maybe someone can tell me alternate way to get RX/TX bytes where that counter doesn't resets or resets whenever i want.......
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Thu Oct 13, 2005 4:56 pm    Post subject: Reply with quote

At least if you have some iptables rules around, iptables -vL shows you something like

---
Chain INPUT (policy ACCEPT 9329M packets, 1734G bytes)
Chain OUTPUT (policy ACCEPT 13G packets, 14T bytes)
---

Just parse it from there. :) Maybe there's a less verbose way to ask that data from iptables, but I've never needed that.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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