Synchronize Your Meters

It can make your job simpler and your graphs look cleaner if the programs that collect the meters are synchronized to the top of the minute. This makes the data easier to combine and compare across systems.loop

Most metering programs or scripts are just a big loop of commands that gather metering data. At the bottom of that loop is usually something that waits until it is time to gather the next round of samples.

Let’s say you want these meters gathered once a minute. If you do the easy thing and just wait for 60 seconds, the meters drift in time because the meters themselves take time to run. At every iteration the meters would start a few seconds later in the minute. What you need to do at the bottom of the minute is wait until the beginning of the next minute. Then your meters will stay in sync with the top of the minute.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s