CN107682190B - Network card port busyness calculation method, device, equipment and storage medium - Google Patents
Network card port busyness calculation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN107682190B CN107682190B CN201710911572.9A CN201710911572A CN107682190B CN 107682190 B CN107682190 B CN 107682190B CN 201710911572 A CN201710911572 A CN 201710911572A CN 107682190 B CN107682190 B CN 107682190B
- Authority
- CN
- China
- Prior art keywords
- network card
- card port
- busy
- port
- busy degree
- 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.)
- Active
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 21
- 238000005070 sampling Methods 0.000 claims abstract description 27
- 238000000034 method Methods 0.000 claims abstract description 25
- 238000004590 computer program Methods 0.000 claims description 11
- 230000003247 decreasing effect Effects 0.000 claims description 6
- 238000012423 maintenance Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000000835 fiber Substances 0.000 description 2
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3041—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/321—Display for diagnostics, e.g. diagnostic result display, self-test user interface
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/142—Network analysis or design using statistical or mathematical methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Mathematical Physics (AREA)
- Human Computer Interaction (AREA)
- Algebra (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Probability & Statistics with Applications (AREA)
- Pure & Applied Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The application discloses a method, a device, equipment and a storage medium for calculating the busyness of a network card port, wherein the method comprises the steps of adding one to the IO number of the network card port when IO reaches the network card port, and subtracting one from the IO number of the network card port when the IO in the network card port is finished; sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0; and multiplying the times that the IO number is greater than 0 by the preset interval and dividing the times by the preset time to calculate the busy degree ratio of the network card port. The network card port busy degree calculation method, the network card port busy degree calculation device, the network card port busy degree calculation equipment and the storage medium can show the busy degree information of each network card port of a client, provide a basis for code maintenance of the client and improve the working efficiency.
Description
Technical Field
The invention belongs to the technical field of storage systems, and particularly relates to a method, a device, equipment and a storage medium for calculating the busyness of a network card port.
Background
Today, the block storage technology is continuously developed, more and more network card ports are arranged in a storage system, and if the busyness of the network card ports in a certain time period can be counted and displayed, a customer can very conveniently see the use condition of the network card ports.
However, the current devices do not have information for counting the busyness of the network card port, so that the client cannot see accurate information, and no relevant basis exists in code maintenance.
Disclosure of Invention
In order to solve the problems, the invention provides a network card port busyness calculation method, a network card port busyness calculation device, network card port busyness calculation equipment and a storage medium, which can display busyness information of each network card port of a client, provide a basis for code maintenance of the client and improve the working efficiency.
The invention provides a method for calculating the busyness of a network card port, which comprises the following steps:
when IO reaches a network card port, adding one to the IO number of the network card port, and when the IO in the network card port is finished, reducing one to the IO number in the network card port;
sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0;
and multiplying the times that the IO number is greater than 0 by the preset interval and dividing the times by the preset time to calculate the busy degree ratio of the network card port.
Preferably, in the method for calculating the busy level of the network card port, the preset time is 5 minutes.
Preferably, in the method for calculating the busy level of the network card port, the preset interval is 10 milliseconds.
Preferably, in the method for calculating the busy level of the network card port, after obtaining the busy level ratio of the network card port, the method further includes:
and displaying the busy degree ratio of the network card port on a GUI interface.
The invention provides a device for calculating the busyness of a network card port, which comprises:
the IO increasing and decreasing unit is used for increasing the IO number of the network card port by one when IO reaches the network card port and decreasing the IO number of the network card port by one when IO in the network card port is finished;
the sampling unit is used for sampling the network card port at intervals of a preset interval in a preset time, and counting the times that the IO number in the network card port is more than 0;
and the calculating unit is used for multiplying the times that the IO number is greater than 0 by the preset interval and then dividing the preset interval by the preset time to calculate the busy degree ratio of the network card port.
Preferably, in the device for calculating the busy level of the network card port, the sampling unit is specifically configured to sample the network card port every preset interval within 5 minutes, and count the number of times that the number of IO in the network card port is greater than 0.
Preferably, in the device for calculating the busy level of the network card port, the sampling unit is specifically configured to sample the network card port every 10 milliseconds within 5 minutes, and count the number of times that the number of IO in the network card port is greater than 0.
Preferably, the network card port busy degree calculation device further includes:
and the display unit is used for displaying the busy degree ratio of the network card port on a GUI interface.
The invention provides a device for calculating the busyness of a network card port, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network card port busy degree calculation method according to any one of the above items when executing the computer program.
The storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the network card port busyness calculation method according to any one of the above.
According to the description, the method, the device, the equipment and the storage medium for calculating the busyness degree of the network card port are provided, because the method comprises the steps of adding one to the IO number of the network card port when the IO reaches the network card port, and reducing the IO number in the network card port by one when the IO in the network card port is finished; sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0; and multiplying the number of times that the IO number is greater than 0 by the preset interval, and dividing the number of times by the preset time to calculate the busy degree ratio of the network card ports, so that the busy degree information of each network card port of a client can be displayed, a basis is provided for code maintenance of the client, and the working efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of a first method for calculating a busy level of a network card port according to an embodiment of the present application;
fig. 2 is a schematic diagram of a first device for calculating a busy level of a network card port according to an embodiment of the present application;
fig. 3 is a schematic diagram of a device for calculating a busy level of a network card port according to an embodiment of the present application.
Detailed Description
The core idea of the invention is to provide a method, a device, equipment and a storage medium for calculating the busyness of a network card port, which can display the busyness information of each network card port for a client, provide a basis for code maintenance of the client and improve the working efficiency.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a first method for calculating a busy level of a network card port provided in an embodiment of the present application, where fig. 1 is a schematic diagram of the first method for calculating a busy level of a network card port provided in the embodiment of the present application, and the method includes the following steps:
s1: when IO reaches a network card port, adding one to the IO number of the network card port, and when the IO in the network card port is finished, reducing one to the IO number in the network card port;
it should be noted that such a network card port may be, but is not limited to, an fc port (fiber channel port).
S2: sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0;
specifically, the IO data stream is stored in a fixed position by hardware, whether data exists or not is queried in real time by software, the IO number is judged at intervals of time Δ t, if Δ t is assumed to be small, if the IO number in a certain time interval is 0, the network card port is in an idle state at the time Δ t, and when the IO number is greater than 0, the network card port is in a busy state at the time Δ t.
S3: and multiplying the times that the IO number is greater than 0 by the preset interval and dividing the times by the preset time to calculate the busy degree ratio of the network card port.
The busy degree ratio is the ratio of the time of IO existence to the total time, and the larger the ratio is, the more busy the network card port is, which can provide a basis for the user to maintain the code.
As can be seen from the above description, in the first method for calculating the busyness of the network card port provided in the embodiment of the present application, since the number of the IO in the network card port is increased by one when the IO reaches the network card port, and the number of the IO in the network card port is decreased by one when the IO in the network card port is completed; sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0; and multiplying the number of times that the IO number is greater than 0 by the preset interval, and dividing the number of times by the preset time to calculate the busy degree ratio of the network card ports, so that the busy degree information of each network card port of a client can be displayed, a basis is provided for code maintenance of the client, and the working efficiency is improved.
The second method for calculating the busy degree of the network card port provided by the embodiment of the application is based on the first method for calculating the busy degree of the network card port, and further comprises the following technical characteristics:
the preset time is 5 minutes.
That is, in this case, sampling statistics is performed on the network card port for one period every five minutes, and the busy ratio of each port in the five minutes is obtained. Of course, this is only one scheme, and a longer or shorter time can be selected according to actual needs, and is not limited herein.
The third method for calculating the busy degree of the network card port provided by the embodiment of the application is based on the second method for calculating the busy degree of the network card port, and further comprises the following technical characteristics:
the preset interval is 10 milliseconds.
It should be noted that, in this case, sampling is performed once every 10 milliseconds, which can improve sampling accuracy, and further refine the sampling, and is easy to implement, although this is only a preferred solution, and a shorter interval may be selected to improve the refinement degree according to actual needs, or a longer interval may be selected, and is not limited herein.
The fourth method for calculating the busy degree of the network card port provided in the embodiment of the present application is based on any one of the first to third methods for calculating the busy degree of the network card port, and further includes the following technical features:
after the busy degree ratio of the network card port is obtained, the method further includes:
and displaying the busy degree ratio of the network card port on a GUI interface.
It should be noted that after the display, the user can know the busy degree of each network card port in real time, and according to the busy degree information, the user can debug more conveniently, reduce the IO number of the busy port through the code modification, increase the IO number of the idle port, and realize the overall IO balance.
Fig. 2 shows a first device for calculating a busy level of a network card port provided in an embodiment of the present application, where fig. 2 is a schematic diagram of the first device for calculating a busy level of a network card port provided in the embodiment of the present application, and the device includes:
the IO increasing and decreasing unit 201 is configured to increase the number of the IO in the network card port by one when the IO reaches the network card port, and decrease the number of the IO in the network card port by one when the IO in the network card port is completed;
a sampling unit 202, configured to sample the network card port every other preset interval within a preset time, and count the number of times that the IO number in the network card port is greater than 0, where it should be noted that the network card port may be but is not limited to a fc port (fiber channel port), specifically, an IO data stream is stored in a fixed position by hardware, and a software is used to query whether there is data in real time, and determine the IO number every Δ t, assuming that Δ t is small, if the IO number in a certain time interval is 0, the network card port is in an idle state within the Δ t time, and when the IO number is greater than 0, the network card port is in a busy state within the Δ t time;
the calculating unit 203 is configured to multiply the number of times that the number of IO is greater than 0 by the preset interval and then divide by the preset time to calculate a busy degree ratio of the network card port, where the busy degree ratio is a ratio of IO time to total time, and a larger ratio indicates that the network card port is busy, which can provide a basis for a user to maintain a code.
The second network card port busy degree calculation device provided by the embodiment of the application is based on the first network card port busy degree calculation device, and further comprises the following technical characteristics:
the sampling unit is specifically configured to sample the network card port every preset interval within 5 minutes, and count the number of times that the number of IO in the network card port is greater than 0.
That is, in this case, sampling statistics is performed on the network card port for one period every five minutes, and the busy ratio of each port in the five minutes is obtained. Of course, this is only one scheme, and a longer or shorter time can be selected according to actual needs, and is not limited herein.
The third device for calculating the busy degree of the network card port provided by the embodiment of the application is based on the second device for calculating the busy degree of the network card port, and further comprises the following technical characteristics:
the sampling unit is specifically configured to sample the network card port every 10 milliseconds within 5 minutes, and count the number of times that the number of IO in the network card port is greater than 0.
It should be noted that, in this case, sampling is performed once every 10 milliseconds, which can improve sampling accuracy, and further refine the sampling, and is easy to implement, although this is only a preferred solution, and a shorter interval may be selected to improve the refinement degree according to actual needs, or a longer interval may be selected, and is not limited herein.
The fourth network card port busy degree calculation device provided in the embodiment of the present application further includes the following technical features on the basis of any one of the first to third network card port busy degree calculation devices:
further comprising:
and the display unit is used for displaying the busy degree ratio of the network card port on a GUI interface.
It should be noted that after the display, the user can know the busy degree of each network card port in real time, and according to the busy degree information, the user can debug more conveniently, reduce the IO number of the busy port through the code modification, increase the IO number of the idle port, and realize the overall IO balance.
Fig. 3 shows a device for calculating a busy level of a network card port provided in an embodiment of the present application, where fig. 3 is a schematic diagram of the device for calculating a busy level of a network card port provided in the embodiment of the present application, and the device includes:
a memory 301 for storing a computer program;
a processor 302, configured to implement the steps of any of the above network card port busy level calculation methods when executing the computer program.
The storage medium provided by the embodiment of the application stores a computer program, and the computer program is executed by a processor to realize the steps of any one of the above network card port busy degree calculation methods.
It should be noted that, since the above-mentioned device and storage medium can execute any of the above steps of the network card port busy degree calculation method, the busy degree information of each network card port can be displayed to the customer, a basis is provided for the customer's code maintenance, and the work efficiency is improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (4)
1. A method for calculating the busyness of a network card port is characterized by comprising the following steps:
when IO reaches a network card port, adding one to the IO number of the network card port, and when the IO in the network card port is finished, reducing one to the IO number in the network card port;
sampling the network card port at preset intervals within preset time, and counting the times that the IO number in the network card port is greater than 0;
multiplying the number of times that the IO number is greater than 0 by the preset interval and dividing the number of times by the preset time to calculate the busy degree ratio of the network card port;
the preset time is 5 minutes;
the preset interval is 10 milliseconds;
after obtaining the busy degree ratio of the network card port, the method further includes:
and displaying the busy degree ratio of the network card port on a GUI interface.
2. A device for calculating the busyness of a network card port, comprising:
the IO increasing and decreasing unit is used for increasing the IO number of the network card port by one when IO reaches the network card port and decreasing the IO number of the network card port by one when IO in the network card port is finished;
the sampling unit is used for sampling the network card port at intervals of a preset interval in a preset time, and counting the times that the IO number in the network card port is more than 0;
the calculation unit is used for multiplying the times that the IO number is greater than 0 by the preset interval and then dividing the preset interval by the preset time to calculate the busy degree ratio of the network card port;
the sampling unit is specifically used for sampling the network card port every other preset interval within 5 minutes, and counting the times that the IO number in the network card port is greater than 0;
the sampling unit is specifically used for sampling the network card port every 10 milliseconds within 5 minutes, and counting the times that the IO number in the network card port is greater than 0;
further comprising:
and the display unit is used for displaying the busy degree ratio of the network card port on a GUI interface.
3. A network card port busy computing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network card port busy level calculation method according to claim 1 when executing the computer program.
4. A storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the network card port busy level calculation method according to claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710911572.9A CN107682190B (en) | 2017-09-29 | 2017-09-29 | Network card port busyness calculation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710911572.9A CN107682190B (en) | 2017-09-29 | 2017-09-29 | Network card port busyness calculation method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107682190A CN107682190A (en) | 2018-02-09 |
CN107682190B true CN107682190B (en) | 2021-08-10 |
Family
ID=61138649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710911572.9A Active CN107682190B (en) | 2017-09-29 | 2017-09-29 | Network card port busyness calculation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107682190B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207827A (en) * | 2013-04-19 | 2013-07-17 | 北京百度网讯科技有限公司 | Method and device for detecting IO (input output) hotspots based on Linux system |
CN104182278A (en) * | 2013-05-23 | 2014-12-03 | 华为技术有限公司 | Method and device for judging busy degree of computer hardware resource |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6560229B1 (en) * | 1998-07-08 | 2003-05-06 | Broadcom Corporation | Network switching architecture with multiple table synchronization, and forwarding of both IP and IPX packets |
CN1174582C (en) * | 2001-09-17 | 2004-11-03 | 上元科技股份有限公司 | Local network channel-size limit distribution device and method thereof |
CN102110043A (en) * | 2010-12-30 | 2011-06-29 | 上海顶竹通讯技术有限公司 | Method and device for computing CPU occupancy rate |
CN106412039A (en) * | 2016-09-19 | 2017-02-15 | 郑州云海信息技术有限公司 | Distributed storage network integration method and system |
-
2017
- 2017-09-29 CN CN201710911572.9A patent/CN107682190B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207827A (en) * | 2013-04-19 | 2013-07-17 | 北京百度网讯科技有限公司 | Method and device for detecting IO (input output) hotspots based on Linux system |
CN104182278A (en) * | 2013-05-23 | 2014-12-03 | 华为技术有限公司 | Method and device for judging busy degree of computer hardware resource |
Also Published As
Publication number | Publication date |
---|---|
CN107682190A (en) | 2018-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8112366B2 (en) | Expert system and visualization for multi-server capacity management | |
CN104252527B (en) | A kind of method and apparatus of the resident information of definite mobile subscriber | |
CN111064808B (en) | Load balancing method and device based on distributed storage system | |
CN108874535B (en) | Task adjusting method, computer readable storage medium and terminal device | |
CN105979532B (en) | Performance capacity analysis early warning method and device of service processing system | |
US9612876B2 (en) | Method and apparatus for estimating a completion time for mapreduce jobs | |
CN104182278B (en) | A kind of method and apparatus for judging computer hardware resource busy extent | |
Dai et al. | Many-server queues with customer abandonment: A survey of diffusion and fluid approximations | |
CN109408509A (en) | Date storage method, device and computer equipment | |
US10409708B2 (en) | Performance data collection for a distributed computing system | |
CN112367269A (en) | Double-pointer-based sliding window current limiting method, device, equipment and storage medium | |
CN108683605A (en) | A kind of current-limiting method and device of service call | |
EP4075749A1 (en) | Detection method and detection device for heavy flow data stream | |
CN109885384B (en) | Task parallelism optimization method and device, computer equipment and storage medium | |
CN109656789A (en) | IO method for testing performance and system | |
CN106156123B (en) | Active value calculation method and device | |
CN107682190B (en) | Network card port busyness calculation method, device, equipment and storage medium | |
Jagerman et al. | Burstiness descriptors of traffic streams: Indices of dispersion and peakedness | |
JP7098735B2 (en) | Optimization of large-scale data analysis | |
CN110928750B (en) | Data processing method, device and equipment | |
CN112001116A (en) | Cloud resource capacity prediction method and device | |
CN107168643A (en) | A kind of date storage method and device | |
CN109062638B (en) | System component display method, computer readable storage medium and terminal device | |
WO2020224125A1 (en) | Method and device for monitoring io delay of distributed file system, and storage medium | |
CN109840182A (en) | A kind of resource monitoring method, device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |