msMonitor Tool Installation Guide
1. Installation Notes
This tool supports three installation methods: Online Installation, Offline Installation, and Source Installation. Please select the most suitable option based on your actual environment.
2. Installation Methods
2.1 Online Installation
If your device has internet access, you can automatically download and install the tool with a single command. Visit the Ascend Community MindStudio download page, select the corresponding CANN version, and choose Online installation method. The system will guide you through the subsequent steps.
2.2 Offline Installation
For devices in environments without external network access, such as enterprise intranets, first download the complete offline installation package on a machine with internet access, then transfer it to the target device for installation. Visit the Ascend Community MindStudio download page, select the corresponding CANN version, and choose Offline installation method to obtain the corresponding installation package and operation guide.
2.3 Source Installation
2.3.1 Installing Dependencies
The compilation dependencies for dynolog are as follows. Ensure that the following dependencies are installed. Users are responsible for ensuring the security of any third-party dependencies installed manually and should avoid installing versions with known security vulnerabilities.
| Language | Toolchain |
|---|---|
| C++ | gcc >= 8.5.0 |
| Rust | Rust >= 1.81 |
| protobuf | protobuf >= 3.12 |
Install Rust.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/envAfter installation, run the
rustc --versioncommand to check the version number and confirm that the installation was successful.Install Ninja.
# debian sudo apt-get install -y cmake ninja-build # centos sudo yum install -y cmake ninjaAfter installation, run the
ninja --versioncommand to check the version number and confirm that the installation is successful.Install protobuf (a third-party dependency of tensorboard_logger, used for interfacing with tensorboard for display).
# debian sudo apt install -y protobuf-compiler libprotobuf-dev # centos sudo yum install -y protobuf protobuf-devel protobuf-compiler # Python pip install protobuf(Optional) Install openssl (RPC TLS authentication) and generate a certificate key.
If you do not need to use TLS certificate key encryption, this step can be skipped.
# debian sudo apt-get install -y openssl # centos sudo yum install -y opensslThe RPC communication between the dyno CLI and the dynolog daemon is encrypted using a TLS certificate key. When starting the dyno and dynolog binaries, you can specify the directory where the certificate key is stored. The directory must meet the following structure and naming requirements.
Users should use key generation and storage mechanisms that meet their own requirements, and ensure key security and confidentiality. Currently, only RSA-SHA256 and RSA-SHA512 certificate signature algorithms are supported.
Server certificate directory structure:
ssl_certs ├── ca.crt (Root CA certificate for validating peer certificates. Required) ├── server.crt (Server certificate to authenticate the server to clients. Required) ├── server.key (Private key paired with server.crt. May be encrypted. Required) └── ca.crl (Certificate revocation list (CRL) containing revoked certificates. Optional)Client certificate directory structure:
ssl_certs ├── ca.crt (Root CA certificate for validating peer certificates. Required) ├── client.crt (Client certificate to authenticate the client to server. Required) ├── client.key (Private key paired with client.crt. May be encrypted. Required) └── ca.crl (Certificate revocation list (CRL) containing revoked certificates. Optional)
2.3.2 Downloading the Source Code
Download the source code and enter the source code directory.
git clone https://gitcode.com/Ascend/msmonitor.git -b 26.0.0
cd msmonitor2.3.3 Compiling and Installing dynolog
Compile dynolog.
By default, the compilation generates the dyno and dynolog binary files. The
-toption can be used to package the binary files into a.debor.rpmpackage.# # Compile the .deb package. Currently supports amd64 and aarch64 platforms, defaulting to amd64. To compile for the aarch64 platform, change Architecture to arm64 in the third_party/dynolog/scripts/debian/control file bash scripts/build.sh -t deb # # Compile the .rpm package. Currently only supports the amd64 platform bash scripts/build.sh -t rpm # Compile dyno and dynolog binary executable files bash scripts/build.shInstall dynolog.
The following installation methods are available. Choose one based on your server operating system:
Method 1: Install using the
.debpackage (applicable to Debian/Ubuntu and similar systems).dpkg -i --force-overwrite dynolog*.debMethod 2: Install using the
.rpmpackage (applicable to RedHat/Fedora/openSUSE and similar systems).rpm -ivh dynolog*.rpm --nodeps
2.3.4 Compiling and Installing mindstudio_monitor
The mindstudio_monitor .whl package provides common capabilities such as IPCMonitor and MsptiMonitor. This .whl package must be installed before using the nputrace and npu-monitor features.
2.3.4.1 One-Click Installation via Shell Script
chmod +x plugin/build.sh
./plugin/build.shThe following information is printed upon successful installation:
Successfully installed mindstudio_monitor-<version> pybind11-<version>2.3.4.2 Manual Installation
Install dependencies.
pip install wheel pip install pybind11Compile the mindstudio_monitor
.whlpackage.cd ./plugin bash ./stub/build_stub.sh python3 setup.py bdist_wheelAfter compilation, the mindstudio_monitor
.whlpackage is generated in themsmonitor/plugin/distdirectory.Install the mindstudio_monitor
.whlpackage.cd ./plugin/dist pip install mindstudio_monitor-{mindstudio_version}-cp{python_version}-cp{python_version}-linux_{system_architecture}.whlIf the installation is successful, the following information is printed:
Successfully installed mindstudio_monitor-<version> pybind11-<version> xlsxwriter-<version>
3. Installation Verification
After the installation is complete, run the following commands to verify whether the tools are installed successfully:
dyno --help
dynolog --helpIf the output does not report an error and the help information is displayed, the installation is successful.
If dyno --help or dynolog --help indicates that the command does not exist, confirm that the current terminal is using the Python environment where msMonitor is installed.
4. Uninstallation
You can perform uninstallation by following these steps:
Download the script.
curl -O https://inst.obs.cn-north-4.myhuaweicloud.com/26.0.0/ms_install.py- An internet connection is required for downloading. If the environment does not allow internet access or is offline, download the script in an environment with internet access first and then copy it to the target device.
- If the command does not respond or errors such as connection failure or SSL certificate errors occur, see FAQs.
Perform the uninstallation.
python ms_install.py uninstall {tools_name}Where
{tools_name}is configured as the name of the tool to be uninstalled. You can query it by running thepython ms_install.py helpcommand. The tool name is displayed under theAvailable Toolsfield in the printed information.
If the uninstallation is successful, the following information is printed:
Successfully uninstalled 1 tool ({tools_name})5. Upgrade
Upgrading means "uninstalling first and then installing". Run the install command directly. The tool will automatically remove any older version and guide you through a clean reinstallation.
You can run the dyno --version command to view the version information of the current environment, and then select the version to upgrade to. When upgrading, pay attention to the version compatibility. See Release Notes.
6. Logs
Users can configure the MSMONITOR_LOG_PATH environment variable to specify a custom log file path. The default path is msmonitor_log in the current directory.
export MSMONITOR_LOG_PATH=/tmp/msmonitor_log/tmp/msmonitor_log is the custom log file path.