CN112860399B - Network port state detection method, device, equipment and storage medium of industrial server - Google Patents

Network port state detection method, device, equipment and storage medium of industrial server Download PDF

Info

Publication number
CN112860399B
CN112860399B CN202110151411.0A CN202110151411A CN112860399B CN 112860399 B CN112860399 B CN 112860399B CN 202110151411 A CN202110151411 A CN 202110151411A CN 112860399 B CN112860399 B CN 112860399B
Authority
CN
China
Prior art keywords
network
port state
network port
driving module
industrial server
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
Application number
CN202110151411.0A
Other languages
Chinese (zh)
Other versions
CN112860399A (en
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.)
Kedong Guangzhou Software Technology Co Ltd
Original Assignee
Kedong Guangzhou Software Technology 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 Kedong Guangzhou Software Technology Co Ltd filed Critical Kedong Guangzhou Software Technology Co Ltd
Priority to CN202110151411.0A priority Critical patent/CN112860399B/en
Publication of CN112860399A publication Critical patent/CN112860399A/en
Application granted granted Critical
Publication of CN112860399B publication Critical patent/CN112860399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for detecting the state of a network port of an industrial server, wherein a port state scanning driving module is established in a real-time operating system of the industrial server, and interrupts are configured in network card driving modules of all network cards connected with the industrial server; the port state scanning driving module provides a calling interface for an upper-layer service program; the method comprises the following steps: when the state of the network port changes, the network card triggers the configured interruption; the port state scanning driving module acquires the state information of each network port of the industrial server through the interruption; and the port state scanning driving module provides network port state information for the service program through the calling interface. The invention can realize the high-efficiency and quick acquisition of the state information of each network port of the industrial server, reduce the resource occupation of the CPU and improve the instantaneity of the acquisition of the state of the network port.

Description

