Monitoring

X-PUSH Monitoring Server

This service allows operators to monitor and manage X-PUSH through console and script.

How to use monitoring server

Two methods are provided to monitor the operation of the X-PUSH server.

How to use console (telnet)

Connect to telnet

In the command prompt (cmd), type telnet X-PUSH server IP monitoring port (default port: 50003).

01_telnet_intro

Login to telnet

Log in by referring to the id and pw in $XPUSH_HOME/conf/user.properties.

02_telnet_login

[telnet] show status

01_show_status_client3

[telnet] show clients

06_telnet_show_clients_user3

[telnet] show client [userID]

08_telnet_show_client_userID

[telnet] show client (userID, projectID, topicType, topicId)

09_telnet_show_client_ENTER

[telnet] save clients

15_telnet_save_clients

-> The clientInfo folder is created in $XPUSH_HOME and the json file with the name including the creation time is created inside the folder.

14_telnet_folder_after

16_telnet_json_file_name

17_telnet_json_file_contents

[telnet] help

20_telnet_help

[telnet] invalid command : This message is displayed when an invalid command is entered.

12_telnet_invalid_command

[telnet] no data : This phrase is displayed when there are no search results that match the relevant conditions.

10_telnet_show_client_noData_full

How to use script (batch, shell)

Run the script in $XPUSH_HOME/bin.

When using a Linux shell script, if you enter factors containing special characters,

the script may not run properly.

ex) event not found


=> If you enter the factor value between '' (single quotation marks), it will run normally.

[script] show_status

Windows : show_status.bat X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) show_status.bat localhost 50003 tobesoft xpush

Linux : ./show_status.sh X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) ./show_status.sh localhost 50003 tobesoft xpush

For id and pw, refer to $XPUSH_HOME/conf/user.properties.

The following is an example of running.

02_show_status_result

[script] show_clients

Windows : show_clients.bat X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) show_clients.bat localhost 50003 tobesoft xpush

Linux : ./show_clients.sh X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) ./show_clients.sh localhost 50003 tobesoft xpush

For id and pw, refer to $XPUSH_HOME/conf/user.properties.

The following is an example of running.

04_show_clients_result

[script] show_client (userID)

Windows : show_client.bat X-PUSH Server IP Monitoring port (Default port: 50003) id pw userID

ex) show_client.bat localhost 50003 tobesoft xpush user01

Linux : ./show_client.sh X-PUSH Server IP Monitoring port (Default port: 50003) id pw userID

ex) ./show_client.sh localhost 50003 tobesoft xpush user01

For id and pw, refer to $XPUSH_HOME/conf/user.properties.

The following is an example of running.

06_show_client_result

[script] save_clients

Windows : save_clients.bat X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) save_clients.bat localhost 50003 tobesoft xpush

Linux : ./save_clients.sh X-PUSH Server IP Monitoring port (Default port: 50003) id pw

ex) ./save_clients.sh localhost 50003 tobesoft xpush

For id and pw, refer to $XPUSH_HOME/conf/user.properties.

The following is an example of running.

08_save_clients_result

-> The clientInfo folder is created in $XPUSH_HOME and the json file with the name including the creation time is created inside the folder.

10_save_clients_clientInfo_dir,vi

11_save_clients_clientInfo_contents

[script] no data : This phrase is displayed when there are no search results that match the relevant conditions.

12_show_client_noData

Detailed Item Description (show_status)

.module Main X-PUSH Server

RUNTIME

Item

Description

Startup Time

Server startup time.

Current Time

Current time.

Status Reset

Status reset time.

MEMORY

Item

Description

Max

Maximum available memory for JVM.

Total Heap

Maximum heap memory.

Used Heap

Used heap memory.

Free Heap

Free heap memory.

An X-PUSH Server does not operate normally due to memory shortage when the free heap memory reaches zero.

QUEUE

The queue value is a statistic collected at 0.1-second intervals. A total of 10,000 are stored. The most recent 1,000 seconds (approx. 16 minutes) of stats are provided.

Item

Description

Message Size in Queue

The number of messages currently waiting to be

processed in the X-PUSH main queue

Average Messages in Queue

Average number of messages in the queue. If this value is greater than 1, a delay is occurring in pushing messages.

Waiting Ratio

Percentage of time that messages are waiting in the queue relative to the total server runtime.

