# Diagnostics with multiple instances

The ahmi.exe program can also be used for diagnostic purposes with several instances of kernelv DLL.

When the ahmi.exe program is started, it must be specified which kernelv DLL instance is to be connected.

There are 2 options for this:

1. Specify the instance identifier as command line parameter at program start. Here, use kernelv_startup_instance() to specify the same instance identifier as used at the start of the kernelv instance. The kernelv instance is specified by the parameter –instance_prefix.
   Example: ahmi.exe -instance_prefix 1_
2. The command line parameter –query_instance_prefix specifies the instance identifier of the kernelv instance at program start.
   Example: ahmi.exe -query_instance_prefix
   The function kernelv_diagnosis_upload() starts the upload of diagnosis data for the instance containing the function call.