This topic describes how to check the resources, ports, software versions, and time of a host.
Check host resources
Check whether the host resources meet the minimum requirements specified in Hardware requirements.
Run the following command to check the number of CPU cores:
cat /proc/cpuinfo | grep processor | wc -l;Run the following command to check the memory size:
free -g;Run the following command to check whether the operating system of each host meets the requirements specified in Operating system requirements:
uname -a;
Check ports
Run the telnet, nc, or netstat command to check whether a listening port is occupied by other processes. For more information, see Component listening port list.
# Run the telnet command to check the port. If the port is occupied, a '>' prompt is displayed. If the port is available, the following message is returned: telnet: connect to address xxx.xxx.xxx.1: Connection refused
telnet xxx.xxx.xxx.1 $PORT
# Run the nc command to check the port. If the port is occupied, 0 is returned. If the port is available, a value other than 0 is returned.
echo hi | nc xxx.xxx.xxx.1 $PORT -w 2 > /dev/null 2>&1
echo $?
# Run the netstat command to check the port.
sudo netstat -anp | grep -w $PORT
Check software versions
Run the package management command in the operating system of each host to check whether the software packages meet the requirements specified in Software requirements.
Check host time
OceanBase Database is a distributed database. Therefore, the clocks of servers in a cluster and OceanBase Cloud Platform (OCP) servers must be configured with a clock synchronization service, either NTP or Chrony, to ensure that the clock offset of all servers is within 2 s.
The system time of an OBServer node is synchronized by NTP. However, if the time offset is too large, NTP does not change or correct the system time. If the system time of OBServer nodes within an OceanBase cluster is not synchronized, the election module of the cluster may be affected, resulting in split-brain or the absence of a leader.
For more information about how to check and adjust the operating system time of an OBServer node, see Check the NTP offset.