Message Size in Queue item being 0 or more and the number continuously being increased. X-PUSH messaging sending being delayed.


More supply than message processing

DB processing being delayed

Client Servant Container

Item

Description

Container Count

Number of containers managing servants.

Total Client Count

Total number of currently-connected clients.

Total Push Count

Total number of messages pushed to the client after starting the server. Sum of the values pushed by each container.

Average Tps

Average per-second number of messages transmitted by the server. The average tps value for all containers.

Container-related delays and tps-related values represent the most recent 10,000 message cases. When individual messages are transmitted to containers and processed, each delay is collected and the respective statistics are calculated.

The items provided per container are as follows:

Item

Description

#client

Number of clients managed by the container.

#pushed

Total number of messages pushed by the container.

#in Q:

Number of messages currently in the container queue.

avg delay

Average standby time for messages in the container queue. The unit is in seconds.

max delay

Maximum standby time for messages in the container queue. The unit is in seconds.

push tps

Per-second number of messages pushed by the container. The value is obtained from the number of messages processed by the container and the time. The number of messages processed by the container is independent from the number of messages actually pushed to each client. For example, certain messages are transmitted to a small number of clients while other messages are transmitted to all clients.

#in Q item being 0 or more and the number continuously being increased. X-PUSH message sending being delayed.

More supply than message processing

Socket Push Message Provider

Item

Description

Connected Provider Count

Number of connected message providers.

Per Servant

Each message provider's IP address, port, connected accounts, and the number of messages provided are displayed.

Provider Message Queue

Item

Description

Push Count

Number of messages pushed by using the X-PUSH Server’s internal queue.

Repository Service

QUEUE

It means the number of messages currently waiting / queue size.

QUEUE

Item

Description

Provide Message Queue Size

Queue with supplied reliable message waiting

Response Message Queue Size

Queue with confirmation response message waiting

Request Message Queue Size

Queue with unreceived sending request message waiting

Topic Message Queue Size

Queue with topic registration request message waiting

#Queue Size item being 0 or more and the number continuously being increased. X-PUSH messaging sending being delayed.


DB processing being delayed


ex) Provide Message Queue Size = 5000 / 20000 being continued or being continuously increased.

Message Process Time(milisec)

It means the time required to process a message by each Queue (Provide, Response, Request, Topic) and the status of the operating thread that processes the corresponding message.

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

#

Activation operating thread – code level / activation operating thread

Avg

Average time required

Min

Minimum time required

Max

Maximum time required

DB Connection Pool

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

Active

Number of Connection in use

Max

Maximum number of Connection

Idle

Number of Connection waiting

Notification Message Queue

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

in Q

Number of messages accumulated in the corresponding queue

Notification Result Update Queue

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

in Q

Number of messages accumulated in the corresponding queue

Apns Notification Message Queue

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

in Q

Number of messages accumulated in the corresponding queue

FCM Notification Message Queue

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

in Q

Number of messages accumulated in the corresponding queue

ApnsNotifier Service

Message Process Time(milisec)

It means the message processing time of the ApnsQueue’s operating thread and Provider sending data to Apns, and the status of the operating thread that processes the corresponding message.

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

#

Activation operating thread – code level / activation operating thread

Avg

Average time required

Min

Minimum time required

Max

Maximum time required

FcmNotifier Service

Message Process Time(milisec)

It means the message processing time of FcmQueue’s operating thread and Provider sending data to FCM, and the status of the operating thread that processes the corresponding message.

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

#

Activation operating thread – code level / activation operating thread

Avg

Average time required

Min

Minimum time required

Max

Maximum time required

Etc Message Queue

Message Process Time(milisec) Provider, Response, Request, Topic 메시지의 처리에 소요되는 시간과 해당 메시지를 처리하는 작업 쓰레드의 상태

Item

Description

in Q

Number of messages accumulated in the corresponding queue

JMX

JConsole Connection

Windows environment setup

  1. Run %JAVA_HOME%\bin\jconsole

  1. Enter the IP address and port in the [Remote] tab, and click the [Connect] button.

A connection to JMX is not made if the X-PUSH Server is installed on Linux.

X-PUSH is bound to 0.0.0.0 and run for both Linux and Windows. For Windows, however, the routing information is registered in the routing table under its own IP address for access via the corresponding address. This is not possible for Linux, because the same information is not registered in the routing table by default.

