# printing metrics to screen

**URL:** <https://community.zeek.org/t/printing-metrics-to-screen/2588>\
**Category:** Zeek\
**Created:** [March 14, 2013, 7:43pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588 "2013-03-14T19:43:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JP\_Bourget](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@JP\_Bourget](https://community.zeek.org/u/JP_Bourget)\
**Post date:** [March 14, 2013, 7:43pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/1 "2013-03-14T19:43:33Z")

</div>

I’ve tried to figure this out for awhile…

How can I print a metric I’m tracking to screen to confirm it’s doing what I think it’s doing?

Thanks!

---

<div class="post-metadata">

**Author:** ![Scott\_Runnels](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Scott\_Runnels](https://community.zeek.org/u/Scott_Runnels)\
**Post date:** [March 14, 2013, 7:58pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/2 "2013-03-14T19:58:58Z")

</div>

Hi JP,

Are you running bro from the command as part of your development cycle? i.e. you make changes, run a test pcap through bro via bro -r mytestpcap.pcap myscript.bro ?

If so you can just use print and fmt() to generate output.

v/r  
Scott

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [March 14, 2013, 8:37pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/3 "2013-03-14T20:37:00Z")

</div>

When you say "metric", are you referring to something you're doing with the Metrics framework?

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![JP\_Bourget](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@JP\_Bourget](https://community.zeek.org/u/JP_Bourget)\
**Post date:** [March 14, 2013, 8:53pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/4 "2013-03-14T20:53:10Z")

</div>

Sorry didn’t reply all -

Seth - I’m trying to figure out how to print out Metrics values stored with the Metrics Framework. So if I’m watching something, how can I figure out the state or values of everything in order to understand that what I think is happening is happening.

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [March 14, 2013, 9:04pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/5 "2013-03-14T21:04:02Z")

</div>

The metrics (soon measurement) framework is undergoing heavy rewrites right now and I'm hoping to get the latest refactor pushed out very soon, I'm working on it a lot right now. One of the big changes has been to change it into more of a utility intended to help you accomplish goals instead of trying to accomplish everything on it's own. What's in 2.0 and 2.1 was written to solve very few situations. What I'm working on now has a much broader range of applicability and capability.

I guess what I'm trying to say is that I think what you're trying to do isn't possible with the version of the metrics framework you're using. 🙂

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://community.zeek.org/t/printing-metrics-to-screen/2588/6 "2022-05-06T15:40:50Z")

</div>


