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