[PLUG] monitoring MAGNITUDE of internet activity - how?

Galen Seitz galens at seitzassoc.com
Sat Mar 4 17:02:06 UTC 2017


On 03/04/17 00:41, Richard Owlett wrote:
> On 03/02/2017 01:48 PM, Keith Lofstrom wrote:
>> On Wed, Mar 01, 2017 at 04:33:57PM -0600, Richard Owlett wrote:
>>> Is there a tool which can be
>>>  "turned on"  at time t0
>>>  "turned off" at time t1
>>> which will report the number of
>>>   "uploaded"   bytes
>>>   "downloaded" bytes
>>> in that interval?
>>
>> For your purposes, perhaps you pipe a standard interface
>> reporting tool into a text file that you can edit into
>> .cvs format for a spreadsheet.
>>
>> However, sometimes the easiest way to do stuff is to learn
>> a scripting language and automate a task.  The good thing
>> about scripting languages is that you can always look at
>> the program to remind yourself how it works.
>> [snip]
> 
> For my needs I'll skip aiming at a spreadsheet and write some simple 
> bash scripts to gather data and do some basic formatting. For anything 
> more complex I'll use Tcl/Tk as I use it in another project. The more 
> practice the better.
> 
> I someone asks "How much can be done in bash?", I suggest browsing
> http://www.tldp.org/LDP/Bash-Beginners-Guide/html/Bash-Beginners-Guide.html
> and
> http://www.tldp.org/LDP/abs/html .

If you want to use this as a learning exercise, go for it.  If not, then
I feel you are making this more complicated than necessary.

First capture your data as Robert suggested.  Change the 10 to whatever
time interval is desired.
cp /proc/net/dev /tmp/foo; sleep 10; cat /proc/net/dev >> /tmp/foo

Now open the file using libreoffice.  Under Separator options, select
"Space" and "Merge delimiters".  Click OK.  Your task, as you have
described it, is now about 95% complete.

galen
-- 
Galen Seitz
galens at seitzassoc.com



More information about the PLUG mailing list