CN102025557A - Method and device for judging idle equipment port - Google Patents
Method and device for judging idle equipment port Download PDFInfo
- Publication number
- CN102025557A CN102025557A CN2009101900336A CN200910190033A CN102025557A CN 102025557 A CN102025557 A CN 102025557A CN 2009101900336 A CN2009101900336 A CN 2009101900336A CN 200910190033 A CN200910190033 A CN 200910190033A CN 102025557 A CN102025557 A CN 102025557A
- Authority
- CN
- China
- Prior art keywords
- port
- equipment
- identifying unit
- time
- running status
- 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
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method and a device for judging an idle equipment port. The method comprises the following steps: acquiring the management state of the idle equipment port, if the management state is forbidden, determining the port as the idle port, and otherwise, if the management state is started, carrying out the next step; acquiring the operation state of the port, if the operation state is on line, determining the port as a non-idle port, and otherwise, if the operation state is off line, carrying out the next steps; and determining whether the state of the port is unchanged for a long term, if yes, determining the port is the idle port. The device comprises a first judgment unit of the equipment port, a second judgment unit of the equipment port and a third judgment unit of the equipment port. In the invention, the idle state of the port can be effectively and correctly determined through comprehensively judging whether a port management state and a port operation state are unchanged for a long term.
Description
Technical field
The present invention relates to equipment control, specifically, relate to a kind of decision method and device of device free port.
Background technology
In broadband access equipment, the long-time free time of device port is not only caused the significant wastage of current access device resource, concerning purchasing department, be difficult to the amount of purchase of control appliance exactly in the equipment purchase afterwards simultaneously, cause the deficiency of subsequent procurement equipment or the surplus of equipment easily.
Judgement to the broadband access equipment idle port does not at present also have effective method, a kind of method of feasible judgement idle port is the flow of statistics corresponding port, but this method need expend the flow information that a large amount of time and resource are monitored all of the port in real time.
Another kind method is by the Port Management interface controlled state of port to be judged in network management system, because the port information on the Port Management interface is fairly simple, the mode that this device port controlled state is checked usually can not be judged idle port exactly.
Summary of the invention
In view of this, the invention provides a kind of decision method and device of device free port, can determine the idle condition of port efficiently and accurately.
In order to solve the problems of the technologies described above, the present invention has adopted following technical scheme:
A kind of decision method of device free port comprises following steps:
A, obtain the controlled state of device port, be forbidding, determine that then this port is an idle port as controlled state; Controlled state is carried out next step for enabling else if;
B, obtaining the running status of described port, is online as running status, determines that then this port is busy port; Running status is an off-line else if, carries out next step;
C, determine described port whether state change for a long time, in this way, determine that this port is an idle port.
In a kind of embodiment of said method, among the step C, determine described port whether state change for a long time and carry out as follows:
C1, set condition transformation period threshold value;
C2, obtain the running status transformation period and equipment current running time last time of described port, whether the difference of determining current running time of equipment and port running status last time transformation period is greater than described state variation time threshold, in this way, determine that port status does not change for a long time.
In a kind of embodiment of said method, running status transformation period last time of described port obtains by the ifLastChange field of interface management information table in the Simple Network Management Protocol.
In a kind of embodiment of said method, described equipment obtains by the sysUpTime field in the Simple Network Management Protocol current running time.
In a kind of embodiment of said method, also comprise: each port in the equipment is carried out described steps A, B, C, determine each port idle port whether in the equipment.
Described equipment comprises broadband access equipment.
The invention also discloses a kind of decision maker of device free port, comprise device port first identifying unit, device port second identifying unit, device port the 3rd identifying unit:
Described device port first identifying unit is used to obtain the controlled state of device port, is forbidding as controlled state, determines that then this port is an idle port; Controlled state is transferred to device port second identifying unit and is judged for enabling else if;
Described device port second identifying unit is used to obtain the running status of described port, is online as running status, determines that then this port is busy port; Running status is an off-line else if, transfers to device port the 3rd identifying unit and judges;
Described device port the 3rd identifying unit is used for determining whether state does not change described port for a long time, in this way, determines that this port is an idle port.
In a kind of embodiment of said apparatus, described device port the 3rd identifying unit comprises:
State variation time threshold setting module is used for set condition transformation period threshold value;
Port status does not change determination module for a long time, be used to obtain the running status transformation period and equipment current running time last time of described port, determine the state variation the time threshold whether difference of current running time of equipment and port running status last time transformation period is set greater than state variation time threshold setting module, in this way, determine that port status does not change for a long time.
Whether the present invention changes for a long time by Port Management state, port running status, port running status is comprehensively judged, thereby can determine the idle condition of port efficiently and accurately.
Description of drawings
Fig. 1 is the flow chart of the device free port decision method of the specific embodiment of the invention.
Embodiment
Contrast accompanying drawing and the present invention is elaborated below in conjunction with embodiment.
Inventive concept of the present invention mainly is: factors such as whether port controlled state, running status, running status do not change for a long time comprehensively judged, thus judgment device port idle port whether efficiently and accurately.
With the broadband access equipment be below example the present invention will be described, it will be appreciated, of course, that decision method of the present invention is not limited to broadband access equipment, can be applied to other network equipments equally.
As shown in Figure 1, the idle port decision method flow process of the specific embodiment of the invention comprises:
S101, obtain the controlled state of a certain port of equipment.The Port Management state for example obtains by the Port Management interface in the webmaster.
S102, this Port Management state is judged.If the controlled state of this device port is forbidden, then this port of decidable is an idle port, can set up an idle port tabulation to make things convenient for checking of idle port, and after judging that port is idle port, then flow process is carried out step S109; Otherwise,, then carry out next step if the device port controlled state is enabled.
S103, obtain the running status of port.As hereinafter, the port running status can be recorded in the field of NMP equally, only need read corresponding define field, can get access to the port running status.
S104, this port running status is judged.If presence, then this port of decidable is busy port, and flow process is carried out step S110.Otherwise port is an off-line state, then carries out next step.
S105, the equipment that obtains current running time, equipment current running time can be by SNMP (Simple Network Management Protocol, Simple Network Management Protocol) definition of the field sysUpTime in the agreement is also therefrom obtained, and refers to that the equipment self-starting is to come the current time.
S106, obtaining running status transformation period last time of port, also is the final online time of port, can and therefrom obtain by the ifLastChange Field Definition of interface management information table in the snmp protocol.
The execution sequence that is appreciated that step S105 and S106 can exchange mutually.
S107, port running status last time transformation period and equipment are compared current running time, deduct port running status last time transformation period, the difference of current running time of the equipment that obtains and port running status last time transformation period current running time with equipment.
S108, the state variation time threshold is set in equipment, this threshold value can be determined by a large amount of experiments, whether the difference of current running time of judgment device and port running status last time transformation period is greater than this state variation time threshold, if greater than, judge that then this port is an idle port, carry out next step, otherwise carry out step S110.
S109, idle port is joined in the idle port tabulation.
Whether the port on S110, the judgment device has traveled through, if do not have, then turns back to step S101 and repeats above-mentioned steps, to obtain the idle condition of other port on the equipment.Otherwise if port has traveled through, then flow process finishes.
Can write down the port numbers of idle port in the idle port tabulation, and statistics idle port quantity, for checking.Certainly, the scene of also can adopting reports mode, judges that promptly a port is an idle port, then reports the port numbers of this idle port to webmaster, and then the port traversal finishes, and reports idle port quantity to give webmaster.
The present invention also discloses a kind of decision maker of device free port, comprises device port first identifying unit, device port second identifying unit, device port the 3rd identifying unit:
Device port first identifying unit is used to obtain the controlled state of device port, is forbidding as controlled state, determines that then this port is an idle port; Controlled state is transferred to device port second identifying unit and is judged for enabling else if;
Device port second identifying unit is used to obtain the running status of described port, is online as running status, determines that then this port is busy port; Running status is an off-line else if, transfers to device port the 3rd identifying unit and judges;
Device port the 3rd identifying unit is used for determining whether state does not change described port for a long time, in this way, determines that this port is an idle port.
Wherein, device port the 3rd identifying unit comprises:
State variation time threshold setting module is used for set condition transformation period threshold value;
Port status does not change determination module for a long time, be used to obtain the running status transformation period and equipment current running time last time of described port, determine the state variation the time threshold whether difference of current running time of equipment and port running status last time transformation period is set greater than state variation time threshold setting module, in this way, determine that port status does not change for a long time.
Adopt the present invention, can judge idle port efficiently and accurately and count idle port quantity,, thereby can save unnecessary purchase cost therefore for next step the buying of equipment operator provides accurate foundation.Adopt the present invention, whether comprehensive Port Management state, running status, running status not combined factors judgement such as variations for a long time, under the port off-line state, only need the last state update time of current running time of fetch equipment and device port, with regard to this port of decidable idle port whether, whole decision method is simple and easy to do, take resource few, take a short time, can save system resource and development cost.
Above content be in conjunction with concrete preferred implementation to further describing that the present invention did, but this example of just lifting for ease of understanding should not think that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can make various possible being equal to and change or replacement, these changes or replacement all should belong to protection scope of the present invention.
Claims (12)
1. the decision method of a device free port is characterized in that, comprises following steps:
A, obtain the controlled state of device port, be forbidding, determine that then this port is an idle port as controlled state; Controlled state is carried out next step for enabling else if;
B, obtaining the running status of described port, is online as running status, determines that then this port is busy port; Running status is an off-line else if, carries out next step;
C, determine described port whether state change for a long time, in this way, determine that this port is an idle port.
2. the method for claim 1 is characterized in that, among the step C, determine described port whether state change for a long time and carry out as follows:
C1, set condition transformation period threshold value;
C2, obtain the running status transformation period and equipment current running time last time of described port, whether the difference of determining current running time of equipment and port running status last time transformation period is greater than described state variation time threshold, in this way, determine that port status does not change for a long time.
3. method as claimed in claim 2 is characterized in that, running status transformation period last time of described port obtains by the ifLastChange field of interface management information table in the Simple Network Management Protocol.
4. method as claimed in claim 2 is characterized in that, described equipment obtains by the sysUpTime field in the Simple Network Management Protocol current running time.
5. as the arbitrary described method of claim 1-4, it is characterized in that, also comprise: each port in the equipment is carried out described steps A, B, C, determine each port idle port whether in the equipment.
6. method as claimed in claim 5 is characterized in that described equipment comprises broadband access equipment.
7. the decision maker of a device free port is characterized in that, comprises device port first identifying unit, device port second identifying unit, device port the 3rd identifying unit:
Described device port first identifying unit is used to obtain the controlled state of device port, is forbidding as controlled state, determines that then this port is an idle port; Controlled state is transferred to device port second identifying unit and is judged for enabling else if;
Described device port second identifying unit is used to obtain the running status of described port, is online as running status, determines that then this port is busy port; Running status is an off-line else if, transfers to device port the 3rd identifying unit and judges;
Described device port the 3rd identifying unit is used for determining whether state does not change described port for a long time, in this way, determines that this port is an idle port.
8. device as claimed in claim 7 is characterized in that, described device port the 3rd identifying unit comprises:
State variation time threshold setting module is used for set condition transformation period threshold value;
Port status does not change determination module for a long time, be used to obtain the running status transformation period and equipment current running time last time of described port, determine the state variation the time threshold whether difference of current running time of equipment and port running status last time transformation period is set greater than state variation time threshold setting module, in this way, determine that port status does not change for a long time.
9. device as claimed in claim 8 is characterized in that, running status transformation period last time of described port obtains by the ifLastChange field of interface management information table in the Simple Network Management Protocol.
10. device as claimed in claim 8 is characterized in that, described equipment obtains by the sysUpTime field in the Simple Network Management Protocol current running time.
11. as the arbitrary described device of claim 7-10, it is characterized in that, also comprise: described device port first identifying unit, device port second identifying unit, device port the 3rd identifying unit determine whether idle port to each port in the equipment.
12. device as claimed in claim 11 is characterized in that, described equipment comprises broadband access equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101900336A CN102025557A (en) | 2009-09-10 | 2009-09-10 | Method and device for judging idle equipment port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101900336A CN102025557A (en) | 2009-09-10 | 2009-09-10 | Method and device for judging idle equipment port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102025557A true CN102025557A (en) | 2011-04-20 |
Family
ID=43866449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101900336A Pending CN102025557A (en) | 2009-09-10 | 2009-09-10 | Method and device for judging idle equipment port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102025557A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108833611A (en) * | 2018-08-01 | 2018-11-16 | 中国联合网络通信集团有限公司 | A kind of distribution method of method NAT address conversion |
CN112911353A (en) * | 2019-12-03 | 2021-06-04 | 海信视像科技股份有限公司 | Display device, port scheduling method and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1615383A1 (en) * | 2003-04-14 | 2006-01-11 | Huawei Technologies Co., Ltd. | A digital subscriber loop terminal devices management system |
CN101005414A (en) * | 2007-01-17 | 2007-07-25 | 中兴通讯股份有限公司 | Detection and processing device and method for multiple wire to DSL device |
-
2009
- 2009-09-10 CN CN2009101900336A patent/CN102025557A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1615383A1 (en) * | 2003-04-14 | 2006-01-11 | Huawei Technologies Co., Ltd. | A digital subscriber loop terminal devices management system |
CN101005414A (en) * | 2007-01-17 | 2007-07-25 | 中兴通讯股份有限公司 | Detection and processing device and method for multiple wire to DSL device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108833611A (en) * | 2018-08-01 | 2018-11-16 | 中国联合网络通信集团有限公司 | A kind of distribution method of method NAT address conversion |
CN112911353A (en) * | 2019-12-03 | 2021-06-04 | 海信视像科技股份有限公司 | Display device, port scheduling method and storage medium |
CN112911353B (en) * | 2019-12-03 | 2023-01-20 | 海信视像科技股份有限公司 | Display device, port scheduling method and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102006588B (en) | Method and system for monitoring network behavior of smart mobile phone | |
CN102711139B (en) | A kind of data flow statistic method and terminal | |
CN104038929A (en) | Network access anomaly identification method and network access anomaly identification device | |
CN104009887A (en) | Automatic speed testing method applied to network resource optimization | |
WO2016155996A1 (en) | Production system and method for controlling same | |
CN106301803A (en) | A kind of chip power supply control method, device and communication equipment | |
CN103905260A (en) | Terminal device network traffic monitoring method and device | |
KR100675737B1 (en) | Monitoring system for heat pipe | |
CN117061335A (en) | Cloud platform equipment health management and control method and device, storage medium and electronic equipment | |
CN102025557A (en) | Method and device for judging idle equipment port | |
CN102082689A (en) | Method for generating equipment alarm information by adopting asynchronous poling mode | |
CN107316494A (en) | A kind of abnormal treating method and apparatus in parking lot | |
CN107911410A (en) | Distributed Services process resource consumes statistical method and device | |
CN113364820A (en) | Equipment control method and device of Internet of things service system | |
CN103577291B (en) | System and method for testing power failure of embedded system | |
CN116489046A (en) | Reliability test method, device, equipment, medium and system of shunt equipment | |
CN109307818A (en) | A kind of electronic product test macro | |
CN101166334A (en) | Method for remote RF unit to record information in radio communication system | |
CN102819474A (en) | Test method and device for system operation | |
US9755904B2 (en) | Reconfiguration record measurement test method and network side | |
CN105429907B (en) | Serial ports automatic identification equipment and method | |
CN107979174A (en) | A kind of work flow operation method based on Regulation system | |
CN109765983A (en) | Run procedure management method, device and mobile terminal | |
CN111371908B (en) | Method, device, storage medium and electronic device for sending information | |
CN109361783B (en) | Operation method and device of communication equipment in intelligent substation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110420 |