Inspect Ncloud Tool Kit (Linux)
    • PDF

    Inspect Ncloud Tool Kit (Linux)

    • PDF

    Article Summary

    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.

    Note

    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.

    FunctionCauseTroubleshooting Measure
    1. Check if the /etc/passwd file exists
    • NTK execution result:
      [NOK] /etc/passwd file does not exist
    No /etc/passwd file existsCopy the existing backup file using the following command
    # cp -p /etc/passwd- /etc/passwd
    2. Check if the /etc/shadow file exists
    • NTK execution result:
      [NOK] /etc/shadow file does not exist
    No /etc/shadow file existsCopy the existing backup file using the following command
    # cp -p /etc/shadow- /etc/shadow
    3. Check if the /etc/group file exists
    • NTK execution result:
      [NOK] /etc/group file does not exist
    No /etc/group file existsCopy 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.

    FunctionCauseTroubleshooting Measure
    1. Check if the monitoring-related agent file exists
    • NTK execution result:
      [NOK] cloud insight agent is Not exist.. Please Check
    No agent file for monitoring existsSee the following guide to install the monitoring agent
    2. Check if the monitoring-related agent_updater file exists
    • NTK execution result:
      [NOK] nsight_updater Nok exist or permission(-rw-r--r--) is Not OK... Please Check
    No agent_updater file for monitoring existsSee the following guide to install the monitoring agent
    3. Check the status of monitoring service registration (enable) during booting
    • NTK execution result
      [NOK] cloud insight process auto start is Not OK.. Please check
    The monitoring service is not set to auto-start upon bootingSee the following guide to install the monitoring agent
    4. Check if the Xentools package is installed
    • NTK execution result:
      [NOK] xe-guest-utilites installation status is Not OK... Please Check
    The Xentools package is not properly installedSee the following guide to re-install Xentools
    5. Check the status of Xentools service registration (enable) during booting
    • NTK execution result:
      [NOK] xentools auto start is Not OK.. Please check
    The Xentools service is not set to auto-start upon bootingSee the following guide to re-install Xentools

    Ncloud Setup Script

    The following concerns checking the setting script mandatory for operating NCP Linux VM.

    Caution

    Be sure to check this item when you create a custom server image or reset the administrator password on the console.

    FunctionCauseTroubleshooting Measure
    1. Check the ncloud_auto.sh script
    • NTK execution result:
      [NOK] ncloud_auto.sh file does NOT exist.. Please Check
    No ncloud_auto.sh file exists
    • Install the ncloud_auto.sh setup script
    • Create a new server and copy the /usr/local/etc/ncloud_auto.sh script to under /usr/local/etc/ of the server in question
    The ncloud_auto.sh file exists, but the permission does not satisfy the conditionSet 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
    • NTK execution result:
      [NOK] Mandatory Content does not exist in ncloud_auto.sh
    The ncloud_auto.sh script contains invalid content
    • Delete the existing ncloud_auto.sh script and newly install the script
    • Create a new server and copy the /usr/local/etc/ncloud_auto.sh script to under /usr/local/etc/ of the server in question
    3. Check for the mandatory script settings that must be executed upon booting
    • NTK execution result:
      [NOK] ncloud_auto Not exist in /etc/rc.local... Please Check
    No ncloud_auto.sh syntax exists in rc.localInsert 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
    • NTK execution result:
      [NOK] ncloud_auto.service is not enabled... Please Check
    ncloud_auto.service is disabledEnable 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
    • NTK execution result:
      [NOK] /etc/rc.local or permission(-rwxr-xr-x) is Not OK.. Please Check
    Permission of the rc.local file does not meet the conditionSet the file permission using the following command:
    # chmod 755 /etc/rc.local
    rc-local.service is disabledEnable 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.

    FunctionCauseTroubleshooting Measure
    1. Check the /etc/resolv.conf file
    • NTK execution result:
      [NOK] There is no exsit /etc/resolv.conf
    No /etc/resolv.conf file existsCreate 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
    • NTK execution result:
      [NOK] Can't connect to Naver Cloud internal server
    Attempt to connect to NAVER Cloud's internal server failedSee the following guide to inspect the DNS configuration
    3. Check the mandatory content in the /etc/resolv.conf file
    • NTK execution result:
      [NOK] The configuration does not exist or is incorrect(127.0.0.53) in resolv.conf
      [NOK] The configuration does not exist or is incorrect(169.254.169.53,169.254.169.54) in resolv.conf
    Mandatory configuration is missing or erroneous in the /etc/resolv.conf fileSee the following guide to inspect the DNS configuration
    4. Check the first DNS information in the /etc/resolv.conf file or systemd-resolve
    • NTK execution result:
      [NOK] First DNS Information in /etc/resolv.conf
      [NOK] First DNS Information in systemd-resolve
    The first DNS information is not the IP information provided by NCPSee the following guide to inspect the DNS configuration

    Network Config

    The following concerns checking the network configuration.

    FunctionCauseTroubleshooting Measure
    1. Check the Network configuration file
    • NTK execution result:
      [NOK] /etc/networks file does not exist
      [NOK] /etc/sysconfig/network file does not exist
    No network configuration file existsRecreate the network configuration file and restart the network service
    2. Check the eth0 interface dhcp settings
    • NTK execution result:
      [NOK] eth0 is configured by [BOOTPROTO value]
    BOOTPROTO of eth0 is not set to dhcpSet 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
    • NTK execution result:
      [NOK] BOOTPROTO entry does not exist in [NIC name]
    BOOTPROTO has no value set in the additional network interfaceAssign a value to BOOTPROTO and restart the network service
    4. Check the Network Manager service status (applicable to CentOS 7 only)
    • NTK execution result:
      [NOK] NetworkManager is active
    When Network Manager is enabled in the CentOS 7 environment, an error occurs during dhcp operationDisable 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.

    FunctionCauseTroubleshooting Measure
    1. Run a full check on the usage rate of the root file system (/)
    • NTK execution result:
      [NOK] rootfs is Not OK.. (90%) Please Check
      [NOK] rootfs can't write(/tmp)
      [NOK] rootfs can't touch and delete(/tmp/rotest-temps)
    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
    • NTK execution result:
      [NOK] /tmp does not exist.
    No /tmp directory existsCreate a directory using the following command:
    # mkdir /tmp
    3. Check the permission of the /tmp directory
    • NTK execution result:
      [NOK] /tmp permission(drwxrwxrwt.) is not ok
    Permission of /tmp does not meet the conditionSet the permission using the following command:
    # chmod 1777 /tmp
    4. Check the owner of the /tmp directory
    • NTK execution result:
      [NOK] /tmp user (user name) is not ok
    Owner of /tmp does not meet the conditionSet the owner of the directory using the following command:
    # chown root: /tmp
    5. Check the owner group of the /tmp directory
    • NTK execution result:
      [NOK] /tmp group (user name) is not ok
    Owner group of /tmp does not meet the conditionSet 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.

    FunctionCauseTroubleshooting Measure
    1. Check if /etc/fstab exists
    • NTK execution result:
      [NOK] /etc/fstab file does not exist
    No /etc/fstab file existsCreate 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
    • NTK execution result:
      Field(*),Number of fields in fstab: [NOK]
      Field(1),Source device: [NOK]
      Field(2),Mount point dir: [NOK]
      Field(3),Filesystem exist: [NOK]
      Field(4),Options value: [NOK]
      Field(5),Config of filesystem dump: [NOK]
      Field(6),Config of filesystem check: [NOK]
    The content registered in /etc/fstab is incorrect or of an invalid formatSee the following guide to inspect the fstab file

    grub Config

    The following concerns checking the grub configuration.

    FunctionCauseTroubleshooting Measure
    1. Check grub files
    • NTK execution result:
      [NOK] /boot/grub2/grub.cfg file does not exist
      [NOK] /boot/grub/grub.cfg file does not exist
    The mandatory file for booting has been deleted or damaged
    • Back up the storage snapshot, and create a new VM or restore the VM for use
    • Create a GRUB file using the following command:
    • # grub2-mkconfig -o /boot/grub2/grub.cfg

    Kernel Image

    The following concerns checking the kernel image list of NCP Linux VM.

    FunctionCauseTroubleshooting Measure
    Check the kernel image
    • NTK execution result:
      [NOK]/boot folder does not exist
    No /boot directory existsBack 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.

    FunctionCauseTroubleshooting Measure
    1. Check the repository configuration directory
    • NTK execution result:
      [NOK] /etc/apt folder does not exist
      [NOK] /etc/yum.repos.d folder does not exist
    No repository configuration directory existsCreate 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
    • NTK execution result:
      [NOK] /etc/apt/sources.list file does not exist
      [NOK] /etc/yum.repos.d/CentOS-Base.repo file does not exist
      [NOK] /etc/yum.repos.d/Rocky-BaseOS.repo file does not exist
    No repository configuration file existsDownload 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.

    FunctionCauseTroubleshooting Measure
    1. Check if the wget package exists
    • NTK execution result:
      [NOK] wget package is not installed
    No wget package is installedDownload 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
    • NTK execution result:
      [NOK] /usr/bin/wget file does not exist or permission is not OK... Please Check
    No wget execution file exists or there is no permission to execute the fileDownload 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
    • NTK execution result:
      [NOK] dos2unix package is not installed
    No dos2unix package is installedDownload 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
    • NTK execution result:
      [NOK] /usr/bin/dos2unix file does not exist or permission is not OK... Please Check
    No dos2unix execution file exists or there is no permission to execute the fileDownload 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)
    • NTK execution result:
      [NOK] rpcbind package is not installed
    No rpcbind package is installedDownload 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)
    • NTK execution result:
      [NOK] /usr/sbin/rpcbind file does not exist or permission is not OK... Please Check
    No rpcbind execution file exists or there is no permission to execute the fileDownload the package using the following command:
    1. CentOS / Rocky Linux
    # yum install rpcbind
    7. Check if the chrony package exists (except for Ubuntu)
    • NTK execution result:
      [NOK] chrony package is not installed
    No chronyd package is installedDownload 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)
    • NTK execution result:
      [NOK] /usr/sbin/chronyd file does not exist or permission is not OK... Please Check
    No chrony execution file exists or there is no permission to execute the fileDownload 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.

    FunctionCauseTroubleshooting Measure
    1. Check if the /etc/passwd file exists
    • NTK execution result:
      [NOK] /etc/passwd file does not exist
    No /etc/passwd file existsCopy the existing backup file using the following command
    # cp -p /etc/passwd- /etc/passwd
    2. Check if the /etc/shadow file exists
    • NTK execution result:
      [NOK] /etc/shadow file does not exist
    No /etc/shadow file existsCopy the existing backup file using the following command
    # cp -p /etc/shadow- /etc/shadow
    3. Check if the /etc/group file exists
    • NTK execution result:
      [NOK] /etc/group file does not exist
    No /etc/group file existsCopy 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.

    FunctionCauseTroubleshooting Measure
    1. Check if the monitoring-related agent file exists
    • NTK execution result:
      [NOK] cloud insight agent is Not exist.. Please Check
    No agent file for monitoring existsSee the following guide to install the monitoring agent
    2. Check if the monitoring-related agent_updater file exists
    • NTK execution result:
      [NOK] nsight_updater Nok exist or permission(-rw-r--r--) is Not OK... Please Check
    No agent_updater file for monitoring existsSee the following guide to install the monitoring agent
    3. Check the status of monitoring service registration (enable) during booting
    • NTK execution result
      [NOK] cloud insight process auto start is Not OK.. Please check
    The monitoring service is not set to auto-start upon bootingSee the following guide to install the monitoring agent

    DNS Config

    The following concerns checking DNS configuration and status.

    FunctionCauseTroubleshooting Measure
    1. Check the /etc/resolv.conf file
    • NTK execution result:
      [NOK] There is no exsit /etc/resolv.conf
    No /etc/resolv.conf file existsCreate 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
    • NTK execution result:
      [NOK] Can't connect to Naver Cloud internal server
    Attempt to connect to NAVER Cloud's internal server failedSee the following guide to inspect the DNS configuration
    3. Check the mandatory content in the /etc/resolv.conf file
    • NTK execution result:
      [NOK] The configuration does not exist or is incorrect(127.0.0.53) in resolv.conf
      [NOK] The configuration does not exist or is incorrect(169.254.169.53,169.254.169.54) in resolv.conf
    Mandatory configuration is missing or erroneous in the /etc/resolv.conf fileSee the following guide to inspect the DNS configuration
    4. Check the first DNS information in the /etc/resolv.conf file or systemd-resolve
    • NTK execution result:
      [NOK] First DNS Information in /etc/resolv.conf
      [NOK] First DNS Information in systemd-resolve
    The first DNS information is not the IP information provided by NCPSee the following guide to inspect the DNS configuration

    Network Config

    The following concerns checking the network configuration.

    FunctionCauseTroubleshooting Measure
    1. Check the Network configuration file
    • NTK execution result:
      [NOK] /etc/networks file does not exist
      [NOK] /etc/sysconfig/network file does not exist
    No network configuration file existsRecreate the network configuration file and restart the network service
    2. Check the eth0 interface dhcp settings
    • NTK execution result:
      [NOK] eth0 is configured by [BOOTPROTO value]
    BOOTPROTO of eth0 is not set to dhcpSet 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
    • NTK execution result:
      [NOK] BOOTPROTO entry does not exist in [NIC name]
    BOOTPROTO has no value set in the additional network interfaceAssign a value to BOOTPROTO and restart the network service
    4. Check the Network Manager service status (applicable to CentOS 7 only)
    • NTK execution result:
      [NOK] NetworkManager is active
    When Network Manager is enabled in the CentOS 7 environment, an error occurs during dhcp operationDisable 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.

    FunctionCauseTroubleshooting Measure
    1. Check if /etc/fstab exists
    • NTK execution result:
      [NOK] /etc/fstab file does not exist
    No /etc/fstab file existsCreate 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
    • NTK execution result:
      Field(*),Number of fields in fstab: [NOK]
      Field(1),Source device: [NOK]
      Field(2),Mount point dir: [NOK]
      Field(3),Filesystem exist: [NOK]
      Field(4),Options value: [NOK]
      Field(5),Config of filesystem dump: [NOK]
      Field(6),Config of filesystem check: [NOK]
    The content registered in /etc/fstab is incorrect or of an invalid formatSee the following guide to inspect the fstab file

    grub Config

    The following concerns checking the grub configuration.

    FunctionCauseTroubleshooting Measure
    1. Check grub files
    • NTK execution result:
      [NOK] /boot/grub2/grub.cfg file does not exist
      [NOK] /boot/grub/grub.cfg file does not exist
    The mandatory file for booting has been deleted or damaged
    • Back up the storage snapshot, and create a new VM or restore the VM for use
    • Create a GRUB file using the following command:
    • # grub2-mkconfig -o /boot/grub2/grub.cfg

    Kernel Image

    The following concerns checking the kernel image list of NCP Linux VM.

    FunctionCauseTroubleshooting Measure
    Check the kernel image
    • NTK execution result:
      [NOK]/boot folder does not exist
    No /boot directory existsBack 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.

    Note

    This function only applies to XEN-based Linux VM.

    Step 1. Run NTK

    To run NTK on the Linux server, do the following:

    1. Enter the cd /usr/local/etc command.
    • You are moved to the path where NTK is located.
    1. 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.
    1. 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:

    1. Click (E) EXECUTE - << Run System Apps >>.

    server-ts-ntk-vpc_fio-test-01

    1. Click (F) FIO TEST - << FOR DISK IO TEST >>.

    server-ts-ntk-vpc_fio-test-02

    1. Click the [YES] button to run disk IOPS measurement.

    server-ts-ntk-vpc_fio-test-03

    1. After selecting the disk to measure the IOPS for, click the [OK] button.
    Note

    If the server has only 1 disk connected, it is skipped and the disk is automatically selected.

    server-ts-ntk-vpc_fio-test-04

    1. Select the IOPS test options and click the [OK] button.
    • random read: random reading
    • random write: random writing

    server-ts-ntk-vpc_fio-test-05

    1. Disk IOPS is measured.

    server-ts-ntk-vpc_fio-test-06

    1. Once measurement is completed, you can see the output result. After checking them, click the [OK] button.

    server-ts-ntk-vpc_fio-test-07

    1. 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.

    server-ts-ntk-vpc_fio-test-08

    1. 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.

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.