Results 1 to 4 of 4

Thread: How to get total bytes transferred by stream?

  1. #1
    Join Date
    Nov 2012
    Posts
    6

    Post How to get total bytes transferred by stream?

    I need to collect statistics of usage and total bytes send and received by server. I suppose, in MediaEventListener.onStop() should be some way, to get total bytes transferred by stream.

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

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

    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"

    Richard

  3. #3
    Join Date
    Nov 2012
    Posts
    6

    Default

    thanks. It was helpful.

  4. #4
    Join Date
    Mar 2013
    Posts
    9

    Default

    Quote Originally Posted by rrlanham View Post
    You can use IOPerformanceCounter in the IMediaStreamActionNotify.onStop() handler:

    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"

    Richard
    Hi Richard,

    Does this method work also for HTTP-based stream protocols? I'm having trouble calculating the amount of bytes sent to a single user through a DASH-MPEG stream.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •