Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Overview


When technical support related to DBMS is provided, there are cases where information for problem-solving is insufficient only with the performance view provided by Altibase.

This document describes several related commands provided by the operating system to obtain necessary information.

Icon

For errors and improvements related to this document, please contact the technical support portal or technical support center.

 

Common Command


This section describes commands that do not have special restrictions that can be executed by all operating systems.

netstat


  • This command checks whether there is a network configuration or an error packet.

    If a problem occurs between sender and receiver on a packet, the value of R(T)X-ERR/R(T)X-DRP/R(T)X-OVR increases. In this case, there may be some problem on the network, so take measures to have the administrator check.

vmstat


  • This command checks system memory, disk, swap in/out, and CPU status at intervals set by the user.

    The main indicators to be checked are as follows.

     Description
    proc rThe number of threads waiting to occupy the CPU. If the value is large, it can be judged that a CPU bottleneck occurs.
    memory freeFree space on physical memory
    swap si, soAn increase of si/so means that disk I/Os between the swap disk and memory are issued
    CPU us sy id wa stChange trends for each item should be observed

Linux


CPU usage by thread


  • In Linux, the user can also check the CPU for each thread with the top command. If executed with the top -H option, the search is performed for each thread. However, it is possible only if the installed procps version is 3.2.7 or later.
    If not, simply check as follows. (Not well supported in lower version)

    LWP is a unique number for each thread, and the value displayed in the C item is the CPU usage rate.

     Description
    CPUCPU share that the thread is currently using
    LWPIDUnique number of thread

pstack


  • Like pstack, when checking the CPU occupancy of a thread, it is used as a way to check what part the thread is currently executing.

     

     

    Since all of the above results are output for each thread, classify each thread and check from the bottom to the top within the paragraph. In the example above, Thread 44 (LWP:7165) is in the following order.

     Description
    clone start_thread staticRunner run multiplexingAsShared execute_Task execute_Task_READYcreating and starting a thread
    cmiRecvThe user's query request has been read in the communication
    mmtServiceThread::executeProtocol mmtSerivceThread::execute doExecuteEnter the execution stage
    mmcStatement::execute mmcStatement::executeDML qci::execute qmx:executeInsertSelect qmnINST:doItNext qmnINST:insertOneRow smiTableCursor::insertRow smiTableCursor::normalInsertRow smcRecord::insertVersionCheck the execution of Insert statement
    smcRecordUpdate::writeInsertLog smxTrans::writeTransLog smrLogMgr::writeLogWrite redo log to execute insert statement
    smLogMgr::updateTransLSNInfo smxTrans::setLstUndoNxtLSNUpdate transaction lsn for undo
    iduPosixLockAcquire a lock on a thread

    By looking at the information of ps/pstack as shown above, it is possible to check what specific thread that uses the most CPU is performing. Also among many SQL statements, a more narrow trace can be made with the above pstack results.

Checking the list of files in use


  • If a separate utility, such as lsof in Linux, is not installed, do the following.

    In Linux, various information can be checked under the /proc/<process id> path, so please refer to the related information.

System Log


  • Check the files that exist in /var/log/. Generally, check the messages file.

SUN


  • These are commands based on Solaris 5.10.

prstat


  • Altibase is developed in the thread structure, and this command is used to check which thread occupies and uses a lot of CPU in some cases.

pstack


  • Similar to prstat, when checking the CPU occupancy of a thread, it is used as a way to check what part the thread is currently executing.

    The c++filter command is used to remove the case where the function named called between C/C++ is not displayed properly. When not used, the function name is displayed in a form that is difficult to see, so it is possible to use it. Generally, it exists where the executable file of the path where the compiled is installed is located. (Ex: /opt/SUNwspro/bin/)
    In the same way as the method of interpreting the result of pstack, it is divided into paragraph units based on lwp# for each thread and interpreted from bottom to top.

pfiles


  • Similar to prstat, when checking the CPU occupancy of a thread, it is used as a way to check what part the thread is currently executing.

    In the above result, all the files accessed by the process in the order of 0 and 1 along with the currently available file descriptor information are shown.
    When running pfiles while multiple sessions are connected, all data files, trace logs, transaction log files, and even a list of communication connections are displayed.

System Log


  • During the technical support, if the user needs to find the cause from outside, SUN should check /var/adm/messages. The file extension means the week the log was recorded, and the log of the week including today is recorded in the messages file.

    The system log is difficult to understand clearly unless the user is an expert of each vendor, but when providing technical support dude to a failure, etc., make sure to check if there is any important log at a specific time.

AIX


  • Certain commands may not be supported prior to AIX 5.1.

ps


  • The same results can be checked as SUN's prstat.

    In the above result, the occupancy rate used by threads can be checked with the CP column.

prostack


  • The same results can be checked as SUN's pstack.

    In the same way as the method of interpreting the result of pstack, it is divided into paragraph units based on tid# for each thread and interpreted from bottom to top. In the above result, it can be seen that the transmission part of the communication thread about the result is recorded after a certain query is executed.

procfiles


  • The same results can be checked as SUN's pfiles

    -The used file can also be checked by using the -n option. 

System Log


  • It is used to check the system log if an error has occurred in the operating equipment. Since the log for disk device errors, network device errors, or abnormal termination of processes can be checked, the user must check the system log when to find the cause from outside during the technical support.

HP-UX


  • Depending on the type of HP CPU, it is classified into PA-RISK/ITANIUM, but some commands may not be supported by PA-RISK equipment.

CPU usage by thread with glance


  • In the case of HP, CPU usage for each thread can be checked with a monitoring tool called glance.

pstack


  • This shows the same results as SUN's pstack.

    lwpid means the unique number of the thread. Similarly, paragraphs are separated by lwpid and interpreted from bottom to top. In the above case, the operation to connect the replication Sender Thread with the other party is shown.

     

pfiles


  • This shows the same results as SUN's pfiles.

System Log


  • To check the system log in HP, check as follows.

  • No labels