---
name: "perf_3.2-kvm"
section: "1"
platform: "linux"
package: "linux-tools-3.2"
version: "3.2.17-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/perf_3.2-kvm"
---

# perf\_3.2-kvm(1)

Tool to trace/measure kvm guest os

## NAME

perf-kvm - Tool to trace/measure kvm guest os

## SYNOPSIS

```
perf kvm [--host] [--guest] [--guestmount=<path>
        [--guestkallsyms=<path> --guestmodules=<path> | --guestvmlinux=<path>]]
        {top|record|report|diff|buildid-list}
perf kvm [--host] [--guest] [--guestkallsyms=<path> --guestmodules=<path>
        | --guestvmlinux=<path>] {top|record|report|diff|buildid-list}
```

## DESCRIPTION

There are a couple of variants of perf kvm:

```
'perf kvm [options] top <command>' to generates and displays
a performance counter profile of guest os in realtime
of an arbitrary workload.
```

```
'perf kvm record <command>' to record the performance counter profile
of an arbitrary workload and save it into a perf data file. If both
--host and --guest are input, the perf data file name is perf.data.kvm.
If there is  no --host but --guest, the file name is perf.data.guest.
If there is no --guest but --host, the file name is perf.data.host.
```

```
'perf kvm report' to display the performance counter profile information
recorded via perf kvm record.
```

```
'perf kvm diff' to displays the performance difference amongst two perf.data
files captured via perf record.
```

```
'perf kvm buildid-list' to  display the buildids found in a perf data file,
so that other tools can be used to fetch packages with matching symbol tables
for use by perf report.
```

## OPTIONS

\-i, --input=

Input file name.

- \-o, --output

  Output file name.

\--host=

Collect host side performance profile.

\--guest=

Collect guest side performance profile.

- \--guestmount=\<path\>

  Guest os root file system mount directory. Users mounts guest os root directories under \<path\> by a specific filesystem access method, typically, sshfs. For example, start 2 guest os. The one’s pid is 8888 and the other’s is 9999. #mkdir /guestmount; cd/guestmount #sshfs -o allow\_other,direct\_io -p 5551 localhost:/ 8888/ #sshfs -o allow\_other,direct\_io -p 5552 localhost:/ 9999/ #perf kvm --host --guest --guestmount=~/guestmount top

- \--guestkallsyms=\<path\>

  Guest os /proc/kallsyms file copy. *perf* kvm' reads it to get guest kernel symbols. Users copy it out from guest os.

- \--guestmodules=\<path\>

  Guest os /proc/modules file copy. *perf* kvm' reads it to get guest kernel module information. Users copy it out from guest os.

- \--guestvmlinux=\<path\>

  Guest os kernel vmlinux.

## SEE ALSO

[**perf\_3.2-top**(1)](/perf_3.2-top/1.md), [**perf\_3.2-record**(1)](/perf_3.2-record/1.md), [**perf\_3.2-report**(1)](/perf_3.2-report/1.md), [**perf\_3.2-diff**(1)](/perf_3.2-diff/1.md), [**perf\_3.2-buildid-list**(1)](/perf_3.2-buildid-list/1.md)
