Ad Widget

Collapse

CPU Seconds usage.

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kyus
    Senior Member
    • Feb 2024
    • 172

    #1

    CPU Seconds usage.

    Hello everyone! So, i'm not sure if this is the right place to post this, but there's a host that I'm monitoring and the only CPU related metrics that i can get from it is cpu seconds. So, my doubt is, if a process is using 2 CPU seconds, is it the same thing as saying it is consuming 2 CPUs or 50% of 4 CPUs? I've read about this already, but I'm still not sure about it...
  • Answer selected by kyus at 23-02-2024, 22:13.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    I guess it is wrong place to ask.. Its the kubernetes question... Zabbix just picks up metrics what people think are useful and its up to those people to understand those...
    I did some reading right now, but I am not going to pretend, that I understand it all... Seems that it depends on how much resources you have given to pods.. more resources mean your 2 seconds of usage comes faster...
    following links enlightened me a little bit on the matter, maybe they help you aswell...
    How can a pod have its CPU throttled for more than 1second in a 1second window? Let's find out.

    https://itnext.io/thinking-in-cpu-ti...s-a75f5b5694f3

    Comment

    • markfree
      Senior Member
      • Apr 2019
      • 868

      #2
      I'm not sure what metric this CPU seconds you're referring to is.
      Is it CPU process time? A cloud server?

      It would be helpful if you could provide more context to your question, as well as what version of Zabbix you are using and what system you are monitoring.

      Comment

      • kyus
        Senior Member
        • Feb 2024
        • 172

        #3
        Hey! I'm monitoring a Kubernetes Cluster. The metric is "CPU: Usage seconds, total". It's an item from the discovery rule "Pod Discovery" from the template "Kubernetes Kubelet by HTTP". It measures the amount(seconds?) of CPU used by the containers.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #4
          Just a liiiiiitle bit of tracking leads you to https://kubernetes.io/docs/reference...ation/metrics/

          container_cpu_usage_seconds_total
          Cumulative cpu time consumed by the container in core-seconds
          • Stability Level:STABLE
          • Type: Custom
          • Labels:containerpodnamespace
          But you probably need to dig into kubernetes docs to understand what is "core-second"....

          Comment


          • kyus
            kyus commented
            Editing a comment
            I've seen this description already... It's the same thing that's displayed in the Cadvisor docs... But, as I said, I'm still unsure about it being a reliable metric.
        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          I guess it is wrong place to ask.. Its the kubernetes question... Zabbix just picks up metrics what people think are useful and its up to those people to understand those...
          I did some reading right now, but I am not going to pretend, that I understand it all... Seems that it depends on how much resources you have given to pods.. more resources mean your 2 seconds of usage comes faster...
          following links enlightened me a little bit on the matter, maybe they help you aswell...
          How can a pod have its CPU throttled for more than 1second in a 1second window? Let's find out.

          https://itnext.io/thinking-in-cpu-ti...s-a75f5b5694f3

          Comment

          • kyus
            Senior Member
            • Feb 2024
            • 172

            #6
            I did some reading as well, and I think it is indeed, a nice metric to use... Thanks for your answer, you linked some really nice materials

            Comment

            Working...