# How to get Net upload and download speed in the API?

**URL:** <https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976>\
**Category:** Integration Support\
**Created:** [September 23, 2016, 6:44am UTC](https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976 "2016-09-23T06:44:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ranjith](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ranjith/32/5081_2.png) [@ranjith](https://forum.opennebula.io/u/ranjith)\
**Post date:** [September 23, 2016, 6:44am UTC](https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976/1 "2016-09-23T06:44:01Z")

</div>

I was wondering if there’s any way to get the upload and download speeds through the API, instead of NET TX and NET RX. I am using XML RPC to get through opennebula 5.0.2.  
I guess it should be possible since sunstone displays the data. Let me know to where is the data is stored or how to get that data?

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [September 23, 2016, 8:20am UTC](https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976/2 "2016-09-23T08:20:37Z")

</div>

Hi,

Unfortunately that data is not stored, the speed is calculated in sunstone from the TX and RX values.

---

<div class="post-metadata">

**Author:** ![ranjith](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ranjith/32/5081_2.png) [@ranjith](https://forum.opennebula.io/u/ranjith)\
**Post date:** [September 27, 2016, 8:46am UTC](https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976/3 "2016-09-27T08:46:56Z")

</div>

Thank you for the reply. I just want to know how they are calculating net upload and download speed from TX and RX values? Is like this: by dividing the TX and RX values by 8

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [September 29, 2016, 8:56am UTC](https://forum.opennebula.io/t/how-to-get-net-upload-and-download-speed-in-the-api/2976/4 "2016-09-29T08:56:34Z")

</div>

The relevant code is here:

> <https://github.com/OpenNebula/one/blob/master/src/sunstone/public/app/tabs/vms-tab/panels/network.js#L429>

> <https://github.com/OpenNebula/one/blob/master/src/sunstone/public/app/utils/graphs.js>
