intelsdi-x / snap-plugin-collector-pcm

Collects Intel Performance Counter Metrics (PCM)
http://snap-telemetry.io/
Apache License 2.0
7 stars 20 forks source link

First reading always comes with null data and wrong timestamp #48

Open bahadiri opened 6 years ago

bahadiri commented 6 years ago

Snap daemon version (use snapteld -v): snapteld version 2.0.0

Environment:

What happened:

  1. First reading always come with a weird timestamp. and null data.

[{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Pack_C-States/Proc_Energy_Joules","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Pack_C-States/C2res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Pack_C-States/C3res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Pack_C-States/C6res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Pack_C-States/C7res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L3MPI","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/READ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/AFREQ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L2MISS","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L2HIT","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L3MISS","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L3HIT","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/L2MPI","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/WRITE","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/TEMP","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/EXEC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/IPC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Socket0/FREQ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Core_C-State/C1res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Core_C-State/C3res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Core_C-State/C6res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Core_C-State/C7res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Core_C-State/C0res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Package_C-State/C2res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Package_C-State/C3res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Package_C-State/C6res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/SKT0_Package_C-State/C7res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/Proc_Energy_Joules/SKT0","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/EXEC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L3MISS","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L3HIT","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L3MPI","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/INST","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/IPC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L2HIT","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/PhysIPC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/PhysIPC%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/AFREQ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L2MPI","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/WRITE","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/INSTnom","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/INSTnom%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/FREQ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/L2MISS","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/READ","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/ACYC","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System/TIME_ticks","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Core_C-States/C0res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Core_C-States/C1res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Core_C-States/C3res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Core_C-States/C6res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11},{"timestamp":"0000-12-31T15:47:32-08:12","namespace":"/intel/pcm/System_Core_C-States/C7res%","data":null,"unit":"","tags":{"plugin_running_on":"bahadir"},"version":11}]

What you expected to happen: Normal data and timestamp

Steps to reproduce it (as minimally and precisely as possible):

  1. Start Snap
  2. Load pcm plugin as described
  3. Start a task to collect data

Anything else do we need to know (e.g. issue happens only occasionally):

PatrykMatyjasek commented 6 years ago

It is caused by pcm tool. Initialization take 2-3 seconds, and resets counters. It results that first data collection is corrupted.

bahadiri commented 6 years ago

Ok we’re cleaning it from the file. But maybe plugin can drop it for accuracy.