# OpenCloudOS-tools **Repository Path**: OpenCloudOS/OpenCloudOS-tools ## Basic Information - **Project Name**: OpenCloudOS-tools - **Description**: OpenCloudOS-tools is a useful toolkit, which allows querying and changing settings for OpenCloudOS, such as system information, upgrade, fixing system problems, backup and recover system. - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 7 - **Created**: 2022-06-14 - **Last Updated**: 2025-08-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ``` # Notice - The OpenCloudOS-tools project is currently under refactoring, and upon completion, it will be reopened as an open-source project. Stay tuned for updates. # OpenCloudOS Toolkit - OpenCloudOS-tools is a useful toolkit, which allows: Querying and changing settings for OpenCloudOS, such as system information; upgrade system. Troubleshoot system problems. - It provides ocos command and you can type "ocos" or "oc" to query detail. # Install We have supply opencloudos-tools rpm on OpenCloudOS's yum repo. Running "yum install -y opencloudos-tools" cloud install the OpenCloudOS Toolkit, and you can enjoy the tool in the later. If you want using the tool on some system which don't support rpm, you can git clone the code, and enter the last level dir to run "ops-run". For example, "cd ops/mem/checkcost" and then run "ops-run", is equivalent to run "oc-ops mem checkcost". Note: OpenCloudOS Toolkit's some subcommand depending kernel's feature, which supplied only on OpenCloudOS kernel. So, if you want to use the whole functions about OpenCloudOS Toolkit, please using OpenCloudOS. # oc -h ocos version 4.0 Usage: ocos OpenCloudOS Server System Management Toolset ocos -a | -A | analyze Analyze the system performance ocos -b | -B | backup [ reboot ] Backup the system online, or reboot to backup ocos -c | -C | check [ rpm_name ] Check the modified rpms ocos -r | -R | recover | reinstall Recover or Reinstall the system ocos -u | -U | update [ rpm_name ] Update the system ocos -i | -I | install [ rpm_name ] install rpms ocos -s | -S | show Show the system version ocos -ch| check-health [ -o OUTPUT_PATH ] Check system health status ocos -cu| check-update Check available package updates ocos ops ... Operation tools ocos -h | -H | help Show this usage ocos -v | -V | version Show the script version Note: "ocos" command is equivalent to "oc" command. "ocos ops" command is equivalent to "oc-ops" command. # Develop guide If you want add sub command in oc-ops, please read the guide. Let us use adding "oc-ops mem checkcost" command as an example. 1. Adding "checkcost" directory at ops/mem/ directory. The name of "mem" directory and "checkcost" directory are from the names of the command "oc-ops mem checkcost" at each level. 2. Each directory in ops/ need a file named as "ops-help", which describe the function of the directory/subcommand. 3. At the last level of directory, must have a script which named as "ops-run". "ops-run" could be a soft link file. The contents of directories in a tree-like format in ops/mem/ are: ops/mem/ ├── checkcost │ ├── checkcost.sh │ ├── ops-help │ └── ops-run -> checkcost.sh └── ops-help Develop language suggestion: We suggest using shell or phython to write OpenCloudOS Toolkit. Because they are interpreted language, they can run on different architectures (x86/arm64/mips/ppc/...) with out compile. ```