Unlock instant, AI-driven research and patent intelligence for your innovation.

File descriptor leakage risk detection method and device

A file descriptor and detection method technology, applied in the field of network communication, can solve problems such as insufficient file descriptors, affecting system operation, file descriptor leakage, etc., and achieve the effect of improving accuracy and timeliness

Pending Publication Date: 2021-04-30
HANGZHOU DPTECH TECH
View PDF8 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the corresponding file descriptor is not closed in time after the file call ends, the file descriptor will be leaked, resulting in insufficient file descriptors, making the application unable to open or create new files, affecting the operation of the system and even causing cause system crash
[0003] In related technologies, it is necessary to manually read the number of file descriptors, and use the netstat-antp command to view the information about the file descriptors currently being used. When it is found that the number of used file descriptors has been increasing or the number of used file descriptors When the number of descriptors is much greater than the number of file descriptors required by the business, it is considered that the file descriptors in the system may be leaked
This detection method requires manual observation of the number of file descriptors, and the work efficiency is low, and the leakage of file descriptors is evaluated purely from the dimension of quantity, which is prone to large errors

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File descriptor leakage risk detection method and device
  • File descriptor leakage risk detection method and device
  • File descriptor leakage risk detection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.

[0027] The terminology used in this application is for the purpose of describing particular embodiments only, and is not intended to limit the application. As used in this application and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a file descriptor leakage risk detection method and device, an electronic device and a storage medium. The method can comprise the steps of obtaining a current connection state of any socket and a first interval duration between a last data transmission time point and a current time point of the any socket; determining a target duration threshold corresponding to the current connection state according to a corresponding relationship between a pre-established duration threshold and each connection state of the socket; under the condition that the risk matching condition is met, determining that the file descriptor corresponding to any socket has a leakage risk; wherein the risk matching condition comprises that the first interval duration of any socket is greater than a target duration threshold. By means of the technical scheme, whether the file descriptor has the leakage risk or not can be automatically determined, and the accuracy and timeliness of file descriptor leakage risk detection are improved.

Description

technical field [0001] The present application relates to the technical field of network communication, in particular to a method and device for detecting file descriptor leakage risks. Background technique [0002] In the Linux operating system, everything is abstracted into files. The kernel uses file descriptors to access files. Every time an application opens or creates a file, the kernel will return a non-negative integer as the file description corresponding to the file. character, so that when reading and writing files, the file to be read and written can be specified according to the file descriptor returned by the kernel. However, the number of file descriptors is limited. The number of file descriptors available in the system is related to the size of the system memory and is affected by hardware performance. Therefore, after the file call ends, the corresponding file descriptor needs to be closed, so that the number corresponding to the file descriptor is reclaim...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3684G06F11/3688
Inventor 汪庆权
Owner HANGZHOU DPTECH TECH