Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Monitor qemu-kvm processes

Monitor qemu-kvm processes

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 28.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    Anders
    wrote on last edited by
    #1

    Hi,

    I'm facing a problem where I need to monitor the availability of a number of qemu-kvm processes (virtual machines) in Linux.

    Normally you can gather statistics by for example defining: Process.CPUTime(qemu-kvm) but what if I have a number of qemu-kvm processes that I'd like to monitor individually? The only way to tell the processes a part is by --name XXXX attribute, which states the virtual machines name and/or id.

    I guess the ideal scenario would be to setup the monitoring and DCI collection on a cluster-object and associate all the qemu-kvm hosts underneath it, then the monitoring and the stats would keep collecting even if a virtual machine is migrate to a different host. But my problem is that I can't filter running processes by attributes, or at least, I haven't found out how...

    Hopefully someone can give me a hint in which way to go, thanks!

    Anders

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      You can specify command line filter in all Process.* parameters. Full syntax of Process.CPUTime (and others Process.*) is following:

      Process.CPUTime(process, type, cmdline)

      Where

      process - process name. If cmdline is not given, only processes with matched name will be counted and read. If cmdline is given, process interpreted as regular expression.
      type    - representation type (meaningful when more than one process with the same name exists). Valid values are:
              min - minimal value among all processes named <process>
              max - maximal value among all processes named <process>
              avg - average value for all processes named <process>
              sum - sum of values for all processes named <process>
      cmdline  - command line (regular expression to match).

      So to match all processes named qemu-kvm with word test in command line, you can use

      Process.CPUTime(^qemu-kvm$, sum, test)

      Don't forget that both process name and command line are regular expressions when extended format is used, so if you use "qemu-kvm" as process name (without ^ and $), processes contained this in the name (like qemu-kvm2) will also be matched.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • A
        A
        Anders
        wrote on last edited by
        #3

        Great news, thank you Victor! Does the Process.Count() work in a similar way?

        Btw, what is the most up to date source for reference information for all supported attributes for a command such as: Process.Count() or Process.CPUTime() ? I haven't been able to find any related information in the wiki.

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          For counting processes there are separate parameter Process.CountEx, which has two arguments - process name and command line, both are regular expressions.

          Wiki is supposed to be most up-to-date information source, but unfortunately it still missing lot of information, including detailed description of agent parameters. We are updating wiki, but it's a slow process.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • M
            M
            mrugani
            wrote on last edited by
            #5

            Hi, I am also working on qemu.
            I want to get all active qemu processes running on host.
            I tried using 'top | grep qemu' , i got all qemu processes.
            But when I migrate a VM from hostA to hostB , I can still find its entry on hostA.
            Did you come across this? Please help.

            1 Reply Last reply
            0
            • A
              A
              Anders
              wrote on last edited by
              #6

              Hi mrugani,

              This sounds more of an Qemu related question than NetXMS related, but I'll give it a try.

              Are you using some sort of management wrapper such as: libvirt (virsh) or similar to manage your virtual machines? or are you using the native Qemu-monitor to migrate your virtual machines?

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups