Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

snaptel task watch - cause high CPU #50

Closed
discoduck2x opened this issue Feb 13, 2017 · 1 comment
Closed

snaptel task watch - cause high CPU #50

discoduck2x opened this issue Feb 13, 2017 · 1 comment
Labels

Comments

@discoduck2x
Copy link

discoduck2x commented Feb 13, 2017

Snap daemon version (use snapteld -v): 1.1.0

Environment:

  • Cloud provider or hardware configuration: vmware
  • OS (e.g. from /etc/os-release): red hat
  • Kernel (e.g. uname -a): 3.10.0-327.36.2.el7.x86_64
  • Relevant tools (e.g. plugins used with Snap): snap-plugin-collector-cpu , snap-plugin-publisher-influxdb_linux_x86_64

What happened:

creating task to just check cpu cores utilization % , then via cli "watch" the task, this cause snaptel process to consume 100% cpu and stop updating task watch data until ctrl-c

What you expected to happen:
..not getting a cpu util issue

task config .json :

{
  "version": 1,
  "schedule": {
    "type": "simple",
    "interval": "1s"
  },
  "max-failures": -1,
  "workflow": {
    "collect": {
      "metrics": {
        "/intel/procfs/cpu/*/system_percentage": {},
        "/intel/procfs/cpu/*/user_percentage": {}
      },
      "config": {
        "/intel/procfs/cpu": {
          "proc_path": "/proc"
        }
      },
      "publish": [
        {
          "plugin_name": "influxdb",
          "config": {
            "host": "x.x.x.x",
            "port": 8086,
            "database": "snap",
            "user": "admin",
            "password": "admin",
            "scheme": "http",
            "skip-verify": false,
            "isMultiFields": true
          }
        }
      ]
    }
  }
}

starting to watch task,,, after ~10seconds the update cli stops..

image

...and the snaptel process eats cpu

image

...still inserts into influx

image

@mkleina mkleina added the bug label Feb 15, 2017
@mkleina
Copy link

mkleina commented Feb 15, 2017

I was able to reproduce this issue, both on version 1.1.0 and latest master-85079bc. Also checked some other plugins (snap-plugin-collector-smart, snap-plugin-collector-perfevents) and that the same issue exists, so it seems that it is recent Snap CLI issue. I will create issue on Snap repo.

For now, I found a workaround, to watch task use this command:

snaptel task watch --timeout 0s <Task ID>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants