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
If you have configured the
NTPservice, you can run thentpstatcommand to check the host time.If the
NTPservice is unavailable, run thedatecommand to check the host time and compare the time difference between hosts.