Viewing hypervisor activity
After the hypervisor guest has booted, you can use QNX Momentics IDE to open a command terminal to either the host or a guest and then view its resource usage and activity.
qconnentry in the QNX OS Utilities Reference).
Connecting and interacting with a guest
-
In your serial terminal on the target, enter the command
ifconfig
.The command should return a valid IP address for your wm0 device.
- Remember this address. It is the IP address for the hypervisor guest.
- Launch the IDE on your development host (for instructions on doing so, see the IDE User's Guide or the IDE Release Notes).
- Switch to the QNX System Information perspective.
- Right-click on the Target Navigator view, then select New QNX Target.
- In the dialog box that appears, enter the guest's IP address, then press Enter.
- Open the Target File System Navigator view to explore the guest's filesystem on the target. You should see the built-in RAM disk at /dev/shmem; this is a convenient place for storing temporary files.
- Open the System Information and Process Information views to see details about the processes running in the VM that hosts the guest. These processes make up the various applications the guest is running.
- Open the System Resources view to examine the memory usage
by regions (e.g., heap, stack) and the total memory usage for a given process.
For more information, see
System Resources
in theReference
chapter of the IDE User's Guide. - Use the same System Resources view to examine the usage of individual CPUs by the guest's process threads. (The CPUs shown are actually vCPUs but the guest doesn't know that.)
- Start another shell window; SSH is preferred: open the Target Navigator view, select the target for your guest, then right-click to select SSH.
You can also start an SSH session in another terminal program (e.g., PuTTY),
and log in as userid root, password root.
(You can change these settings when you modify the hypervisor bootable image.)
Then, you can interact with the guest through this session.
For example, if you run pidin info you might see a line that
starts with CPU:X86_64 Release:8.0.0
and four processors listed;
these processors appear real to the guest but are actually vCPUs created by the VM.
Connecting and interacting with the hypervisor host
To connect to the host, you can use the IP address of the target board, which you can find through ifconfig or ipconfig. The name of the interface for your target depends on your system setup.
The same steps used for connecting to the guest by launching QNX Momentics IDE and configuring a new QNX target apply here, except you'll use a different IP address.
- Open the System Information and Process Information views to see all processes and threads in the hypervisor host domain, including the qvm processes, the vCPU threads in each VM, and any threads the vdevs are running. This is useful to understand the CPU load that the hypervisor imposes on the target hardware.
- Open the System Resources view to monitor the memory usage of the qvm processes and the CPU usage of threads within these processes, including vCPU threads and other vdev-specific threads. The host knows only whether the vCPUs are running but cannot see inside the guest to know which guest threads are running on a given vCPU.
You can also launch an SSH session outside of the IDE (e.g., through PuTTY) and run a command such as pidin info to see system information about the OS and processors; in this case, the listed processors are the physical CPUs on your target.