Managing the Agent (Linux)
To view, start, stop, and uninstall the Agent, you must log in as user root.
Viewing the Agent Version
- Log in to the target ECS as user root.
- Run the following command to check the Agent version:
if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then /usr/local/uniagent/extension/install/telescope/bin/telescope -v; else echo 0; fi
- If 0 is returned, the old Agent version is used.
- If other results are returned, the new Agent version is used.
Updating the Agent to the Latest Version
Constraints
- Batch Agent update cannot be performed across regions.
Procedure
- Log in to an ECS as user root.
- Run the following command to check the Agent version:
if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then /usr/local/uniagent/extension/install/telescope/bin/telescope -v; else echo 0; fi
- If 0 is returned, the old Agent is used.
- If other values are returned, the new Agent is used.
- Create the iplist.txt file in the /usr/local directory of the ECS and sort out all ECSs whose Agent needs to be updated.
In the iplist.txt file, ensure that each line contains one IP address and one root user password. Then you can perform batch Agent upgrade based on the list.
In the following example, abcd is the password. Enter the password based on the site requirements.
192.168.1.1,abcd 192.168.1.2,abcd
- Determine the architecture of the ECS where the script is executed.
if [[ $(arch) == "aarch64" ]]; then echo " uniagent_patch_installer_arm64"; else echo " uniagent_patch_installer_amd64";fi
- Run the batch update command. Replace Region ID in the following command with the correct region ID, and replace ${batch_installer} with the returned result in 4.
cd /usr/local && curl -k -O https://obs.${Region_id}.myhuaweicloud.com/uniagent-${Region_id}/script/${batch_installer} && chmod +x ${batch_installer} && ./${batch_installer} -c "cd /usr/local/telescope && bash uninstall.sh && cd /usr/local && curl -k -O https://obs.${Region_id}.myhuaweicloud.com/uniagent-${Region_id}/script/agent_install.sh && bash agent_install.sh"
Take the x86 ECS in the AP-Hong Kong region as an example. Run the following command:
cd /usr/local && curl -k -O https://obs.ap-southeast-1.myhuaweicloud.com/uniagent-ap-southeast-1/script/uniagent_patch_installer_amd64 && chmod +x uniagent_patch_installer_amd64 && ./uniagent_patch_installer_amd64 -c "cd /usr/local/telescope && bash uninstall.sh && cd /usr/local && curl -k -O https://obs.ap-southeast-1.myhuaweicloud.com/uniagent-ap-southeast-1/script/agent_install.sh && bash agent_install.sh"
Checking the Agent Status (Old Version)
Log in to an ECS or BMS as user root and run the following command to check the Agent status:
service telescoped status
The following message indicates that the Agent is running properly:
"Telescope process is running well."
Checking the Agent Status (New Version)
Log in to an ECS or BMS as user root and run the following command to check the Agent status:
/usr/local/uniagent/extension/install/telescope/telescoped status
The following message indicates that the Agent is running properly:
"Telescope process is running well."
Starting the Agent (Old Version)
/usr/local/telescope/telescoped start
Starting the Agent (New Version)
/usr/local/uniagent/extension/install/telescope/telescoped start
Restarting the Agent (Old Version)
/usr/local/telescope/telescoped restart
Restarting the Agent (New Version)
Check the Agent PID.
ps -ef |grep telescope
After the process is forcibly stopped, wait for 3 to 5 minutes for the Agent to automatically restart. Figure 1 shows an operation example.
kill -9 PID
Stopping the Agent (Old Version)
Log in to an ECS or BMS and run the following command to stop the Agent:
service telescoped stop
If the Agent installation fails, it may be impossible to stop the Agent normally. In this case, run the following command to stop the Agent:
/usr/local/telescope/telescoped stop
Stopping the Agent (New Version)
Log in to an ECS or BMS and run the following command to stop the Agent:
/usr/local/uniagent/extension/install/telescope/telescoped stop
Uninstalling the Agent (Old Version)
Run the following command to uninstall the Agent:
/usr/local/telescope/uninstall.sh
You can manually uninstall the Agent. After the uninstallation, Cloud Eye does not collect the ECS or BMS monitoring data every one minute. To use the Agent again, reinstall it by referring to Installing and Configuring the Agent on a Linux ECS or BMS. Before reinstalling the Agent, manually delete the previous Agent installation package.
Uninstalling the Agent (New Version)
You can manually uninstall the Agent. After the uninstallation, Cloud Eye does not collect the ECS or BMS monitoring data every one minute. To use the Agent again, reinstall it by referring to Installing and Configuring the Agent on a Linux ECS or BMS.
Run the following command to uninstall the Agent:
cd /usr/local/uniagent/script/
./uninstall.sh
Before reinstalling the Agent, manually delete the previous Agent installation package. The new Agent installation package is stored in /usr/local/uniagent_install_amd64.sh.
Last Article: Managing the Agent
Next Article: Managing the Agent (Windows)

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.