[go: up one dir, main page]

CN106201830A - A kind of method and system writing data monitoring based on EPOLL - Google Patents

A kind of method and system writing data monitoring based on EPOLL Download PDF

Info

Publication number
CN106201830A
CN106201830A CN201610599328.9A CN201610599328A CN106201830A CN 106201830 A CN106201830 A CN 106201830A CN 201610599328 A CN201610599328 A CN 201610599328A CN 106201830 A CN106201830 A CN 106201830A
Authority
CN
China
Prior art keywords
socket
epoll
client
monitoring
writing data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610599328.9A
Other languages
Chinese (zh)
Inventor
傅树萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Fujitsu Communication Software Co Ltd
Original Assignee
Fujian Fujitsu Communication Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Fujitsu Communication Software Co Ltd filed Critical Fujian Fujitsu Communication Software Co Ltd
Priority to CN201610599328.9A priority Critical patent/CN106201830A/en
Publication of CN106201830A publication Critical patent/CN106201830A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides a kind of method writing data monitoring based on EPOLL, and Epoll service end accepts the connection of client;After successful connection, socket data dictionary carries out preserving socket object.Create an independent monitoring thread to carry out object each to the socket in socket data dictionary and be timed monitoring;Interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction threshold value, then processes the client of its correspondence;The present invention also provides for a kind of system writing data monitoring based on EPOLL, is monitored server resource, adjusts server resource in time.

Description

A kind of method and system writing data monitoring based on EPOLL
Technical field
The present invention relates to a kind of method and system writing data monitoring based on EPOLL.
Background technology
Epoll be linux kernel be process high-volume filec descriptor made improve poll, be multichannel under Linux The enhancing version of multiplexing I/O interface select/poll;It is the most a small amount of active in a large amount of concurrently connections that it can significantly improve program In the case of system CPU utilization rate.
But, edge-triggered (ET) pattern than level trigger (LT) have less system to call, if send relief area less than, Epoll notice write event is until developer fills up transmission relief area, and epoll just can send relief area by full in next time afterwards Become less than time notice write event.When socket is in not writeable state when.We need temporary for the data not sent There is list to be sent, so there is a kind of hidden danger, i.e. when client is only sent out and do not received when, list the most to be sent can be slow Slowly consume server resource, finally result in server resource and exhaust, cause program to run quickly routed.
Summary of the invention
The technical problem to be solved in the present invention, is to provide a kind of method and system writing data monitoring based on EPOLL, Server resource is monitored, adjusts server resource in time.
One of present invention is achieved in that a kind of method writing data monitoring based on EPOLL, comprises the steps:
Step 1, Epoll service end accept the connection of client;
After step 2, successful connection, socket data dictionary carries out preserving socket object.Create an independent monitoring Thread carries out object each to the socket in socket data dictionary and is timed monitoring;
Step 3, interval limiting time check the size not sending relief area inside socket object, if exceeding restriction threshold Value, then process the client of its correspondence.
Further, also include that step 3 is further particularly as follows: interval limiting time is checked and do not sent inside socket object The size of relief area, if exceeding restriction threshold value, client is processed by Epoll service end notice operation maintenance personnel.
The two of the present invention are achieved in that a kind of system writing data monitoring based on EPOLL, including such as lower module:
Link block, Epoll service end accepts the connection of client;
Monitoring module, after successful connection, socket data dictionary carries out preserving socket object.Create an independent prison Control thread carries out object each to the socket in socket data dictionary and is timed monitoring;
Processing module, interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction Threshold value, then process the client of its correspondence.
Further, also include that processing module is further particularly as follows: interval limiting time is checked inside socket object not Sending the size of relief area, if exceeding restriction threshold value, client is processed by Epoll service end notice operation maintenance personnel.
Present invention have the advantage that a kind of method and system writing data monitoring based on EPOLL of the present invention, be no matter Carry out stress test or the properly functioning situation of service end, can get rid of owing to not being the problem caused by RAM leakage, this The time of investigation can be significantly reduced, because in the case of system occurs running quickly and bursts, programmer always goes from the angle of internal memory Investigation problem, this may waste a lot of time and go to solve.
Accompanying drawing explanation
The present invention is further illustrated the most in conjunction with the embodiments.
Fig. 1 is that the inventive method performs flow chart.
Fig. 2 is the schematic diagram of present system.
Detailed description of the invention
As it is shown in figure 1, the method that the present invention writes data monitoring based on EPOLL, comprise the steps:
Step 1, Epoll service end accept the connection of client;
After step 2, successful connection, socket data dictionary carries out preserving socket object.Create an independent monitoring Thread carries out object each to the socket in socket data dictionary and is timed monitoring;
Step 3, interval limiting time check the size not sending relief area inside socket object, if exceeding restriction threshold Value, client is processed by Epoll service end notice operation maintenance personnel.
As in figure 2 it is shown, the present invention writes the system of data monitoring based on EPOLL, including such as lower module:
Link block, Epoll service end accepts the connection of client;
Monitoring module, after successful connection, socket data dictionary carries out preserving socket object.Create an independent prison Control thread carries out object each to the socket in socket data dictionary and is timed monitoring;
Processing module, interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction Threshold value, client is processed by Epoll service end notice operation maintenance personnel.
This method is to be solved is in the case of long connection.When client receiving efficiency is the lowest or only sends out not reception etc. Occasion.Increase and write data monitoring.Main method is: the socket connecting each client is managed, and creates a monitoring Thread.The caching not sent of the socket of each client is monitored by timing.Spatial cache exceedes certain data.End Mouth is which client.Releasing memory space.Carry out mail transmission.Navigate to concrete TCP Client.And notify.
The when that service end resource being increased always and seldom declines by people.Investigation is gone to increase from internal memory angle often Problem.In the case of still cannot solving resource increase under investigating internal memory, and the monitoring to I/O caching often neglects, This typically requires a lot of experience of accumulation and could solve, and babe in the wood needs to expend a great deal of time could send out with energy Existing.And no matter my this method is by stress test or the properly functioning situation of service end.Can get rid of due to Not being the problem caused by RAM leakage, this can be significantly reduced the time of investigation, because there is, in system, situation about bursting of running quickly Under, programmer always goes investigation problem from the angle of internal memory, and this may waste a lot of time and go to solve.
Although the foregoing describing the detailed description of the invention of the present invention, but those familiar with the art should managing Solving, our described specific embodiment is merely exemplary rather than for the restriction to the scope of the present invention, is familiar with this The technical staff in field, in the equivalent modification made according to the spirit of the present invention and change, should be contained the present invention's In scope of the claimed protection.