Network port state detection method, device, equipment and storage medium of industrial server
Technical Field
The invention relates to the technical field of industrial internet communication, in particular to a method, a device, equipment and a storage medium for detecting the internet access state of an industrial server.
Background
In a redundant network environment, an existing industrial server needs to detect and avoid network anomalies by detecting and controlling link up/down states of network ports (network ports).
As shown in fig. 1, in the current detection method for each portal of an industrial server, a service program at an upper layer acquires the status of each portal of the industrial server through a polling mechanism. The response time of the detection mode is determined by the polling cycle, if the polling cycle is too large, the response time is too long, and if the polling cycle is too small, the response time is accelerated, but at the same time, a large amount of CPU resources are consumed, and the overall performance of the industrial server is influenced. In addition, in order to implement functions such as network redundancy detection, the industrial server needs to acquire status information of all network ports of the industrial server at the same time, and as the number of the network ports is increased, resources of the CPU are consumed, and real-time performance of acquiring the status of the network ports is reduced.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for detecting a status of a portal of an industrial server, which can efficiently and quickly obtain status information of each portal of the industrial server, reduce resource occupation of a CPU, and improve real-time performance of obtaining the status of the portal.
In a first aspect, an embodiment of the present invention provides a method for detecting a network port state of an industrial server, where a port state scanning driver module is created in a real-time operating system of the industrial server, and an interrupt is configured in a network card driver module of all network cards connected to the industrial server; the port state scanning driving module provides a calling interface for an upper-layer service program; the method comprises the following steps:
when the state of the network port changes, the network card triggers the configured interruption;
the port state scanning driving module acquires the state information of each network port of the industrial server through the interruption;
and the port state scanning driving module provides network port state information for the service program through the calling interface.
In the method, the port state scanning driving module is established in the real-time operating system carried by the industrial server, and the interrupt is configured in the network card driving module of the industrial server, so that the port state scanning driving module can acquire the state information of each network port of the industrial server in real time through the interrupt, and the port state scanning driving module can also provide the acquired state information of each network port to an upper-layer service program. The method avoids the problem of resource occupation of the CPU caused by directly reading the state information from each network port of the industrial server by the service program of the upper layer, and improves the instantaneity of acquiring the network port state.
Optionally, the providing, by the port state scanning driver module, the network port state information for the service program through the call interface includes:
the port state scanning driving module acquires a query instruction through the calling interface and provides network port state information corresponding to the query instruction for the service program through the calling interface;
or, the port state scanning driver module reports the state information of each network port to the service program periodically through the calling interface.
Therefore, according to the system requirements, the port state scanning driving module can provide corresponding network port state information for the service program according to the query instruction of the service program, and can also be configured to periodically report the state information of each network port acquired by the port state scanning driving module to the service program.
Optionally, the method further includes:
establishing a network port state table corresponding to each network port of the industrial server in a real-time operating system of the industrial server;
and the port state scanning driving module updates the acquired state information of each network port of the industrial server into the network port state table.
Therefore, according to the number of the network ports and the network port address of the industrial server, a network port state table can be created in the real-time operating system of the industrial server, so that the acquired state information of each network port is updated to the corresponding field in the network port state table in a covering manner in real time, and the latest state information of each network port is always stored in the network port state table.
Optionally, the providing, by the port state scanning driver module, the network port state information for the service program through the call interface includes:
and the port state scanning driving module acquires the network port state information in the network port state table through the calling interface and provides the service program through the calling interface.
Therefore, the port state scanning driving module can obtain the network port state information stored in the network port state table through the calling interface and report the network port state information to the service program in time through the calling interface, and the calling and reporting processes of the port state scanning driving module do not occupy CPU resources of the operating system.
Optionally, the port state scanning driver module is started and operated in a background after the real-time operating system of the industrial server is started.
In the above, the port state scanning driving module keeps running in the background of the real-time operating system of the industrial server to acquire the state information of each network port in real time.
Optionally, the obtaining, by the port state scanning driving module through the interruption, state information of each network port of the industrial server includes:
and when the network card triggers interruption, the network card driving module provides network port state information in an interruption callback function and sends the network port state information to the port state scanning driving module.
Therefore, when the state of the network port changes, the network card connected with the network port triggers interruption, and the network card driving module can acquire the state information of the network port and send the state information to the port state scanning driving module through the interruption callback function.
In a second aspect, an embodiment of the present invention provides an apparatus for detecting a portal status of an industrial server, including:
the system comprises a creating module, a scanning driving module and a processing module, wherein the creating module is used for creating a port state scanning driving module in a real-time operating system of an industrial server;
the configuration module is used for configuring interruption in the network card driving modules of all the network cards connected with the industrial server; configuring the port state scanning driving module to provide a calling interface for an upper-layer service program;
and the port state scanning driving module is used for triggering the configured interruption through a network card when the state of the network port changes, acquiring the state information of each network port of the industrial server, and providing the network port state information for the service program through the calling interface.
Alternatively to this, the first and second parts may,
the creating module is further used for creating a network port state table corresponding to each network port of the industrial server in a real-time operating system of the industrial server;
the port state scanning driving module is further configured to update the acquired state information of each internet access of the industrial server into the internet access state table.
In a third aspect, an embodiment of the present invention provides a computing device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a portal status detection method of the industrial server.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a computer, implements a portal status detection method for an industrial server.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter.
Drawings
Fig. 1 is a schematic diagram of a prior art method for detecting a portal status of an industrial server;
fig. 2 is a schematic diagram of a method for detecting a portal status of an industrial server according to an embodiment of the present invention;
fig. 3 is an architecture diagram of a portal status detection apparatus of an industrial server according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The terms first, second, third and the like in the description and in the claims, or modules a, B, C and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, it being understood that specific orders or sequences may be interchanged, if appropriate, to enable embodiments of the invention described herein to be practiced otherwise than as specifically illustrated or described herein.
In the following description, reference to reference numerals indicating steps, such as S110, S120 … …, etc., does not necessarily indicate that the steps are performed in this order, and the order of the preceding and following steps may be interchanged or performed simultaneously, where permissible.
The term "comprising" as used in the specification and claims should not be construed as being limited to the contents listed thereafter; it does not exclude other elements or steps. It should therefore be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, and groups thereof. Thus, the expression "an apparatus comprising the devices a and B" should not be limited to an apparatus consisting of only the components a and B.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments, as would be apparent to one of ordinary skill in the art from this disclosure.
The embodiment of the invention provides a method and a device for detecting the state of a network port of an industrial server.
The following describes embodiments of the present invention in detail with reference to the accompanying drawings.
Referring to the schematic diagram shown in fig. 2, an embodiment of the present invention provides a method for detecting a network port state of an industrial server, where a port state scanning driving module is created in a real-time operating system of the industrial server, and an interrupt is configured in a network card driving module of all network cards connected to the industrial server; the port state scanning driving module provides a calling interface for an upper-layer service program; the method comprises the following steps:
when the state of the network port changes, the network card triggers the configured interruption;
the port state scanning driving module acquires the state information of each network port of the industrial server through the interruption;
and the port state scanning driving module provides network port state information for the service program through the calling interface.
In this embodiment, the port state scanning driving module created in the real-time operating system of the industrial server may be a Linkscan (port scanning) driving thread running in the background of the real-time operating system. And configuring an interrupt in a network card driving module of all network cards connected to the industrial server, wherein the network card driving module is coupled with all network cards of the industrial server, when the state of a network port of the industrial server changes, the network card triggers the configured interrupt to generate an interrupt signal, the network card driving module acquires the state information of the network port through an interrupt callback function according to the interrupt signal and sends the state information to a port state scanning driving module, and the port state scanning driving module acquires the state information of each network port of the industrial server according to the interrupt callback of the network card driving module.
Illustratively, in the real-time operating system of the industrial server, a port state table corresponding to each port of the industrial server is further created, the port state scanning driver module may obtain state information of each port through interruption, and update and maintain the obtained state information of each port in a corresponding field of the port state table, and the port state scanning driver module may call, through the call interface, the state information of each port stored in the port state table and provide the state information to an upper-layer service program for use.
The port state scanning driving module can automatically run in a background when a real-time operating system of the industrial server is started so as to acquire the state information of each network port of the industrial server in real time through interruption. The port state scanning driving module interacts with a service program on an upper layer through the calling interface, specifically, a query instruction can be obtained through the calling interface, and network port state information corresponding to the query instruction is provided for the service program through the calling interface; or, periodically reporting the state information of each network port to the service program through the calling interface.
In summary, because the service program on the upper layer needs to frequently obtain the status information of each network port of the industrial server in the running process, the present invention adds a port status scanning driving module running in the background in the real-time operating system carried by the industrial server, obtains the status information of each network port of the industrial server through the port status scanning driving module, stores the status information, and reports the network port status information corresponding to the query instruction according to the query instruction when the service program on the upper layer needs, thereby avoiding the problem of CPU resource occupation caused by frequently reading the status information from each network port by the service program on the upper layer. According to the invention, according to an interrupt mechanism, only when the network port state changes, the network card driving module can generate an interrupt signal and report the interrupt signal to the port state scanning driving module, so that the CPU resource of an operating system can not be occupied all the time, and the instantaneity of the service program for acquiring the network port state is improved.
As shown in fig. 3, an embodiment of the present invention provides an apparatus for detecting a portal status of an industrial server, where the apparatus includes:
a creating module 301, configured to create a port state scanning driver module 303 in a real-time operating system of the industrial server;
a configuration module 302, configured to configure interrupts in the network card driver modules of all network cards connected to the industrial server; configuring the port state scanning driving module 303 to provide a calling interface for an upper service program;
the port state scanning driver module 303 is configured to trigger the configured interrupt through a network card when a network port state changes, acquire state information of each network port of the industrial server, and provide the network port state information for the service program through the call interface.
The device provided by this embodiment can adopt the above-mentioned method for detecting the status of the internet access of the industrial server to obtain the status information of each internet access of the industrial server, and report the status information, specifically,
in this embodiment, the port state scanning driver 303 created by the creating module 301 in the real-time operating system of the industrial server may be a Linkscan (port scanning) driver thread running in the background of the real-time operating system. The configuration module 302 configures interrupts in network card driving modules of all network cards connected to the industrial server, the network card driving module is coupled to all network cards of the industrial server, when the status of a network port of the industrial server changes, the network card triggers the configured interrupts to generate interrupt signals, the network card driving module acquires status information of the network port through an interrupt callback function according to the interrupt signals and sends the status information to the port status scanning driving module 303, and the port status scanning driving module 303 acquires the status information of each network port of the industrial server according to the interrupt callback of the network card driving module.
Illustratively, the creating module 301 further creates a port state table corresponding to each port of the industrial server in a real-time operating system of the industrial server, the port state scanning driving module 303 acquires state information of each port through interruption, and updates and maintains the acquired state information of each port in a corresponding field of the port state table, and the port state scanning driving module 303 calls the state information of each port stored in the port state table through the calling interface and provides the state information to an upper-layer service program for use. The port state scanning driver module 303 may obtain a query instruction issued by a service program through the call interface, and provide the service program with port state information corresponding to the query instruction through the call interface; or, the state information of each network port can be reported to the service program periodically through the calling interface.
FIG. 4 is a schematic diagram illustrating the structure of a computing device 1500 according to an embodiment of the invention. The computing device 1500 includes: processor 1510, memory 1520, communications interface 1530, and bus 1540.
It is to be appreciated that the communication interface 1530 in the computing device 1500 illustrated in FIG. 4 can be utilized to communicate with other devices.
The processor 1510 may be connected to a memory 1520, among other things. The memory 1520 may be used to store the program code and data. Accordingly, the memory 1520 may be a storage unit inside the processor 1510, an external storage unit independent of the processor 1510, or a component including a storage unit inside the processor 1510 and an external storage unit independent of the processor 1510.
Optionally, computing device 1500 may also include a bus 1540. The memory 1520 and the communication interface 1530 may be connected to the processor 1510 via a bus 1540. Bus 1540 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1540 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 4, but it is not intended that there be only one bus or one type of bus.
It is to be appreciated that, in embodiments of the present invention, the processor 1510 may employ a Central Processing Unit (CPU). The processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 1510 uses one or more integrated circuits for executing related programs to implement the technical solutions provided by the embodiments of the present invention.
The memory 1520, which may include both read-only memory and random access memory, provides instructions and data to the processor 1510. A portion of the processor 1510 may also include non-volatile random access memory. For example, the processor 1510 may also store information of the device type.
When the computing device 1500 runs, the processor 1510 executes the computer execution instructions in the memory 1520 to execute the above-mentioned network port state detection method of the industrial server, and first creates a port state scanning driver module in the real-time operating system of the industrial server, and configures interrupts in the network card driver modules of all network cards connected to the industrial server; the port state scanning driving module provides a calling interface for an upper-layer service program;
according to the created port state scanning driving module and configured interruption, the method for detecting the internet access state of the industrial server specifically comprises the following steps:
when the state of the network port changes, the network card triggers the configured interruption;
the port state scanning driving module acquires the state information of each network port of the industrial server through the interruption;
and the port state scanning driving module provides network port state information for the service program through the calling interface.
In this embodiment, the network card driving module is coupled to all network cards of the industrial server, when the status of the network port of the industrial server changes, the network card triggers the configured interrupt to generate an interrupt signal, the network card driving module acquires status information of the network port through an interrupt callback function according to the interrupt signal and sends the status information to the port status scanning driving module, and the port status scanning driving module acquires status information of each network port of the industrial server according to the interrupt callback of the network card driving module. Furthermore, the port state scanning driving module can obtain a query instruction through the calling interface and provide the service program with the network port state information corresponding to the query instruction through the calling interface; or, the port state scanning driver module may report the state information of each network port to the service program periodically through the call interface.
It should be understood that the computing device 1500 according to the embodiment of the present invention may correspond to a corresponding main body for executing the method according to the embodiments of the present invention, and the above and other operations and/or functions of each module in the computing device 1500 are respectively for implementing corresponding flows of each method of the embodiment, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor is configured to perform a diversification problem generation method, the method including at least one of the solutions described in the above embodiments.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.

