# How to get server to client transferred bytes?

**URL:** <https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817>\
**Category:** Wowza Streaming Engine\
**Created:** [October 24, 2014, 10:12am UTC](https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817 "2014-10-24T10:12:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Antunes](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mauricio\_Antunes](https://community.wowza.com/u/Mauricio_Antunes)\
**Post date:** [October 24, 2014, 10:12am UTC](https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817/1 "2014-10-24T10:12:00Z")

</div>

I am currently using IHTTPStreamerSession.getIOPerformanceCounter().getMessagesOutBytes() for HTTP streaming. But I am not sure if this is ok.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [October 24, 2014, 8:25am UTC](https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817/2 "2014-10-24T08:25:37Z")

</div>

Hello there,

You can use IOPerformanceCounter in the IMediaStreamActionNotify.onStop() handler:

```auto
public void onStop(IMediaStream stream)
{
	IOPerformanceCounter perf = stream.getMediaIOPerformance();
	getLogger().info("Total OutBytes: " + perf.getMessagesOutBytes());
}

```

But the best way is look at log files. Look at the sc-bytes (server to client bytes) in rows with x-event “destroy”

I hope this helps.

Salvadore

---

<div class="post-metadata">

**Author:** ![Mauricio\_Antunes](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mauricio\_Antunes](https://community.wowza.com/u/Mauricio_Antunes)\
**Post date:** [October 24, 2014, 11:39am UTC](https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817/3 "2014-10-24T11:39:45Z")

</div>

Hey Salvadore,

Thanks for the answer.

The problem is that it is part of a custom module that logs how many bytes were transferred in the last 10 seconds.

It is HTTP connection so I don’t think IMediaStream will work.

---

<div class="post-metadata">

**Author:** ![Mauricio\_Antunes](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mauricio\_Antunes](https://community.wowza.com/u/Mauricio_Antunes)\
**Post date:** [October 24, 2014, 11:41am UTC](https://community.wowza.com/t/how-to-get-server-to-client-transferred-bytes/43817/4 "2014-10-24T11:41:07Z")

</div>

Also I have a watchdog that runs every 10 seconds. Not just onStop.