Method 1

Assign the actual IP address instead of "0.0.0.0" under the "ServerBindAddress" section in xpush_conf.xml.

<service name="Publisher">
	...
	<attribute name="ServerBindAddress">192.168.0.1</attribute>
	...
</service>
Method 2

Assign the IP address to the "/etc/hosts" file.

192.168.0.1 localhost.localdomain localhost
::1 localhost6.localdomain localhost6

Item

X-PUSH MBean

MBean Information List

ObjectName

Description

ConnectionManagerService

X-PUSH:name=ConnectionManagerService

Information for currently-connected users.

NodeManagerService

X-PUSH:name=NodeManagerService

X-PUSH Node information.

PublisherService

X-PUSH:name=PublisherService

Publisher information.

RepositoryService

X-PUSH:name=RepositoryService

Repository information.

System

X-PUSH:name=System

System information.

Container

X-PUSH:type=container, name=TobePublishContainerService0

X-PUSH:type=container, name=TobePublishContainerService1

......

Container information.

Notification

X-PUSH:type=notification, name=ApnsNotifierService

APNs and GCM information.

Provider

X-PUSH:type=notification, name=GcmNotifierService

Provider information.

ConnectionManagerService

MBean Information List

Description

ConnectUserCount

Number of connected clients.

MBean 정보 목록

설명

ConnectUserCount

Number of connected clients

NodeManagerService

MBean Information List

Description

MyInetInfo

X-PUSH node’s IP and port information.

AnotherNodeCount

Number of nodes.

PublishCount

Number published to other nodes.

AnotherNodeList

Connected node information.

PublisherService

MBean Information List

Description

ClientNumber

Number of connected clients.

PublishAddress

Publish IP address.

ContainerCount

Number of containers.

PublishPort

Publish port.

XpushVersion

X-PUSH version.

DateStart

X-PUSH start date/time.

DateReset

X-PUSH data reset time.

DateCurrent

Current time.

RepositoryService

MBean Information List

Description

UpdateMsgQueueMaxCapacity

Queue Size (Receipt confirmed message queue)

SelectMsgQueueMaxCapacity

Queue Size (Unreceived message queue)

InsertMsgQueueMaxCapacity

Queue Size (Reliable message queue)

SelectMsgQueueState

Queue status (0: open, 1: blocked)

UpdateMsgQueueState

Queue status (0: open, 1: blocked)

InsertMsgQueueState

Queue status (0: open, 1: blocked)

DbcpConnectionPoolActiveCount

Number of active pools.

DbcpConnectionPoolIdleCount

Number of remaining idle pools.

DbcpConnectionPoolMaxCount

Maximum number of pools.

SelectMsgQueueSize

The number of messages currently in the queue. (Unreceived message queue)

InsertMsgQueueSize

The number of messages currently in the queue. (Reliable message queue)

UpdateMsgQueueSize

The number of messages currently in the queue. (Receipt confirmed message queue)

ThreadPoolMax

Number of thread pools.

FailCount

Number of database processing failures.

FailCountLimit

FailCount limit.

TimeRetryDBPeriodMillis

DB check interval (milliseconds) when the queue is blocked.

System

MBean Information List

Description

CpuIdle

System CPU Idle

CpuSys

System CPU usage.

CpuUser

User CPU usage.

JavaHome

JAVA_HOME directory

MemoryCommittedHeap

X-PUSH maximum heap size

MemoryFreeHeap

X-PUSH free heap size

MemoryMaxHeap

X-PUSH maximum heap size

MemoryUsedHeap

X-PUSH used heap Size

ProcessCpu

CPU usage

ProcessName

Process name

ProcessPid

Process ID

ProcessRss

Actual memory usage

ProcessSize

X-PUSH process size

SystemMemoryTotal

Total system memory

SystemMemoryUsed

System memory usage.

SystemMemoryFree

Free system memory.

SysmemNetworkTotalrx

Network read traffic.

SystemNetworkTotaltx

Network write traffic.

SystemSwapFree

Free swap amount.

SystemSwapTotal

Total swap amount.

SystemSwapUsed

Swap usage.

XpushHome

X-PUSH Home directory.

Container

MBean Information List

Description

AverageDelay