Claims (4)

1. A method for detecting the state of network interface of industrial server features that a scanning drive module of port state and the state table of network interface corresponding to each network interface of industrial server are created in the real-time operating system of industrial server, and the interrupt is configured in the network interface card drive modules of all network interface cards connected to industrial server; the port state scanning driving module is started and operated at the background after a real-time operating system of the industrial server is started; the port state scanning driving module provides a calling interface for an upper-layer service program; the method comprises the following steps:
when the state of the network port changes, the network card triggers the configured interruption;
when the network card triggers interruption, the network card driving module provides network port state information in an interruption callback function and sends the network port state information to the port state scanning driving module, and the port state scanning driving module updates the acquired state information of each network port of the industrial server into the network port state table;
the port state scanning driving module acquires a query instruction through the calling interface, acquires the network port state information corresponding to the query instruction in the network port state table through the calling interface, and provides the network port state information for the service program;
or, the port state scanning driver module periodically obtains the network port state information in the network port state table through the calling interface, and reports the network port state information to the service program.
2. An apparatus for detecting a portal status of an industrial server, comprising:
the system comprises a creating module, a scanning module and a scanning module, wherein the creating module is used for creating a port state scanning driving module and a network port state table corresponding to each network port of an industrial server in a real-time operating system of the industrial server;
the configuration module is used for configuring interruption in the network card driving modules of all the network cards connected with the industrial server; configuring the port state scanning driving module to provide a calling interface for an upper-layer service program;
the port state scanning driving module is started and operated at the background after a real-time operating system of the industrial server is started;
when the state of the network port changes, the network card triggers the configured interruption;
when the network card triggers interruption, the network card driving module provides network port state information in an interruption callback function and sends the network port state information to the port state scanning driving module, and the port state scanning driving module updates the acquired state information of each network port of the industrial server into the network port state table;
the port state scanning driving module acquires a query instruction through the calling interface, acquires the network port state information corresponding to the query instruction in the network port state table through the calling interface, and provides the network port state information for the service program;
or, the port state scanning driver module periodically obtains the network port state information in the network port state table through the calling interface, and reports the network port state information to the service program.
3. A computing device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of claim 1.
4. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program realizes the method of claim 1 when executed by a computer.
CN202110151411.0A 2021-02-03 2021-02-03 Network port state detection method, device, equipment and storage medium of industrial server Active CN112860399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110151411.0A CN112860399B (en) 2021-02-03 2021-02-03 Network port state detection method, device, equipment and storage medium of industrial server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110151411.0A CN112860399B (en) 2021-02-03 2021-02-03 Network port state detection method, device, equipment and storage medium of industrial server

