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.
Note:
You need the qconn daemon running in any OS running on the
target—the hypervisor host or any guest— that you want to interact with
(for details, see the qconn entry in
the QNX Neutrino Utilities Reference).
Connecting and interacting with a guest
If your hypervisor host is connected to a DHCP server, you can get your guest's
IP address as follows:
-
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.
You can then use the
QNX Momentics IDE to connect to the guest
on the target board as follows:
- 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.
You can now use the IDE tools to work with the guest. Here are a few things to try:
- 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 the Reference
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:7.1.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.
After you've connected to the hypervisor host through the IDE, you can use the same
views as described above to see resource usage and system activity.
Some host-specific things to try are:
- 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.