Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

DBI Mysql : Get amount of data transfered

by sectokia (Pilgrim)
on Mar 02, 2017 at 22:36 UTC ( [id://1183482]=perlquestion: print w/replies, xml ) Need Help??

sectokia has asked for the wisdom of the Perl Monks concerning the following question:

Hi perl monks,

I am using di:mysql to do queries on remote server. Is there anyway to get stats on how many bytes have been transferred?

I am using the mysql_compression option, and basically I would like to know how much data is going onto the network.

Altneratively is there any way to get transmit/receive bytes for perl script for ethernet?

Thanks!

  • Comment on DBI Mysql : Get amount of data transfered

Replies are listed 'Best First'.
Re: DBI Mysql : Get amount of data transfered
by thanos1983 (Parson) on Mar 02, 2017 at 22:57 UTC

    Hrllo sectokia,

    I am not an expert on this but I found this Cisco::UCS::Common::EthernetPort.

    According to the documentation:

    print "FI A port 1/2 operational_speed is " . $ucs->interconnect(A)->card(1)->eth_port(2)->oper_sp +eed; . ', total bytes transmitted is " . $ucs->interconnect(A)->card(1)->eth_port(1)->tx_tota +l_bytes . ".\n"; # Prints: # FI A port 1/2 operational_speed is 10gbps, total bytes transmitt +ed is 120230320434028

    Update: I also found Bandwidth-statistics maybe it can help you also.

    From the documentation:

    This is a small PERL script that calculate network bandwidth with some + stats.

    Update 2: Similarly measuring IN/OUT traffic on your computer maybe it can help you also.

    Description:

    Sometimes you need to see how much data your computer gets through a c +ertain device(at least I do). I've put together this script that does + just that

    Hope this helps.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
Re: DBI Mysql : Get amount of data transfered
by Marshall (Canon) on Mar 02, 2017 at 22:51 UTC
    You could use something like wireshark which can monitor network traffic. I don't know of any statistics from the Perl DBI - but others might know of such a thing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1183482]
Approved by stevieb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found