# Starting AICM ## Install dependencies AICM requires several Python packages to run. Install the dependencies in a virtual environment as in the following example: python -m venv source /bin/activate pip install -r requirements.txt Copy to clipboard ## Start agent After activating the virtual environment, start AICM using the following command: usage: aicm_agent.py [-h] [-c CONFIG_FILE] [--ip IP] [--port PORT] [-u USERS] [--ssl-key SSL_KEY] [--ssl-cert SSL_CERT] [--qmonitor-ip QMONITOR_IP] [--qmonitor-port QMONITOR_PORT] [--log LOG] [--max-log-size MAX_LOG_SIZE] [-v] [--dump-default-config DUMP_DEFAULT_CONFIG] [--dump-default-users DUMP_DEFAULT_USERS] [--collection KEY=VALUE [KEY=VALUE ...]] optional arguments: -h, --help show this help message and exit -c CONFIG_FILE, --config_file CONFIG_FILE Config file path --ip IP IP address to bind to --port PORT Port number to listen on -u USERS, --users USERS Full path to users credentials file (.yaml) --ssl-key SSL_KEY, --ssl_key SSL_KEY Path to the SSL key file. Required for HTTPS --ssl-cert SSL_CERT, --ssl_cert SSL_CERT Path to the SSL certificate file. Required for HTTPS --qmonitor-ip QMONITOR_IP, --qmonitor_ip QMONITOR_IP IP of QMonitor GRPC Server --qmonitor-port QMONITOR_PORT, --qmonitor_port QMONITOR_PORT Port of QMonitor GRPC Server --log LOG Path where to store logs --max-log-size MAX_LOG_SIZE, --max_log_size MAX_LOG_SIZE Max sizes of logs in bytes -v, --verbose Increase output verbosity --collection KEY=VALUE [KEY=VALUE ...] Set a number of key-value pairs (don't put spaces before or after the = sign). Dump default files: Dumps the default files and then exit. --dump-default-config DUMP_DEFAULT_CONFIG, --dump_default_config DUMP_DEFAULT_CONFIG Dump the default config to the specified folder and exit --dump-default-users DUMP_DEFAULT_USERS, --dump_default_users DUMP_DEFAULT_USERS Dump the default users file to the specified folder and exit Copy to clipboard You can also use a configuration file to provide the settings shown in the previous example. The configuration file can be supplied using the `--config_file` option. If settings are found in both the command line arguments and in a configuration file, then the command line arguments take priority. The following is an example AICM configuration file. # AICM Configuration # IP to bind AICM ip = 127.0.0.1 # Port to bind AICM port = 9000 # Full path to users credentials file # users = # SSL Key path # ssl_key = # SSL Certificate path # ssl_cert = # IP of QMonitor GRPC Server qmonitor_ip = localhost # Port of QMonitor GRPC Server qmonitor_port = 62472 # Path to directory where to store logs # log = # Max sizes of logs in bytes max_log_size = 100000000 # Verbosity of AICM agent verbose = 0 # KEY=VALUE for defining collection intervals in milliseconds for each collection collection = [HEALTH=1000, DDR_BW=1000, PCI=1000, RAS_ECC_ERROR=10000] Copy to clipboard You can also run AICM in a service-like manner : sudo bash scripts/start_aicm_agent.sh Copy to clipboard Once running, test the APIs at `:/docs` using the SwaggerUI. ## Stop agent The following command will stop the agent when `scripts/start_aicm_agent.sh` was used to start it: > > > sudo bash scripts/stop_aicm_agent.sh > Copy to clipboard Alternatively, pressing `Ctrl+C` will stop AICM if it’s running using the `python aicm_agent.py` command. ## Setup basic auth Since [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication) is used as the authentication method, users will need to authenticate all requests to our API. **The accepted credentials are stored in the ``.users.yaml`` file.** You can add/modify the credentials using the following syntax: credentials: - username: admin hash: $2b$12$rEQTKF4IVHKPyeX6miseJ.xOjhmI5OFqlLuwE2OB4CuEIvHC2IFP6 note: "Example of credential" Copy to clipboard The credentials must be in every request made to the HTTP Rest Endpoints. `bcrypt` hashes the password for security purposes. You can use the script at `/scripts/hash_password.py` to get the hash. Replace `` and run the following command to get the hash. python ./scripts/hash_password.py Copy to clipboard ## HTTPS Basic authentication is a simple mechanism for authentication. For added security, use HTTPS which requires that you provide a certificate and key upon startup. The following example shows the arguments for passing the key and certificate. --ssl-key SSL_KEY Path to the SSL key file. Needs to be provided for HTTPS --ssl-cert SSL_CERT Path to the SSL certificate file. Needs to be provided for H`TTPS Copy to clipboard Last Published: Aug 25, 2026 [Previous Topic AIC-manager](https://docs.qualcomm.com/bundle/publicresource/80-99100-3/topics/aic-manager.md) [Next Topic Metrics](https://docs.qualcomm.com/bundle/publicresource/80-99100-3/topics/metrics.md)