# How to get SRT stream statistics e.g. pktSndLoss pktRetrans

**URL:** <https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584>\
**Category:** Wowza Streaming Engine\
**Created:** [July 17, 2020, 3:32pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584 "2020-07-17T15:32:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martyn\_Gilbert](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Martyn\_Gilbert](https://community.wowza.com/u/Martyn_Gilbert)\
**Post date:** [July 17, 2020, 3:32pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/1 "2020-07-17T15:32:59Z")

</div>

I need to be able to get statistics regarding the incoming and outgoing SRT streams in my Wowza Streaming Engine.

Specifically I need to get details on received packets, sent packets, lost packets & re transmitted packets.

Are these stats accessible by Wowza for specific SRT streams and can I access this data programmatically using the API?

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [July 17, 2020, 8:28pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/2 "2020-07-17T20:28:29Z")

</div>

We do not have this at the moment for SRT, but we are working on improving our data insights capabilities. I can add this as a request with that team.

---

<div class="post-metadata">

**Author:** ![Martyn\_Gilbert](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@Martyn\_Gilbert](https://community.wowza.com/u/Martyn_Gilbert)\
**Post date:** [August 11, 2020, 3:25pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/3 "2020-08-11T15:25:20Z")

</div>

Hi, I have just found in Wowza Streaming Engine 4.8.5 that this information can be stored in the log file by configuring srtTimesToPrintStats to -1. (I am shocked that you were unable to point me to this previously!)

Anyway, to re-ask my original question is this information only available in the log or can I access this programmatically using the API or any other method?

---

<div class="post-metadata">

**Author:** ![Alexander\_Vtorov1](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@Alexander\_Vtorov1](https://community.wowza.com/u/Alexander_Vtorov1)\
**Post date:** [November 10, 2021, 8:58am UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/4 "2021-11-10T08:58:57Z")

</div>

Hi

sorry for necroposting but I got to same question and google bring me here

I managed to get srt statistics with java api (we expose them in json format on http endpoint with HTTProvider2Base)

to get statistics from server we do

- iterate over vhosts with VHostSingleton.getVHostNames(), VHostSingleton.getInstance(vHostName)
- iterate over vhost.applicationNames
- then over app.appInstanceNames
- then we get val appInstance = app.getAppInstance(appInstanceName)
- with taht we get mediacaster items val items = appInstance.mediaCasterStreams.mediaCasterStreamItems
- then we iterate over items checking if mediaCaster is of type LiveMediaSRTReceiver
- if yes you can receive stats with caster.srtNativeStats.toJSON() for example

sorry for bad english, maybe this explanation can help somebody trying to monitor connection quality as we are

---

<div class="post-metadata">

**Author:** ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)\
**Post date:** [November 10, 2021, 3:37pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/5 "2021-11-10T15:37:22Z")

</div>

Nice ! Thanks for sharing that

---

<div class="post-metadata">

**Author:** ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)\
**Post date:** [November 10, 2021, 3:39pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/6 "2021-11-10T15:39:03Z")

</div>

You can always create a proxy api to expose what you see in the logs. Like a custom rest api for your application.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 10, 2021, 4:27pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/7 "2021-11-10T16:27:01Z")

</div>

My apologies @Martyn_Gilbert, I only shared what was shared with me by engineer when I asked. I can see why that would frustrate you and I’ll discuss with them today.

Thanks to everyone else for updating this post.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 10, 2021, 4:36pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/8 "2021-11-10T16:36:29Z")

</div>

> [@Martyn\_Gilbert](#):
>
> srtTimesToPrintStats

I have found the property you referred to and I once again apologize, was not told and this area is out of my scope of knowledge unfortunately. I ask when I don’t know, but here is the doc that you referred to so others can find it for the logs:

> **[Specify per-stream settings in .stream files](https://www.wowza.com/docs/how-to-specify-per-stream-settings-in-stream-files)**
>
> Set up per-stream settings in .stream files for MPEG-TS encoders and IP cameras (RTSP/RTP streams), SHOUTcast/Icecast streams, native RTP encoders.

 ![Screen Shot 2021-11-10 at 9.33.56 AM](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/f4f954711b162d1dcaf6395ef6b82830c57d2f94.png) how-to-specify-per-stream-settings-in-stream-files

  

Asking about the API call now to see if we offer that option yet…

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 11, 2021, 10:01pm UTC](https://community.wowza.com/t/how-to-get-srt-stream-statistics-e-g-pktsndloss-pktretrans/55584/9 "2021-11-11T22:01:50Z")

</div>

No REST API or JAVA API call for this @Martyn_Gilbert. I checked with the head of Engine team…