Claims (4)

1. the method writing data monitoring based on EPOLL, it is characterised in that: comprise the steps:
Step 1, Epoll service end accept the connection of client;
After step 2, successful connection, socket data dictionary carries out preserving socket object.Create an independent monitoring thread Carry out object each to the socket in socket data dictionary and be timed monitoring;
Step 3, interval limiting time check the size not sending relief area inside socket object, if exceeding restriction threshold value, then The client of its correspondence is processed.
A kind of method writing data monitoring based on EPOLL the most according to claim 1, it is characterised in that: also include step 3 Further particularly as follows: interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction threshold value, Client is processed by Epoll service end notice operation maintenance personnel.
3. the system writing data monitoring based on EPOLL, it is characterised in that: include such as lower module:
Link block, Epoll service end accepts the connection of client;
Monitoring module, after successful connection, socket data dictionary carries out preserving socket object.Create an independent monitoring line Cheng Jinhang object each to the socket in socket data dictionary is timed monitoring;
Processing module, interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction threshold value, Then the client of its correspondence is processed.
A kind of system writing data monitoring based on EPOLL the most according to claim 3, it is characterised in that: also include processing Module is further particularly as follows: interval limiting time checks the size not sending relief area inside socket object, if exceeding restriction Threshold value, client is processed by Epoll service end notice operation maintenance personnel.
CN201610599328.9A 2016-07-27 2016-07-27 A kind of method and system writing data monitoring based on EPOLL Pending CN106201830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610599328.9A CN106201830A (en) 2016-07-27 2016-07-27 A kind of method and system writing data monitoring based on EPOLL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610599328.9A CN106201830A (en) 2016-07-27 2016-07-27 A kind of method and system writing data monitoring based on EPOLL

Publications (1)

Publication Number Publication Date
CN106201830A true CN106201830A (en) 2016-12-07

Family

ID=57496479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610599328.9A Pending CN106201830A (en) 2016-07-27 2016-07-27 A kind of method and system writing data monitoring based on EPOLL

Country Status (1)