Average standby time for messages in the container queue. The unit is in seconds.

CountInQueue

Number of messages in the container queue.

MaxCapacity

Maximum number of messages that can be held in a container queue.

MaxDelay

Maximum standby time for messages awaiting push in a container queue. The unit is in seconds.

MaxServantNum

Maximum number of servants.

PushCount

Number of pushed general messages.

PushTps

Per-second number of messages pushed from a container.

QueueAverageDelay

Average delay time.

PushTps

Per-second number of messages pushed from a container.

QueueAverageDelay

Average delay time.

QueueCurrentCount

Number of messages in queue.

QueueMaxDelay

Maximum delay time.

QueueMaxSize

Maximum number in queue.

ReliCount

Number of pushed reliability messages.

ServantNum

Number of servants.

ThreadPoolCurrentSize

Current thread pool size.

ThreadPoolSetMaxSize

Maximum thread pool size.

ThreadPoolSetMinSize

Minimum thread pool size.

Notification

ApnsNotifierService

MBean Information List

Description

FailureCount

Failure count.

KeystorePath

APNs certificate location.

Retries

Number of retry attempts for failed transmissions.

SuccessCount

Number of successful transmissions.

TotalSendCount

Total number of transmissions.

GcmNotifierService

MBean Information List

Description

Apikey

Authentication key.

FailureCount

Failure count.

Retries

Number of retry attempts for failed transmissions.

SuccessCount

Number of successful transmissions.

TotalSendCount

Total number of transmissions.

Provider

MBean Information List

Description

ConnectProviderList

Connected provider information. (IP, port)

Port

Provider port.

ProviderAddress

Provider IP address.

ProviderNumber

Number of connected providers.

Identifying Resource Shortages

Resource shortages for server operation can be identified through the values from show status.

Memory Shortage

Normal operation is not possible when the free heap memory is low. If the amount of free heap memory is less than 10% of the total available, the memory must be expanded, and the settings must be changed. Modify the -Xms and -Xmx values in the "startup.bat / startup.sh" for the memory settings.

startup.bat
set JAVA_OPTS=-Xms1024m –Xmx1024m –server
startup.sh
JAVA_OPTS=”-Xms1024m –Xmx1024m –server $JAVA_OPTS”

An X-PUSH Server does not operate normally due to memory shortage when the free heap memory reaches zero.

Connection Resource Shortage

The maximum number of clients that can connect to an X-PUSH Server is determined by the container number set in "xpush_config.xml" and the number of servants per container.

The default values at the time of deployment are 20 Servant Containers and 50 Servants per container. A total of 1,000 clients are able to connect. (20 containers x 50 servants) Additional client connections are no longer allowed when the Total Client Count reaches the maximum number of connections. In such cases, the settings need to be modified.

Modifying the Servant Container and Servant numbers can negatively affect the performance of an X-PUSH Server.

CPU/Network Resource Shortage

A Waiting Ratio value greater than 30% signifies that messages are not immediately delivered and are waiting in standby. This indicates a CPU or network resource shortage. In this case, the Average Messages in Queue value is usually large, and the Average Tps is at a low level. CPU and network usage should be monitored using external tools, and the necessary resources should be expanded.

Lack of Database Connection

When DB usage increases, there is no DB Connection to process other messages, resulting in messages to be accumulated in Queue. At this time, the Max Connection of DB can be checked to increase the value in maxActive in X-PUSH xpush_conf.xml

[show status Symptom] 
MODULE : Repository Service
          QUEUE
                    Provide Message Queue Size = 100 / 100
                    Response Message Queue Size = 500 / 20000
                    Request Message Queue Size = 1000 / -1
                    Topic Message Queue Size = 0 / -1
          Message Process Time(milisec)
                    Provide           # : 0 / 0        Avg : 0      Min : 0      Max : 0
                    Response        # : 0 / 0        Avg : 0      Min : 0      Max : 0
                    Request          # : 20 / 20     Avg : 0      Min : 0      Max : 0
                    Topic             # : 0 / 0        Avg : 0      Min : 0      Max : 0

If all 20 Connections are used in Request, messages are accumulated in Queue as other Queues cannot be processed.
<service name="DbcpService">
	...
	<attribute name="maxActive">50</attribute>
	...
</service>

If MaxActive is all in use, the X-PUSH server does not operate properly.