- Overview
- Quick Start
- Install PTK
- Usage
- Configuration
- Config Samples
- Commands
- ptk
- ptk completion
- ptk register
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- Troubleshooting
- FAQ
- Release Note
- GPTK - Graphical Deployment Tool
- Community
- Appendix: YAML Syntax
Checking the System
Before installing the database, you need to check the system parameters and software dependencies of the server where the database is to be installed to ensure smooth installation.
During system check, the values provided by PTK are recommended ones in production environment. They may vary in different system versions or hardware configurations. Users need to optimize them according to their environment.
Check Item List
You can run checkos
to perform system check. During the check, PTK checks the following modules.
No. | Category | Check Item | Description |
---|---|---|---|
A1 | System version | Check_OS_Version | Checks the system version. |
A2 | Kernel version | Check_Kernel_Version | Checks the kernel version. |
A3 | Character set | Check_Unicode | Check the character set. |
A4 | Time zone | Check_TimeZone | Checks the time zone. |
A5 | Swap memory | Check_Swap_Memory_Configure | Checks the swap memory configuration. |
A6 | sysctl parameter | Check_SysCtl_Parameter | Checks the sysctl parameter. |
A7 | File system | Check_FileSystem_Configure | Checks the file system configuration. |
A8 | Disk | Check_Disk_Configure | Checks the disk configuration. |
A9 | Preread block | Check_BlockDev_Configure | Checks the block configuration. |
Check_Logical_Block | Checks the logic block. | ||
A10 | IO scheduling | Check_IO_Request | Checks the IO request parameters. |
Check_Asynchronous_IO_Request | Checks the asynchronous IO request parameters. | ||
Check_IO_Configure | Checks the IO configuration. | ||
A11 | Network | Check_Network_Configure | Checks the network configuration. |
A12 | Clock consistency | Check_Time_Consistency | Checks the clock consistency. |
A13 | Firewall | Check_Firewall_Service | Checks the firewall configuration. |
A14 | Transparent huge page | Check_THP_Service | Checks the transparent huge page configuration. |
A15 | Dependencies | Check_Dependent_Package | Checks the database system installation dependencies. |
A16 | CPU command set | Check_CPU_Instruction_Set | Checks the CPU command set. |
A17 | Port status | Check_Port | Checks whether the database port is occupied. |
A18 | Selinux status | Check_Selinux | Checks whether system selinux is disabled. |
A19 | user ulimit status | Check_User_Ulimit | Checks whether the ulimit value of the database user meets the database requirement (if the system user exists). |
To perform system check using PTK, you need to specify the cluster configuration file using-f
and content to be checked using -i
. If the content to be checked is unknown, all check items listed in the above table will be checked by default.
To check individual check items, specify the check items by separating their item numbers with commas.
Example:
ptk checkos -i A1,A2,A3 # To check multiple check items, enter the item number in the -i A1,A2,A3 format.
ptk checkos -i A # Check all check items.
ptk checkos -i A --detail # Display details.
ptk checkos --gen-warning-fix # When the root-fix script is outputted, the check item at the warning level will also generate rectification statements.
Check Result Classification
The PTK check result includes four levels.
- OK: The check result reaches expectations and meets the installation requirement.
- Warning: The check result does not reach expectations but meets the installation requirement.
- Abnormal: The check result does not meet the installation requirement. The installation may fail. The exception needs to be handled manually based on the suggested script by PTK.
- ExecuteError: PTK failed to execute commands during system check. The reason may be that some tools are not installed in the environment or there is an internal bug. This error needs to be handled based on the actual prompt information.
Before installing the database, make sure that the check result of all check items is OK
or Warning
. If the check result displays Abnormal
, the installation will be interrupted.
System Fixing
After running the checkos
command, if there is abnormal check items, PTK will generate a shell script file started with root_fix_os
and followed by timestamp.
You can open it to view the content. It includes the fixing suggestions on abnormal check items provided by PTK.
The fixing suggestions are not generated for warning check items by default. If you need it, specify the
--gen-warning-fix
option in thecheckos
command.
You can manually perform the fixing command, or automatically execute the script on all servers in a cluster using PTK.
Typically, the fixing command requires the super user permission. Therefore, the SSH user in
config.yaml
needs to be root or a user who has the sudo permission when the fixing is performed using theexec
command.
ptk exec -f config.yaml -s <root_fix_os.xxx.sh>