Country Link
CN (1) CN106201830A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107479955A (en) * 2017-08-04 2017-12-15 南京华飞数据技术有限公司 A kind of efficient response method based on Epoll async servers
CN108459915A (en) * 2018-01-31 2018-08-28 中电福富信息科技有限公司 A kind of TCP channel suitable for high concurrent scene manages system and method
CN110908807A (en) * 2019-11-24 2020-03-24 浪潮电子信息产业股份有限公司 IO task processing method, device, equipment and readable storage medium
CN111698275A (en) * 2019-03-15 2020-09-22 华为技术有限公司 Data processing method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0959572A3 (en) * 1998-05-22 2003-11-12 Fujitsu Limited Radio communication system, and apparatus, communication method and program recording medium therefor
US20120131222A1 (en) * 2010-11-22 2012-05-24 Andrew Robert Curtis Elephant flow detection in a computing device
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN103888441A (en) * 2014-01-03 2014-06-25 北京太一星晨信息技术有限公司 Information transmitting method between application and protocol stack and processing device
CN105490985A (en) * 2014-09-15 2016-04-13 腾讯科技(深圳)有限公司 Implementation method and device for TCP long connection based on signal transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0959572A3 (en) * 1998-05-22 2003-11-12 Fujitsu Limited Radio communication system, and apparatus, communication method and program recording medium therefor
US20120131222A1 (en) * 2010-11-22 2012-05-24 Andrew Robert Curtis Elephant flow detection in a computing device
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN103888441A (en) * 2014-01-03 2014-06-25 北京太一星晨信息技术有限公司 Information transmitting method between application and protocol stack and processing device
CN105490985A (en) * 2014-09-15 2016-04-13 腾讯科技(深圳)有限公司 Implementation method and device for TCP long connection based on signal transmission

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107479955A (en) * 2017-08-04 2017-12-15 南京华飞数据技术有限公司 A kind of efficient response method based on Epoll async servers
CN107479955B (en) * 2017-08-04 2020-04-17 南京华飞数据技术有限公司 Efficient response method based on Epoll asynchronous server
CN108459915A (en) * 2018-01-31 2018-08-28 中电福富信息科技有限公司 A kind of TCP channel suitable for high concurrent scene manages system and method
CN111698275A (en) * 2019-03-15 2020-09-22 华为技术有限公司 Data processing method, device and equipment
WO2020187186A1 (en) * 2019-03-15 2020-09-24 华为技术有限公司 Data processing method, device and apparatus
US11647104B2 (en) 2019-03-15 2023-05-09 Huawei Technologies Co., Ltd. Data processing method and apparatus, and device
CN110908807A (en) * 2019-11-24 2020-03-24 浪潮电子信息产业股份有限公司 IO task processing method, device, equipment and readable storage medium
CN110908807B (en) * 2019-11-24 2022-03-22 浪潮电子信息产业股份有限公司 IO task processing method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10740459B2 (en) Kernel- and user-level cooperative security processing
CN106201830A (en) A kind of method and system writing data monitoring based on EPOLL
US8839044B2 (en) Debugging of adapters with stateful offload connections
WO2019075284A3 (en) Predicting performance of content and electronic messages among a system of networked computing devices
CN102346725B (en) Message notification device and method for changing equipment configuration file
EP2207094A3 (en) System and method for integrated hardware platform for flash applications with distributed objects
CN105389214A (en) Monitoring method and system
CN103581322A (en) Method and system for monitoring server and server devices
US10785138B2 (en) Methods and apparatus to perform elastic monitoring of software applications using embedded watchdogs
US11301238B2 (en) Firmware updating method and firmware updating system
US10102088B2 (en) Cluster system, server device, cluster system management method, and computer-readable recording medium
CN108231132B (en) NAND flash memory verification device and verification system
CN120371457A (en) EBPF-based virtualized container environment monitoring device and eBPF-based virtualized container environment monitoring method
CN104753957A (en) Mass communication terminal connection management method of electricity information acquisition system
CN106844172A (en) The log recording method and system of a kind of efficient alignment system failure
US20120066305A1 (en) Transmitting system and method thereof
CN115174440B (en) Connectivity detection method, device, storage medium and equipment
CN112001730A (en) Data security detection method based on block chain and digital currency and cloud computing center
CN111796780A (en) Credible judgment method and system for passive measurement of printer
CN114942797B (en) System configuration method, device, equipment and storage medium based on side car mode
US10529396B2 (en) Preinstall of partial store cache lines
CN105187519A (en) Socket transmission system based on AIO
CN113014511B (en) Data processing method and device, electronic equipment and storage medium
CN103399786A (en) Outbound service implementation method and system based on contexts in operation
JP7803034B2 (en) Threat detection method, computer device, and computer system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161207