Publications (2)

Publication Number Publication Date
CN112860399A CN112860399A (en) 2021-05-28
CN112860399B true CN112860399B (en) 2022-03-25

Family

ID=75987695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110151411.0A Active CN112860399B (en) 2021-02-03 2021-02-03 Network port state detection method, device, equipment and storage medium of industrial server

Country Status (1)

Country Link
CN (1) CN112860399B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5317707A (en) * 1989-10-20 1994-05-31 Texas Instruments Incorporated Expanded memory interface for supporting expanded, conventional or extended memory for communication between an application processor and an external processor
CN101247275A (en) * 2008-03-18 2008-08-20 杭州华三通信技术有限公司 Interrupt reporting method and network appliance
CN106294057A (en) * 2015-05-19 2017-01-04 深圳市中兴微电子技术有限公司 Detection method, device and the terminal that a kind of network interface inserts
CN108512783A (en) * 2018-03-22 2018-09-07 新华三技术有限公司 A kind of status information acquiring method and equipment
CN110727555A (en) * 2019-09-20 2020-01-24 平安普惠企业管理有限公司 Service interface management method, device, medium and computer equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506336A (en) * 2015-01-22 2015-04-08 盛科网络(苏州)有限公司 Method and device for saving Down port bandwidth in multicast/broadcast of interchanger chip
CN107995065A (en) * 2017-12-18 2018-05-04 迈普通信技术股份有限公司 Port status notifying method, device and ethernet device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5317707A (en) * 1989-10-20 1994-05-31 Texas Instruments Incorporated Expanded memory interface for supporting expanded, conventional or extended memory for communication between an application processor and an external processor
CN101247275A (en) * 2008-03-18 2008-08-20 杭州华三通信技术有限公司 Interrupt reporting method and network appliance
CN106294057A (en) * 2015-05-19 2017-01-04 深圳市中兴微电子技术有限公司 Detection method, device and the terminal that a kind of network interface inserts
CN108512783A (en) * 2018-03-22 2018-09-07 新华三技术有限公司 A kind of status information acquiring method and equipment
CN110727555A (en) * 2019-09-20 2020-01-24 平安普惠企业管理有限公司 Service interface management method, device, medium and computer equipment

