Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Measure the network/data usage by MQTT?

It might also be useful to look at the broker stats. For example Mosquitto measures bytes sent and received.

Paul


On 9 June 2015 at 11:29, Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

the very simplest embedded client code, MQTTPacket

(http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.embedded-c.git/tree/MQTTPacket)

just serializes/deserializes packets, and provides some helper functions for reading from and writing to the network.  On serialization, the length of the data is returned, and when you read an MQTT packet from the network, you are told how long that packet is by the helper function.  This might be a good way of achieving what you want.

Other thoughts:

1) use WireShark to monitor flows, and write program to analyze the log
2) modify one of the client's code to keep track of how much data has been sent/received

Ian



On 06/09/2015 10:53 AM, Pawan wrote:
Hi

I am wondering if there is any way, I can count how much data bytes transferred and received over MQTT.

I can measure the length of messages received and published with a MQTT client, however this won't account the actual data (which may include headers if any, topic subscription, connect and ping request data) being transferred and received over the TCP layer.

Is there any way/interfaces available with Paho api I can measure the exact volume of data download and upload done via MQTT client?


--
Thanks and best regards,

From
Pawan D. Dalal
Co-Founder & Developer
Bizlers Technologies Private Ltd


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
Paul Fremantle
Part-time PhD student - School of Computing
twitter: pzfreo / skype: paulfremantle / blog: http://pzf.fremantle.org
Co-Founder, WSO2
Apache Member and Committer
07740 199 729

Back to the top