Skip to main content

Community

Other: hvrstats Command Granularity Higher than Minute

Please sign in to leave a comment.

Comments

1 comment

  • Mark Van de Wiel User

    Mark,

    The basics for hvrstats can be used to second-level statistics. Here is the contents of a gen_second_stats.sh that picks up a small subset of statistics at the level of seconds. Note when run the script pauses for 2 seconds before running again, effectively tailing the hvr.out file. The output goes into a delimited file.

    cat gen_second_stats.sh 
    #!/bin/bash
    export HVR_HOME=/opt/hvr610/hvr_home
    export HVR_CONFIG=/opt/hvr610/hvr_config

    while true
    do

    $HVR_HOME/script/hvrstatistics.pl -i -I gen_second_stat -g second -g channel -g location -g table -n "Maximum Capture Latency" -n "Maximum Integrate Latency" -n "Integrated Changes" -s , -C demo |grep -v "*" >$HVR_CONFIG/hubs/demo/stats/demo_stats/f`date +%s`.txt

      sleep 2

    done

    You can then load this data into a database or Kafka similar to how we define a secondary location for hvrstats (https://fivetran.com/docs/hvr6/user-interface/statistics#secondarystorageforstatistics).

    Hope this helps.

    Mark.