- Print
- PDF
Inspect Ncloud Tool Kit (Linux)
- Print
- PDF
Available in VPC
Linux Ncloud Tool Kit (Linux NTK) is a tool kit for Linux VM provided on NAVER Cloud Platform. You can easily operate and maintain NCP VM through server status diagnosis and Disk I/O measurement functions.
Diagnosis of server status
You can use the SYSTEM CHECKING tool in NTK to diagnose the state of the Linux server, identify symptoms and causes, and check the troubleshooting measures.
The items for diagnosing server status differ according to the types of hypervisor hosting VM.
XEN environment Linux VM status diagnosis
Account Config File
The following concerns checking the account configuration file.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if the /etc/passwd file exists
| No /etc/passwd file exists | Copy the existing backup file using the following command# cp -p /etc/passwd- /etc/passwd |
2. Check if the /etc/shadow file exists
| No /etc/shadow file exists | Copy the existing backup file using the following command# cp -p /etc/shadow- /etc/shadow |
3. Check if the /etc/group file exists
| No /etc/group file exists | Copy the existing backup file using the following command# cp -p /etc/group- /etc/group |
Mandatory Process
The following concerns checking the processes mandatory for operating NCP Linux VM.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if the monitoring-related agent file exists
| No agent file for monitoring exists | See the following guide to install the monitoring agent |
2. Check if the monitoring-related agent_updater file exists
| No agent_updater file for monitoring exists | See the following guide to install the monitoring agent |
3. Check the status of monitoring service registration (enable) during booting
| The monitoring service is not set to auto-start upon booting | See the following guide to install the monitoring agent |
4. Check if the Xentools package is installed
| The Xentools package is not properly installed | See the following guide to re-install Xentools |
5. Check the status of Xentools service registration (enable) during booting
| The Xentools service is not set to auto-start upon booting | See the following guide to re-install Xentools |
Ncloud Setup Script
The following concerns checking the setting script mandatory for operating NCP Linux VM.
Be sure to check this item when you create a custom server image or reset the administrator password on the console.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the ncloud_auto.sh script
| No ncloud_auto.sh file exists |
|
The ncloud_auto.sh file exists, but the permission does not satisfy the condition | Set the file permission using the following command:# chmod 700 /usr/local/etc/ncloud_auto.sh | |
2. Check for the mandatory content in the ncloud_auto.sh script
| The ncloud_auto.sh script contains invalid content |
|
3. Check for the mandatory script settings that must be executed upon booting
| No ncloud_auto.sh syntax exists in rc.local | Insert the following syntax in /etc/rc.local /usr/local/etc/ncloud_auto.sh > /tmp/. ncloud_out.log 2> /tmp/.ncloud_error.log & |
4. Check the status of the mandatory service that must be executed upon booting
| ncloud_auto.service is disabled | Enable the ncloud_auto service using the following command:# systemctl enable ncloud_auto.service |
5. Check the status of the rc.local file and the related services
| Permission of the rc.local file does not meet the condition | Set the file permission using the following command:# chmod 755 /etc/rc.local |
rc-local.service is disabled | Enable the service using the following command: 1. CentOS 7.x # systemctl unmask rc-local.service 2. Ubuntu # systemctl enable rc-local.service 3. Rocky Linux 8.x # systemctl enable rc-local.service |
DNS Config
The following concerns checking DNS configuration and status.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the /etc/resolv.conf file
| No /etc/resolv.conf file exists | Create a resolv.conf file and update the permission using the following commands. Then, see the following guide to inspect the DNS configuration# touch /etc/resolv.conf # chmod 644 /etc/resolv.conf |
2. Check the connection to NAVER Cloud's internal server
| Attempt to connect to NAVER Cloud's internal server failed | See the following guide to inspect the DNS configuration |
3. Check the mandatory content in the /etc/resolv.conf file
| Mandatory configuration is missing or erroneous in the /etc/resolv.conf file | See the following guide to inspect the DNS configuration |
4. Check the first DNS information in the /etc/resolv.conf file or systemd-resolve
| The first DNS information is not the IP information provided by NCP | See the following guide to inspect the DNS configuration |
Network Config
The following concerns checking the network configuration.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the Network configuration file
| No network configuration file exists | Recreate the network configuration file and restart the network service |
2. Check the eth0 interface dhcp settings
| BOOTPROTO of eth0 is not set to dhcp | Set BOOTPROTO to dhcp and restart the network service 1. CentOS/Rocky Linux file path: /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 MTU=8950 BOOTPROTO=dhcp ONBOOT=yes 2. Ubuntu file path: /etc/network/interfaces auto eth0 iface eth0 inet dhcp post-up /sbin/ifconfig eth0 mtu 8950 |
3. Check additional network interface BOOTPROTO value setting
| BOOTPROTO has no value set in the additional network interface | Assign a value to BOOTPROTO and restart the network service |
4. Check the Network Manager service status (applicable to CentOS 7 only)
| When Network Manager is enabled in the CentOS 7 environment, an error occurs during dhcp operation | Disable the Network Manager service using the following commands:# systemctl disable NetworkManager # systemctl stop NetworkManager # systemctl mask NetworkManager # chkconfig network on # systemctl restart network.service |
root File System
The following concerns checking the root file system status.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Run a full check on the usage rate of the root file system (/)
| The root file system (/) has a high usage rate (90% or higher) | Delete unnecessary files from the root file system (/) |
2. Check for existence of the /tmp directory
| No /tmp directory exists | Create a directory using the following command:# mkdir /tmp |
3. Check the permission of the /tmp directory
| Permission of /tmp does not meet the condition | Set the permission using the following command:# chmod 1777 /tmp |
4. Check the owner of the /tmp directory
| Owner of /tmp does not meet the condition | Set the owner of the directory using the following command:# chown root: /tmp |
5. Check the owner group of the /tmp directory
| Owner group of /tmp does not meet the condition | Set the owner group of the directory using the following command:# chown :root /tmp |
fstab File
The following concerns checking the file (/etc/fstab) storing file system mount information.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if /etc/fstab exists
| No /etc/fstab file exists | Create the file using the following commands, and run inspection by referring to the relevant guide# touch /etc/fstab # chmod 644 /etc/fstab |
2. Check the /etc/fstab syntax
| The content registered in /etc/fstab is incorrect or of an invalid format | See the following guide to inspect the fstab file |
grub Config
The following concerns checking the grub configuration.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check grub files
| The mandatory file for booting has been deleted or damaged |
# grub2-mkconfig -o /boot/grub2/grub.cfg |
Kernel Image
The following concerns checking the kernel image list of NCP Linux VM.
Function | Cause | Troubleshooting Measure |
---|---|---|
Check the kernel image
| No /boot directory exists | Back up the storage snapshot and create a new VM or restore the VM for use |
Repo Config
The following concerns checking the repository configuration file.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the repository configuration directory
| No repository configuration directory exists | Create a repository configuration directory using the following command: 1. CentOS / Rocky Linux # mkdir -p /etc/yum.repos.d/ 2. Ubuntu # mkdir -p /etc/apt/ |
2. Check repository configuration files
| No repository configuration file exists | Download the repository configuration file using the following command: 1. CentOS 7.x # wget -q http://init.ncloud.com/server/linux/repo/centos7/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo 2. Ubuntu 18.04 # wget -q http://init.ncloud.com/server/linux/repo/ubuntu18/sources.list -O /etc/apt/sources.list 3. Ubuntu 20.04 # wget -q http://init.ncloud.com/server/linux/repo/ubuntu20/sources.list -O /etc/apt/sources.list 4. Rocky Linux 8.x # wget -q http://init.ncloud.com/server/linux/repo/rocky8/Rocky-BaseOS.repo -O /etc/yum.repos.d/Rocky-BaseOS.repo |
Mandatory Package
The following concerns checking the packages essential for operating NCP Linux VM.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if the wget package exists
| No wget package is installed | Download the package using the following command: 1. CentOS / Rocky Linux # yum install wget 2. Ubuntu # apt install wget |
2. Check if /usr/bin/wget file can run
| No wget execution file exists or there is no permission to execute the file | Download the package using the following command: 1. CentOS / Rocky Linux # yum install wget 2. Ubuntu # apt install wget |
3. Check if the dos2unix package exists
| No dos2unix package is installed | Download the package using the following command: 1. CentOS / Rocky Linux # yum install dos2unix 2. Ubuntu # apt install dos2unix |
4. Check if the /usr/bin/dos2unix file can run
| No dos2unix execution file exists or there is no permission to execute the file | Download the package using the following command: 1. CentOS / Rocky Linux # yum install dos2unix 2. Ubuntu # apt install dos2unix |
5. Check if the rpcbind package exists (except for Ubuntu)
| No rpcbind package is installed | Download the package using the following command: 1. CentOS / Rocky Linux # yum install rpcbind |
6. Check if the /usr/sbin/rpcbind file can run (except for Ubuntu)
| No rpcbind execution file exists or there is no permission to execute the file | Download the package using the following command: 1. CentOS / Rocky Linux # yum install rpcbind |
7. Check if the chrony package exists (except for Ubuntu)
| No chronyd package is installed | Download the package using the following command: 1. CentOS / Rocky Linux # yum install chrony |
8. Check if the /usr/sbin/chronyd file can run (except for Ubuntu)
| No chrony execution file exists or there is no permission to execute the file | Download the package using the following command: 1. CentOS / Rocky Linux # yum install chrony |
KVM environment Linux VM status diagnosis
Account Config File
The following concerns checking the account configuration file.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if the /etc/passwd file exists
| No /etc/passwd file exists | Copy the existing backup file using the following command# cp -p /etc/passwd- /etc/passwd |
2. Check if the /etc/shadow file exists
| No /etc/shadow file exists | Copy the existing backup file using the following command# cp -p /etc/shadow- /etc/shadow |
3. Check if the /etc/group file exists
| No /etc/group file exists | Copy the existing backup file using the following command# cp -p /etc/group- /etc/group |
Mandatory Process
The following concerns checking the processes mandatory for operating NCP Linux VM.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if the monitoring-related agent file exists
| No agent file for monitoring exists | See the following guide to install the monitoring agent |
2. Check if the monitoring-related agent_updater file exists
| No agent_updater file for monitoring exists | See the following guide to install the monitoring agent |
3. Check the status of monitoring service registration (enable) during booting
| The monitoring service is not set to auto-start upon booting | See the following guide to install the monitoring agent |
DNS Config
The following concerns checking DNS configuration and status.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the /etc/resolv.conf file
| No /etc/resolv.conf file exists | Create a resolv.conf file and update the permission using the following commands. Then, see the following guide to inspect the DNS configuration# touch /etc/resolv.conf # chmod 644 /etc/resolv.conf |
2. Check the connection to NAVER Cloud's internal server
| Attempt to connect to NAVER Cloud's internal server failed | See the following guide to inspect the DNS configuration |
3. Check the mandatory content in the /etc/resolv.conf file
| Mandatory configuration is missing or erroneous in the /etc/resolv.conf file | See the following guide to inspect the DNS configuration |
4. Check the first DNS information in the /etc/resolv.conf file or systemd-resolve
| The first DNS information is not the IP information provided by NCP | See the following guide to inspect the DNS configuration |
Network Config
The following concerns checking the network configuration.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check the Network configuration file
| No network configuration file exists | Recreate the network configuration file and restart the network service |
2. Check the eth0 interface dhcp settings
| BOOTPROTO of eth0 is not set to dhcp | Set BOOTPROTO to dhcp and restart the network service 1. CentOS/Rocky Linux file path: /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes 2. Ubuntu file path: /etc/network/interfaces auto eth0 iface eth0 inet dhcp |
3. Check additional network interface BOOTPROTO value setting
| BOOTPROTO has no value set in the additional network interface | Assign a value to BOOTPROTO and restart the network service |
4. Check the Network Manager service status (applicable to CentOS 7 only)
| When Network Manager is enabled in the CentOS 7 environment, an error occurs during dhcp operation | Disable the Network Manager service using the following commands:# systemctl disable NetworkManager # systemctl stop NetworkManager # systemctl mask NetworkManager # chkconfig network on # systemctl restart network.service |
fstab File
The following concerns checking the file (/etc/fstab) storing file system mount information.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check if /etc/fstab exists
| No /etc/fstab file exists | Create the file using the following commands, and run inspection by referring to the relevant guide# touch /etc/fstab # chmod 644 /etc/fstab |
2. Check the /etc/fstab syntax
| The content registered in /etc/fstab is incorrect or of an invalid format | See the following guide to inspect the fstab file |
grub Config
The following concerns checking the grub configuration.
Function | Cause | Troubleshooting Measure |
---|---|---|
1. Check grub files
| The mandatory file for booting has been deleted or damaged |
# grub2-mkconfig -o /boot/grub2/grub.cfg |
Kernel Image
The following concerns checking the kernel image list of NCP Linux VM.
Function | Cause | Troubleshooting Measure |
---|---|---|
Check the kernel image
| No /boot directory exists | Back up the storage snapshot and create a new VM or restore the VM for use |
Measuring block storage IOPS
You can measure the performance of the storage connected to the Linux server by using FIO TEST tool of NTK.
This function only applies to XEN-based Linux VM.
Step 1. Run NTK
To run NTK on the Linux server, do the following:
- Enter the
cd /usr/local/etc
command.
- You are moved to the path where NTK is located.
- Enter the
tar zxvf ntk.tar.gz
command.
- The NTK file is unzipped.
- If no ntk.tar.gz file exists or if you wish to replace the existing file with the latest version, enter
wget -P /usr/local/etc http://init.ncloud.com/server/ntk/linux/xen/ntk.tar.gz
to download the file.
- Enter the following commands in the given order to run NTK.
# cd /usr/local/etc/ntk
# ./ntk
Step 2. Run FIO TEST
If you need to measure disk IOPS, do the following:
- Click (E) EXECUTE - << Run System Apps >>.
- Click (F) FIO TEST - << FOR DISK IO TEST >>.
- Click the [YES] button to run disk IOPS measurement.
- After selecting the disk to measure the IOPS for, click the [OK] button.
If the server has only 1 disk connected, it is skipped and the disk is automatically selected.
- Select the IOPS test options and click the [OK] button.
- random read: random reading
- random write: random writing
- Disk IOPS is measured.
- Once measurement is completed, you can see the output result. After checking them, click the [OK] button.
- If you want to additionally send the log file to NAVER Cloud's Technical support center, then click the [Yes] button. If you do not, click the [No] button to exit the procedure.
- If the log is delivered successfully, you can see the delivery success message and a Short-URL that the user can use to download the log.