Skip to content

CPU load investigation

In some cases, it is necessary to investigate which WCS thread loads servers' CPU and how much. To do this:

  1. Find WCS core pid with command

    pgrep -fn com.flashphoner.server.Server
    
    or
    top
    

  2. Get the process thread dump with jstack

    jstack 4240 >> 4240.jstack
    
    Here 4240 is WCS pid found on step 1.
    The file received as a result of executing this command will look as follows

    Here you can get thread names, states and its identifiers in hexadecimal form in 'nid' field

  3. Execute the command

    top -H -p 4240
    
    Here 4240 is WCS pid found on step 1.
    The process threads will be displayed to console with their CPU and memory consumption

    Threads identifiers in decimal form are in the 'PID' column. The thread can be found by this identifier in file formed on step 2, so the thread name can be defined.