Also Published As

Publication number Publication date
CN112860399A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN108628684B (en) DPDK-based message processing method and computer equipment
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
CN108958729B (en) Data processing method, device and storage medium
CN108959199B (en) Log highlighting method and device, storage medium and android terminal
US20120084072A1 (en) Method and device for running linux application in android system
CN108762956B (en) Method for acquiring Native local data, server, mobile terminal and storage medium
CN110806931B (en) Method and device for realizing call link tracking of distributed service and electronic equipment
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN111190673B (en) Page display method and device based on operation monitoring and electronic equipment
CN108141471B (en) Method, device and equipment for compressing data
CN111309574B (en) Information processing method, device and equipment
CN115033352A (en) Task scheduling method, device and equipment for multi-core processor and storage medium
CN107483412B (en) HTML5web worker migration method and system
CN115794313A (en) Virtual machine debugging method, system, electronic equipment and storage medium
CN112860399B (en) Network port state detection method, device, equipment and storage medium of industrial server
CN113821257A (en) Processor kernel call stack information query method and device
CN112148625A (en) Service logic debugging method, device, equipment and computer readable storage medium
US20170235943A1 (en) Application Access Control Method and Apparatus
CN111949862B (en) Method and device for managing business task flow and electronic equipment
CN112073505B (en) Method for unloading on cloud server, control device and storage medium
CN116136801A (en) Cloud platform data processing method and device, electronic equipment and storage medium
CN112764729A (en) Application software development method and device, computer equipment and readable storage medium
CN110647405A (en) System message processing method, electronic device, and computer-readable storage medium
CN112673354A (en) System state detection method, system state device and terminal equipment
CN112416695B (en) Global variable monitoring method, device, equipment and storage medium

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