acs-plugin-manager is the built-in plugin management tool for Cloud Assistant. You can use the command line to manage the full lifecycle of plugins, which includes operations such as querying, running, checking the status of, deleting, and testing plugins.
Limits
Make sure that your Cloud Assistant Agent is not earlier than the following versions:
Windows: 1.0.0.137
Linux: 1.0.2.510
For more information about how to view or upgrade the Agent version, see Upgrade or disable automatic upgrades for the Cloud Assistant Agent.
Methods to run plugins
You can run Cloud Assistant plugins in the following two ways:
Run commands in the Cloud Assistant console.
Connect to an ECS instance as a user with
sudoaccess permissions and run commands directly on the instance. This method is supported only on Linux.
Core command reference
Query plugins
Query all online Cloud Assistant plugins
sudo acs-plugin-manager --listQuery locally installed Cloud Assistant plugins
sudo acs-plugin-manager --list --local
Sample output
Name Version Publisher OsType Arch PluginType
config_ecs_instance_connect 1.20 aliyun LINUX X64 Once
ecs_tools_test 1.4 aliyun LINUX ALL Persist The following table describes the output fields.
Parameter | Description |
Name | The name of the plugin. |
Version | The version of the plugin. |
Publisher | The provider of the plugin. |
OsType | The operating system supported by the plugin. Valid values: LINUX, WINDOWS, or BOTH (supports both). |
Arch | The architecture supported by the plugin. Valid values: X64, X86, ARM, or ALL (supports all). |
PluginType | The type of the plugin. Valid values:
|
Run plugins
Run a Cloud Assistant plugin
By default, this command attempts to run a locally installed plugin first. If the plugin is not installed locally or if a newer version is available online, the command automatically downloads and runs the latest version.
sudo acs-plugin-manager --exec --plugin <plugin name>Run a locally installed Cloud Assistant plugin
When you use the
--localparameter, the command does not check for online versions or download the plugin. It finds and runs the plugin from the local installation only. If the plugin is not installed locally, the command returns an error.sudo acs-plugin-manager --exec --local --plugin <plugin name>
Sample commands
Run a plugin from a plugin package file
acs-plugin-manager --exec --file /root/ecs_tools_test.zip --params "--start,--on" # --file specifies the path of the plugin package file. # --params specifies the runtime parameters for the plugin. By default, multiple parameters are separated by commas (,). # --separator can be used to specify a different separator, for example, --separator '#'.Download and run a plugin
acs-plugin-manager --exec --plugin ecs_tools_test --pluginVersion 1.2 --params --start # --plugin specifies the plugin name (required). # --pluginVersion specifies the plugin version number. If you do not specify this parameter, the latest version is automatically pulled. # The command queries for the ecs_tools_test plugin both locally and online. If pluginVersion is not empty, the plugin version is also used as a search condition. # If the plugin exists locally, the local plugin is run. Otherwise, the plugin package is pulled from online sources.Restrict execution to a local plugin
acs-plugin-manager --exec --local --plugin ecs_tools_test --params --start # --local restricts the command to find and run the ecs_tools_test plugin only from locally installed plugins. If the plugin is not found locally, it is not pulled from online sources.
Check plugin status
You can query the running status of installed long-running (Persist) plugins.
sudo acs-plugin-manager --statusSample output
[
{
"name": "ecs_tools_test",
"status": "PERSIST_RUNNING",
"version": "1.2"
},
{
"name": "ecs_tools_test_1",
"status": "PERSIST_RUNNING",
"version": "1.2"
}
]The status field shows the current status of the plugin. PERSIST_RUNNING indicates that the plugin is running.
Test a plugin
The --verify command extracts the plugin file to the /usr/local/share/aliyun-assist/plugin/verify_plugin_test directory on Linux or the C:\ProgramData\aliyun\assist\plugin\verify_plugin_test directory on Windows. Then, it runs the plugin's executable file. This is a temporary execution. The plugin information is not recorded in the local installed_plugins file, and queries for the plugin list or status will not return information about this plugin.
Sample command
acs-plugin-manager --verify --url https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/ecs_tools_test/linux/ecs_tools_test_1.2.zip --params --upgrade--verify: Tests the plugin. Extracts the plugin package to the verify_plugin_test directory.
--url: Specifies the address of the plugin package. The address can use the http(s) or file protocol. For example:
Linux:
file:///root/assistpluginlinux.zipWindows:
file:///C:/ProgramData/aliyun/assist/2.1.3.282/assistpluginwindows.zip
Delete a plugin
sudo acs-plugin-manager --remove --plugin <plugin name>When you delete a plugin, the behavior of acs-plugin-manager varies based on the plugin type:
One-time (Once) plugins: The plugin file directory is deleted.
Long-running (Persist) plugins: The command first attempts to call the plugin's
--stopand--uninstalloperations for a graceful uninstallation. The file directory is deleted only after the uninstallation is successful.
Sample command
acs-plugin-manager --remove --plugin ecs_tools_test
# --plugin specifies the name of the plugin to delete.
# For one-time plugins: The /usr/local/share/aliyun-assist/plugin/<plugin-name> directory is deleted directly.
# For long-running plugins: The --stop and --uninstall interfaces of the plugin are called in sequence. If the --uninstall interface returns a value of 0, the plugin directory is deleted. Otherwise, the deletion operation is stopped.
# Deleting a plugin removes the entire directory of the plugin, including all version subdirectories within it.Get help
You can view the complete list of commands and parameters supported by acs-plugin-manager.
sudo acs-plugin-manager --helpFlags:
--help,-h --help, print this help page
--version,-v --version, print the version number
--local,-L
--plugin,-P Specify a plugin by name
--pluginId Specify a plugin by ID
--pluginVersion,-n Specify the plugin version number
--params,-p Set the runtime parameters for the plugin. Use --separator to set the separator for the parameters.
--paramsV2 Set the runtime parameters for the plugin without using a separator.
--url,-u Specify the plugin address
--separator,-s Specify the separator for plugin parameters. The default is a comma.
--file,-F Specify the plugin file
--verbose,-V --verbose, print more logs
--list,-l --list, list all plugins
--list --local, list only locally installed plugins
--verify,-f --verify --url <> --params <>, verify a plugin
--status,-S --status, print the status of all plugins
--exec,-e --exec --plugin <> --params <>, run a plugin, prioritizing online search
--exec --local --plugin <> --params <>, find and run a plugin from local storage only
--exec --file <> --params <>, run a plugin from a plugin package file
--fetchTimeout The maximum time allowed for fetching the plugin, in seconds. Default: 20. A value of 0 means no time limit.
--timeout The maximum time allowed for the plugin to run, in seconds. By default, the timeout value defined in the plugin package is used. A value of 0 means no time limit.
--remove,-r --remove --plugin <>, remove a local plugin and delete its directory fileExamples of common Cloud Assistant plugins
Configure kdump
kdump is a Linux kernel feature that creates a core dump when a kernel error occurs. You can use the ecs_dump_config plugin to enable, disable, or query the dump feature.
Enable dump
sudo acs-plugin-manager --exec --plugin=ecs_dump_config --params --enableDisable dump
sudo acs-plugin-manager --exec --plugin=ecs_dump_config --params --disableQuery dump status
sudo acs-plugin-manager --exec --plugin=ecs_dump_config --params --status
Automatically configure an ENI
Typically, after you add an Elastic Network Interface (ENI), you must manually configure the network settings for the added ENI. You can use the multi-nic-util plugin to automatically configure the network settings for the ENI.
sudo acs-plugin-manager --exec --plugin=multi-nic-utilConfigure IPv6
You can use the ecs-utils-ipv6 plugin to configure an IPv6 address for an ECS instance that has an assigned IPv6 address, or to clear the IPv6 configuration for an instance that does not. The ecs-utils-ipv6 plugin supports enabling, disabling, automatically configuring (default), and manually configuring IPv6. The ecs-utils-ipv6 plugin integrates the ecs-util-ipv6 tool. For more information, see IPv6 communication.
Enable IPv6
sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --enableDisable IPv6
sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --disableAutomatically configure IPv6
sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6Manually configure IPv6
sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --static,<dev>,<ip6s>,<prefix_len>,<gw6>The following provides an example.
sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --static,eth0,fe80::216:3eff:****:****,64,2408:400a:108:8300:ffff:ffff:****:****
Configure NIC multi-queue
The multi-queue feature allows a network interface card (NIC) to use multiple queues to process network packets. The maximum number of queues is determined by the instance type. When a single vCPU of an ECS instance encounters a performance bottleneck in processing network interrupts, you can use the multi-queue feature to distribute network interrupts across different vCPUs. You can run the ethtool -l ethname command to view the current number of queues and the maximum number of supported queues for a NIC.
You can use the ecs_tools_multiqueue plugin to set the number of queues for all NICs to the supported maximum value.
sudo acs-plugin-manager --exec --plugin=ecs_tools_multiqueueManage Intel Hyper-Threading
In some business scenarios, you may need to disable Intel Hyper-Threading (HT) on ECS Bare Metal Instances. You can use the ecs_disable_intel_hyper-threading plugin to disable HT.
The plugin works by adding the kernel parameter nr_cpus=vCPUs of the instance type/2 to the grub file. The nr_cpus parameter limits the maximum number of CPUs supported by the kernel, which disables HT.
After you add the kernel parameter, you must restart the instance for the change to take effect. After the plugin is run, the output prompts you to restart the instance.
This plugin cannot be used to disable HT on instances other than ECS Bare Metal Instances. If you run this plugin on an instance that is not an ECS Bare Metal Instance, a message is displayed indicating that the instance is not an ECS Bare Metal Instance, and the plugin then exits.
sudo acs-plugin-manager --exec --plugin=ecs_disable_intel_hyper-threadingManage security patches
Security vulnerabilities on ECS instances must be fixed promptly. Otherwise, they can pose serious security risks. You can use the patch_manager plugin to scan for and install missing security patches on your ECS instances.
Scan for security patches
sudo acs-plugin-manager --exec --plugin=patch_manager --params --operation,scanInstall security patches and automatically restart the ECS instance as needed
sudo acs-plugin-manager --exec --plugin=patch_manager --params --operation,install,--reboot,ifneedInstall only security patches without restarting the ECS instance
sudo acs-plugin-manager --exec --plugin=patch_manager --params --operation,install,--reboot,no