Re: [Rtg-yang-coord] Clearing all stats in a container

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Thu, 05 March 2015 07:45 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: rtg-yang-coord@ietfa.amsl.com
Delivered-To: rtg-yang-coord@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 143DE1B2A1F for <rtg-yang-coord@ietfa.amsl.com>; Wed, 4 Mar 2015 23:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.86
X-Spam-Level:
X-Spam-Status: No, score=-3.86 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WqXwlciMMDWO for <rtg-yang-coord@ietfa.amsl.com>; Wed, 4 Mar 2015 23:45:37 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6CF11B2A14 for <rtg-yang-coord@ietf.org>; Wed, 4 Mar 2015 23:45:36 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 75D4E6F4; Thu, 5 Mar 2015 08:45:34 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id m2NXvS2HorfV; Thu, 5 Mar 2015 08:45:15 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Thu, 5 Mar 2015 08:45:33 +0100 (CET)
Received: from localhost (demetrius3.jacobs-university.de [212.201.44.48]) by hermes.jacobs-university.de (Postfix) with ESMTP id AD9F720039; Thu, 5 Mar 2015 08:45:33 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius3.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id ICC4s85eqafb; Thu, 5 Mar 2015 08:45:32 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 8B24A20036; Thu, 5 Mar 2015 08:45:32 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 8F8EE325C7D1; Thu, 5 Mar 2015 08:45:30 +0100 (CET)
Date: Thu, 5 Mar 2015 08:45:29 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
Message-ID: <20150305074529.GA68883@elstar.local>
Mail-Followup-To: Mahesh Jethanandani <mjethanandani@gmail.com>, rtg-yang-coord@ietf.org
References: <730D50D3-0220-42BA-8DD0-40A10D9C2DA3@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <730D50D3-0220-42BA-8DD0-40A10D9C2DA3@gmail.com>
User-Agent: Mutt/1.4.2.3i
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-yang-coord/AdN9sL0nOBRBdKhcWLS1MG-s_2E>
Cc: rtg-yang-coord@ietf.org
Subject: Re: [Rtg-yang-coord] Clearing all stats in a container
X-BeenThere: rtg-yang-coord@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
List-Id: "\"List to discuss coordination between the Routing related YANG models\"" <rtg-yang-coord.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtg-yang-coord/>
List-Post: <mailto:rtg-yang-coord@ietf.org>
List-Help: <mailto:rtg-yang-coord-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Mar 2015 07:45:39 -0000

On Wed, Mar 04, 2015 at 10:30:37PM -0800, Mahesh Jethanandani wrote:
> Assuming one has defined stat counters in one container, like ietf-interfaces has done with its statistics, does anyone have suggestions on how one can essentially clear (reset to 0) all the counters in that container.
>

Resetting counters is a bad idea. Once you have more than one
application trying to reset counters you get into trouble. Note
this RFC 6991 (lifted from RFC 2578):

       Counters have no defined 'initial' value, and thus, a
       single value of a counter has (in general) no information
       content.

Applications have to read a counter C at time t0 and then again at
time t1 and then calculate the difference C(t1) - C(t0). This allows
applications to obtain statistics at different time granularities
without stepping on each other.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>