CN103152195B - Collecting method and device - Google Patents

Collecting method and device Download PDF

Info

Publication number
CN103152195B
CN103152195B CN201310048908.5A CN201310048908A CN103152195B CN 103152195 B CN103152195 B CN 103152195B CN 201310048908 A CN201310048908 A CN 201310048908A CN 103152195 B CN103152195 B CN 103152195B
Authority
CN
China
Prior art keywords
hardware data
snmp
service
collected
telnet
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
CN201310048908.5A
Other languages
Chinese (zh)
Other versions
CN103152195A (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201310048908.5A priority Critical patent/CN103152195B/en
Publication of CN103152195A publication Critical patent/CN103152195A/en
Application granted granted Critical
Publication of CN103152195B publication Critical patent/CN103152195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of collecting method and device, wherein, collecting method comprises: according to hardware data collection request, determine the access level of hardware data to be collected, wherein, the access level of hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable; If the access level of hardware data to be collected is SNMP access, then pass through the equipment at TELNET service login hardware data place to be collected, and serve the SNMP service on starting device by TELNET; Served by SNMP and gather and return hardware data to be collected; And after SNMP service returns hardware data to be collected, served the SNMP service on closing device by TELNET.By the present invention, served by TELNET Service controll SNMP, save the expense that SNMP service causes.

Description

Collecting method and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of collecting method and device.
Background technology
Along with wireless network is in continuous expansion, normal Working Life is indivisible with us in the normal network operation, and in huge network body, server has become critical healthy node.If OMC(Operations & MaintenanceCenter, operation maintenance center) server when machine or operation exception, often give the result of radio network controller and bringing on a disaster property of BTS management; Further, server operational efficiency brings difficulty and trouble lowly also can to normal application, finally affects network and normally runs.Therefore, need the hardware data of the real-time distinct server of attendant, as hardware foundation data and state information, to get rid of hidden danger in time, deal with problems in advance, the normal operation of Deterministic service device and network.
Because server is numerous and strange land property, often need operation maintenance personnel remote access.At present, operation maintenance personnel are many by SNMP(SimpleNetworkManagementProtocol, Simple Network Management Protocol) agent way or TELNET Telnet access mode image data, carry out operation maintenance management.
In SNMP agent way, SNMP succedaneum presents managerial data with variable.Snmp management system fetches the hardware data of needs through GET, GETNEXT and GETBULK agreement instruction from the equipment having SNMP agency; Or service end SNMP agency, when not being asked, uses TRAP or INFORM instruction to transmit related hardware data.
TELNET Telnet access mode mainly comprises following 4 processes: (1) is local to connect with distance host, and this process is actually sets up a TCP connection, and user must know IP address or the domain name of distance host; (2) by any order of the user name and password that local terminal inputs and input later or character with NVT(NetVirtualTerminal, network virtual terminal) form is sent to distance host, to gather corresponding hardware data etc., this process is actually and sends an IP packet from local host to distance host; (3) hardware data of the NVT form exported by distance host is converted into the local form accepted and sends local terminal back to, comprises input command echo and command execution results; (4) last, connection is cancelled to distance host in local terminal, and this process cancels a TCP to connect.
But, no matter which kind of mode in above-mentioned two kinds of modes all has problems.A kind of problem is, two kinds of modes all separately can only collecting part hardware data, and comprehensive hardware data cannot be obtained, the result returned has limitation, the vital index of acquisition hardware facility information may not collected, as, TELNET Telnet access mode cannot collect the cpu temperature etc. of hardware, and SNMP agent way cannot complete wall scroll querying command or the multiple data message of data acquisition command returns.Another kind of problem is, in SNMP agent way, if the SNMP service of service end is not opened, then management end cannot carry out inquiry maintenance; If but SNMP service runs always, and time many, these SNMP services are unnecessary, then can bring unnecessary expense to service end.
Summary of the invention
The invention provides a kind of collecting method and device, to solve the problem one of at least.
In order to solve the problem, the invention discloses a kind of collecting method, comprise: according to hardware data collection request, determine the access level of hardware data to be collected, wherein, the access level of described hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable; Access if the access level of described hardware data to be collected is described SNMP, then by the equipment at hardware data place to be collected described in TELNET service login, and started the SNMP service on described equipment by described TELNET service; Served by described SNMP and gather and return described hardware data to be collected; And after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
Preferably, described collecting method also comprises: access if the access level of described hardware data to be collected is described TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and gathered by described TELNET service and returned described hardware data to be collected; If it is all addressable that the access level of described hardware data to be collected is described SNMP and TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and judge whether to receive the SNMP service request gathering described hardware data to be collected; If do not receive, then served by described TELNET and gather and return described hardware data to be collected; If receive, the SNMP service on described equipment is then started by described TELNET service, served by described SNMP and gather and return described hardware data to be collected, and after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
Preferably, when the access level of described hardware data to be collected is that described SNMP accesses, or, when the access level of described hardware data to be collected is that described SNMP and TELNET is all addressable, and described TELNET service reception is to when gathering the SNMP service request of described hardware data to be collected, described service by described SNMP gathers and the step returning described hardware data to be collected comprises: according to described hardware data to be collected, carry out the management information base mib variable mapping of described SNMP service; According to the result that described mib variable maps, send value order to described SNMP service; Judge whether described SNMP service runs; If run, then gather described hardware data to be collected according to described value order and return described hardware data; If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data.
Preferably, described collecting method also comprises: carry out mib variable mapping to the hardware data that described SNMP service collects, and the hardware data after having carried out described mib variable mapping is converted to the hardware data meeting setting form; And/or, text string extracting process is carried out to the hardware data that described TELNET service collects, and the hardware data after having carried out described text string extracting process is converted to the hardware data meeting described setting form.
Preferably, described according to hardware data collection request, before determining the step of the access level of hardware data to be collected, also comprise: whether accept described SNMP according to hardware data and serve and/or TELNET service access, the access level of described hardware data is set.
Preferably, when the access level of described hardware data to be collected is described SNMP access, at the described equipment by hardware data place to be collected described in TELNET service login, and started the step of the SNMP service on described equipment by described TELNET service before, also comprise: according to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps; According to the result that described mib variable maps, send value order to described SNMP service; According to returning results of described value order, determine that described SNMP serves and close.
In order to solve the problem, the invention also discloses a kind of data acquisition unit, comprise: determination module, for according to hardware data collection request, determine the access level of hardware data to be collected, wherein, the access level of described hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable; First Executive Module, access if the access level for described hardware data to be collected is described SNMP, then by the equipment at hardware data place to be collected described in TELNET service login, and started the SNMP service on described equipment by described TELNET service; Served by described SNMP and gather and return described hardware data to be collected; And after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
Preferably, described data acquisition unit also comprises: the second Executive Module, access if the access level for described hardware data to be collected is described TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and gathered by described TELNET service and returned described hardware data to be collected; 3rd Executive Module, if it is all addressable that the access level for described hardware data to be collected is described SNMP and TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and judge whether to receive the SNMP service request gathering described hardware data to be collected; If do not receive, then served by described TELNET and gather and return described hardware data to be collected; If receive, the SNMP service on described equipment is then started by described TELNET service, served by described SNMP and gather and return described hardware data to be collected, and after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
Preferably, when the access level of described hardware data to be collected is that described SNMP accesses, described first Executive Module is when being gathered by described SNMP service and returned described hardware data to be collected, according to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps; According to the result that described mib variable maps, send value order to described SNMP service; Judge whether described SNMP service runs; If run, then gather described hardware data to be collected according to described value order and return described hardware data; If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data; Or, when the access level of described hardware data to be collected is that described SNMP and TELNET is all addressable, and described TELNET service reception is to when gathering the SNMP service request of described hardware data to be collected, described 3rd Executive Module is when being gathered by described SNMP service and returned described hardware data to be collected, according to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps; According to the result that described mib variable maps, send value order to described SNMP service; Judge whether described SNMP service runs; If run, then gather described hardware data to be collected according to described value order and return described hardware data; If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data.
Preferably, described data acquisition unit also comprises: arrange module, for at described determination module according to hardware data collection request, before determining the access level of hardware data to be collected, whether accept described SNMP according to hardware data to serve and/or TELNET service access, the access level of described hardware data is set.
Compared with prior art, the present invention has the following advantages:
In the present invention, all can have access level by collected hardware data, can be gathered by which kind of mode by access level identification hardware data.Such as, when access level is SNMP access, then show only to be gathered by SNMP service; When access level is TELNET(Telnet) when accessing, then show only to be gathered by TELNET service; When access level be SNMP and TELNET all may have access to time, then show this hardware data no matter use SNMP serve or TELNET serve all can gather.When needs carry out hardware data collection, different service collections can be adopted according to its access level.Particularly, when the access level of hardware data is SNMP access, first hardware data place equipment to be collected is connected by TELNET service login, open the SNMP service on this equipment again, and then carry out hardware data collection by SNMP service, and the SNMP still served on closing device by TELNET after acquisition serves.By the present invention, be no matter that the hardware data of which kind of access level all can be collected.The more important thing is, served by TELNET Service controll SNMP, on the one hand, when needs SNMP serves image data, easily and timely can open SNMP service; On the other hand, when not needing SNMP to serve, then can close SNMP service, to save the expense that SNMP service causes.
Accompanying drawing explanation
Fig. 1 is the flow chart of steps of a kind of collecting method according to the embodiment of the present invention one;
Fig. 2 is the flow chart of steps of a kind of collecting method according to the embodiment of the present invention two;
Fig. 3 is the flow chart of steps of a kind of collecting method according to the embodiment of the present invention three;
Fig. 4 is the structured flowchart of a kind of data acquisition unit according to the embodiment of the present invention four.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Embodiment one
With reference to Fig. 1, show the flow chart of steps of a kind of collecting method according to the embodiment of the present invention one.
The collecting method of the present embodiment comprises the following steps:
Step S102: according to hardware data collection request, determine the access level of hardware data to be collected.
Wherein, the access level of hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable.
When access level is SNMP access, represent that this hardware data only gathers by SNMP service; When access level is TELNET access, represent that this hardware data only gathers by TELNET service; When access level be SNMP and TELNET all may have access to time, represent this hardware data both by SNMP service gather, also by TELNET service gather.
Step S104: if the access level of hardware data to be collected is SNMP access, then carry out step S106-S110.
Step S106: by the equipment at TELNET service login hardware data place to be collected, and the SNMP service on starting device is served by TELNET.
In the present embodiment, the SNMP set on the equipment at hardware data place to be collected is in closed condition unwanted time, to save cost of device and loss.Startup and the closedown of SNMP service accept TELNET Service controll, therefore, when hardware data only gathers by SNMP service, still first connected by TELNET service and log in, served by TELNET again and start SNMP service, and then serve acquisition hardware data by SNMP.
Step S108: served by SNMP and gather and return hardware data to be collected.
SNMP serves acquisition hardware data and can realize with reference to related procedure, e.g., by MIB(management information base) send SET(value again after variable mappings) order etc., do not repeat them here.
Step S110: after SNMP service returns hardware data to be collected, serves the SNMP service on closing device by TELNET.
After having gathered hardware data, SNMP service can temporarily stop, to save cost of device and loss.In addition, network may exist the leak of some recessiveness, run SNMP service likely becomes the target run leak and attack always, causes server security hidden danger.And close SNMP service when not needing SNMP to serve, then can effectively avoid such attack and hidden danger.
In the present embodiment, all can have access level by collected hardware data, can be gathered by which kind of mode by access level identification hardware data.When needs carry out hardware data collection, different service collections can be adopted according to its access level.Particularly, when the access level of hardware data is SNMP access, first hardware data place equipment to be collected is connected by TELNET service login, open the SNMP service on this equipment again, and then carry out hardware data collection by SNMP service, and the SNMP still served on closing device by TELNET after acquisition serves.By the present embodiment, be no matter that the hardware data of which kind of access level all can be collected.The more important thing is, served by TELNET Service controll SNMP, on the one hand, when needs SNMP serves image data, easily and timely can open SNMP service; On the other hand, when not needing SNMP to serve, then can close SNMP service, to save the expense that SNMP service causes; Again on the one hand, can leak be effectively avoided to attack, support equipment safety.
Embodiment two
With reference to Fig. 2, show the flow chart of steps of a kind of collecting method according to the embodiment of the present invention two.
The collecting method of the present embodiment comprises the following steps:
Step S202: whether accept SNMP service and/or TELNET service access according to hardware data, the access level of hardware data is set.
That is, can be gathered by which kind of service according to hardware data and arrange the access level of hardware data, the access level of setting comprises: SNMP accesses, TELNET accesses, SNMP and TELNET is all addressable.
Step S204: according to hardware data collection request, determine the access level of hardware data to be collected, if SNMP access, then performs step S206; If TELNET accesses, then perform step S214; If SNMP and TELNET is all addressable, then perform step S216.
Step S206: according to hardware data to be collected, the management information base mib variable carrying out SNMP service maps; According to the result that mib variable maps, send value order to SNMP service; According to returning results of value order, determine that SNMP service is closed.
SNMP Service Management end is when determining to need to serve acquisition hardware data with SNMP, the dependent instruction that can generate SNMP service sends to the SNMP service end being provided with SNMP agency, to determine whether the SNMP service in service end is in closed condition, if SNMP service is current be in running status, then SNMP can be directly used to serve image data; And generally, SNMP service is in closed condition, need to perform subsequent step, use TELNET service to start SNMP service, then image data.
Step S208: by the equipment at TELNET service login hardware data place to be collected, and the SNMP service on starting device is served by TELNET.
Step S210: gathered by the SNMP service that TELNET service starts and return hardware data to be collected.
Comprise: according to hardware data to be collected, carry out the MIB(management information base of SNMP service) variable mappings; According to the result that mib variable maps, send value order to SNMP service; Judge whether SNMP service runs; If run, then gather hardware data to be collected according to value order and return hardware data; If go back off-duty, then served by TELNET service operation SNMP; Gather hardware data to be collected according to value order and return hardware data.
Step S212: after SNMP service returns hardware data to be collected, is served the SNMP service on closing device, performs step S222 by TELNET.
Step S214: if the access level of hardware data to be collected is TELNET access, then pass through the equipment at TELNET service login hardware data place to be collected, and gathered by TELNET service and returned hardware data to be collected, perform step S222.
Wherein, the detailed process of being served acquisition hardware data by TELNET can be realized with reference to related procedure, does not repeat them here.
Step S216: if to be SNMP and TELNET all addressable for the access level of hardware data to be collected, then pass through the equipment at TELNET service login hardware data place to be collected, and judge whether to receive the SNMP service request gathering hardware data to be collected; If do not receive, then perform step S218; If receive, then perform step S220.
Step S218: do not receive the SNMP service request gathering hardware data to be collected, then served by TELNET and gather and return hardware data to be collected, perform step S222.
Step S220: receive the SNMP service request gathering hardware data to be collected, the SNMP service on starting device is then served by TELNET, served by SNMP and gather and return hardware data to be collected, and after SNMP service returns hardware data to be collected, served the SNMP service on closing device by TELNET, perform step S222.
Wherein, served by SNMP and to gather and the step returning hardware data to be collected comprises: according to hardware data to be collected, carry out the MIB(management information base of SNMP service) variable mappings; According to the result that mib variable maps, send value order to SNMP service; Judge whether SNMP service runs; If run, then gather hardware data to be collected according to value order and return hardware data; If go back off-duty, then served by TELNET service operation SNMP; Gather hardware data to be collected according to value order and return hardware data.
Step S222: mib variable mapping is carried out to the hardware data that SNMP service collects, and the hardware data after having carried out mib variable mapping is converted to the hardware data meeting setting form; And/or, text string extracting process is carried out to the hardware data that TELNET service collects, and the hardware data after having carried out text string extracting process is converted to the hardware data meeting setting form.
For the hardware data collected, need to be processed into unified form to carry out subsequent treatment, this unified form can be preset according to the actual requirements by those skilled in the art.
In a hardware data gathers, likely only use a kind of service image data, also likely use two kinds of service image data.If only use a service, then can only process the data that this kind of service gathers, as, only employ SNMP service, the hardware data that then can collect SNMP service carries out mib variable mapping, and the hardware data after having carried out mib variable mapping is converted to the hardware data meeting setting form; If only employ TELNET service, then the hardware data that can collect TELNET service carries out text string extracting process, and the hardware data after having carried out text string extracting process is converted to the hardware data meeting setting form.And when both employing TELNET service and employing SNMP service, then both needed the hardware data collected SNMP service to carry out mib variable mapping, and the hardware data after having carried out mib variable mapping is converted to the hardware data meeting setting form; The hardware data collected TELNET service is needed again to carry out text string extracting process (as removed the redundant content in character string, extract the string content etc. of needs), and the hardware data after having carried out text string extracting process is converted to the hardware data meeting setting form.
By the present embodiment, according to the access level of hardware data to be collected, different services is used to carry out acquisition and processing.But no matter which kind of rank hardware data belongs to, its collection all needs to be undertaken logging in and controlling by TELNET service.Pass through the present embodiment, by the long-range cross complementary formula data acquisition of SNMP and TELNET, effective access of management end and service end can be got through by staggered form, obtain Equipment Foundations data and state information to greatest extent, by data with the mode of gradin stage by stage property show attendant in detail, thus improve the percent of automatization of OMC remote maintenance and the accuracy of problem diagnosis, effectively save the time, reduce maintenance cost, improve operating efficiency, ensure that network security.
Embodiment three
With reference to Fig. 3, show the flow chart of steps of a kind of collecting method according to the embodiment of the present invention three.
The collecting method of the present embodiment comprises the following steps:
Step S302: the access level determining hardware data.
To collectable hardware data classify and grading, according to whether whether by TELNET service access, and access level can have been divided by SNMP service access, facilitate subsequent query.After classify and grading, the access level of hardware data comprises: only can by SNMP service access, only can by TELNET service access, can be served by SNMP or TELNET accesses.
It should be noted that, for the hardware data (namely only can by the hardware data of TELNET service access) without SNMP rank, SNMP service will not be started.
Step S304: receive hardware data collection request, according to the access level of hardware data to be collected, judges whether hardware data to be collected can be gathered by TELNET service, if can not be gathered by TELNET service, then performs step S306; If can be gathered by TELNET service, then perform step S332.
Step S306: according to hardware data to be collected, the mib variable carrying out SNMP service maps.
Step S308: the equipment to hardware data place to be collected sends the value order of SNMP service.
Step S310: judge that SNMP service is current and whether run, if so, then perform step S312; If not, then step S320 is performed.
Step S312: if SNMP service currently runs, then server device receives the value order of SNMP service, carries out the value command process of SNMP service, and result is carried in snmp message returns.
If SNMP service runs, then process as SET order according to value order, gather corresponding hardware data, then, the hardware data collected is carried in snmp message the request end returning to request hardware data.
Step S314: map mib variable process to the hardware data in the snmp message returned, performs step S316.
Step S316: the hardware data after process is converted to the hardware data meeting setting form, return data is added up.
SNMP service on the hardware data place equipment that step S318: request TELNET service closedown collects.
Step S320: display data acquisition results, terminates this data acquisition flow.
It should be noted that, the execution of step S318 and step S320 can order in no particular order, also can executed in parallel.
Step S322: if SNMP serves current off-duty, then the SNMP asking TELNET service to be opened on hardware data place equipment to be collected serves.
Step S324: judge whether the request receiving SNMP service, if do not receive, then performs step S326; If receive, then perform step S330.
Step S326: the server device to hardware data place sends the value order of TELNET service.
Step S328: server device processes the value order that TELNET serves, and returns the message of carrying result, after performing step S316, directly performs step S320.
That is, according to the value order acquisition hardware data of TELNET service, and the hardware data collected is carried in return messages returns.
Step S330: if receive the request of SNMP service, then TELNET service remote starts SNMP service, jumps to step S308 and starts to perform.
Step S332: if hardware data to be collected can be gathered by TELNET service, then the server device at the hardware data place using TELNET service login to be collected, jumps to step S324 and starts to perform.
In the present embodiment, the data acquisition of serving for TELNET and browsing process can log according to original process, send order, receive return messages, and result are sent into corresponding treatment facility, as data acquisition center.Meanwhile, the TELNET service in the present embodiment also needs to take into account remote activation SNMP service and long-range closedown SNMP where necessary and serves.
And the data acquisition that the SNMP in the present embodiment serves and access process need the whole-process control by TELNET service, after the access level determining hardware data to be collected, the hardware data of SET, GET order to service end that the hardware data of SNMP service access rank can be served by SNMP arranges and gathers.But SNMP service is closed under many circumstances, management for greater safety, SNMP service is preferably closed, now SNMP access suspends, and ask TELNET service remote to start SNMP service, re-start SET, GET command operation after startup, after successful operation, push data into corresponding treatment facility, as data acquisition center, and close SNMP service.If there is not SNMP service, the processing procedure of SNMP service stops, and only carries out TELNET access.
No matter for the hardware data which kind of service collects, need to carry out data statistics and gather the process such as display, preservation.Two kinds of service gatherer processes arrive after management ends, process the hardware data collected, and snmp message needs to map MIB table, and TELNET return messages need string processing, unified be processed into the same form after do and show, preserve.
By the present embodiment, achieve (1) parallel acquisition, raise the efficiency.Served by SNMP service and TELNET that two kinds of modes are parallel to be gathered, multiple job order mode originally repeatedly can be inquired about to gather and improve twice efficiency, for centralized server inquiry, gather, maintenance greatly can reduce costs, save time; (2) data complement, information is comprehensive.The data that TELNET service returns are hash, containing more redundant information; And the data that SNMP service returns are relatively more targeted, as TELNET service may have access to the general condition of CPU, and CPUU temperature etc. deeply can be inquired about by SNMP service, to provide the most comprehensive hardware status information to greatest extent to operation maintenance personnel; (3) cross-over control, ensures comprehensive control of SNMP service and improves SNMP Services-Security.The present embodiment serves acquisition hardware data for SNMP, opens SNMP and serves, ensure the normal access of SNMP service before starting access by TELNET service remote.The phenomenon that single use SNMP service cannot be mutual is avoided in SNMP service when not opening.After access terminates, SNMP service is closed in TELNET service again, saves the unnecessary expense of the service end at hardware data place, has evaded use SNMP and has served initiation risk.
Embodiment four
With reference to Fig. 4, show the structured flowchart of a kind of data acquisition unit according to the embodiment of the present invention four.
The data acquisition unit of the present embodiment comprises: determination module 402, for according to hardware data collection request, determine the access level of hardware data to be collected, wherein, the access level of hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable; First Executive Module 404, if be SNMP access for the access level of hardware data to be collected, then passes through the equipment at TELNET service login hardware data place to be collected, and serves the SNMP service on starting device by TELNET; Served by SNMP and gather and return hardware data to be collected; And after SNMP service returns hardware data to be collected, served the SNMP service on closing device by TELNET.
Preferably, the data acquisition unit of the present embodiment also comprises: the second Executive Module 406, if the access level for hardware data to be collected is TELNET access, then pass through the equipment at TELNET service login hardware data place to be collected, and gathered by TELNET service and returned hardware data to be collected.
Preferably, the data acquisition unit of the present embodiment also comprises: the 3rd Executive Module 408, if it is all addressable that the access level for hardware data to be collected is SNMP and TELNET, then pass through the equipment at TELNET service login hardware data place to be collected, and judge whether to receive the SNMP service request gathering hardware data to be collected; If do not receive, then served by TELNET and gather and return hardware data to be collected; If receive, then served the SNMP service on starting device by TELNET, served by SNMP and gather and return hardware data to be collected, and after SNMP service returns hardware data to be collected, served the SNMP service on closing device by TELNET.
Preferably, when the access level of hardware data to be collected is SNMP access, the first Executive Module 404 is when being gathered by SNMP service and returned hardware data to be collected, and according to hardware data to be collected, the mib variable carrying out SNMP service maps; According to the result that mib variable maps, send value order to SNMP service; Judge whether SNMP service runs; If run, then gather hardware data to be collected according to value order and return hardware data; If go back off-duty, then served by TELNET service operation SNMP; Gather hardware data to be collected according to value order and return hardware data; Or, when the access level of hardware data to be collected is that SNMP and TELNET is all addressable, and TELNET service reception is to when gathering the SNMP service request of hardware data to be collected, 3rd Executive Module 408 is when being gathered by SNMP service and returned hardware data to be collected, according to hardware data to be collected, the mib variable carrying out SNMP service maps; According to the result that mib variable maps, send value order to SNMP service; Judge whether SNMP service runs; If run, then gather hardware data to be collected according to value order and return hardware data; If go back off-duty, then served by TELNET service operation SNMP; Gather hardware data to be collected according to value order and return hardware data.
Preferably, the data acquisition unit of the present embodiment also comprises: processing module 410, carries out mib variable mapping for the hardware data collected SNMP service, and the hardware data after having carried out mib variable mapping is converted to the hardware data meeting setting form; And/or, text string extracting process is carried out to the hardware data that TELNET service collects, and the hardware data after having carried out text string extracting process is converted to the hardware data meeting setting form.
Preferably, the data acquisition unit of the present embodiment also comprises: arrange module 412, for at determination module 402 according to hardware data collection request, before determining the access level of hardware data to be collected, whether accept SNMP service and/or TELNET service access according to hardware data, the access level of hardware data is set.
Preferably, when the access level of hardware data to be collected is SNMP access, first Executive Module 404 is passing through the equipment at TELNET service login hardware data place to be collected, and served the SNMP service on starting device by TELNET before, also according to hardware data to be collected, the mib variable carrying out SNMP service maps; According to the result that mib variable maps, send value order to SNMP service; According to returning results of value order, determine that SNMP service is closed.
The data acquisition unit of the present embodiment is used for realizing corresponding collecting method in aforementioned multiple embodiment of the method, and has the beneficial effect of corresponding embodiment of the method, does not repeat them here.
Patrol and examine in maintenance process at server, hardware data comprises the basic data of hardware and the state information equipment that directly reacted and runs whether normal physical state, is the critical data determining equipment running status.By data acquisition plan of the present invention, solve OMC to patrol and examine in maintenance process or based on the hardware foundation data of server and state information mutual in, individual request access technique cannot Remote Acquisitioning hardware data, or individual request access technique Remote Acquisitioning hardware data limitednumber, obtain inefficiency, and SNMP serves the problems such as the network risks brought.Data acquisition plan of the present invention, by the long-range cross complementary formula data acquisition that SNMP service and TELNET are served, effective access of management end/client and service end can be got through by staggered form, obtain Equipment Foundations data and state information to greatest extent, by data with the mode of gradin stage by stage property detailed show attendant.Thus, improve the percent of automatization of OMC remote maintenance and the accuracy of problem diagnosis, effectively save the time, reduce maintenance cost, improve operating efficiency, ensure that network security.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Above a kind of collecting method provided by the present invention and device are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a collecting method, is characterized in that, comprising:
Whether accept SNMP service and/or TELNET service access according to hardware data, the access level of described hardware data is set;
According to hardware data collection request, determine the access level of hardware data to be collected, wherein, the access level of described hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable;
Access if the access level of described hardware data to be collected is described SNMP, then
By the equipment at hardware data place to be collected described in TELNET service login, and started the SNMP service on described equipment by described TELNET service; Served by described SNMP and gather and return described hardware data to be collected; And after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
2. method according to claim 1, is characterized in that, also comprises:
Access if the access level of described hardware data to be collected is described TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and gathered by described TELNET service and returned described hardware data to be collected;
If it is all addressable that the access level of described hardware data to be collected is described SNMP and TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and judge whether to receive the SNMP service request gathering described hardware data to be collected; If do not receive, then served by described TELNET and gather and return described hardware data to be collected; If receive, the SNMP service on described equipment is then started by described TELNET service, served by described SNMP and gather and return described hardware data to be collected, and after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
3. method according to claim 1 and 2, is characterized in that,
When the access level of described hardware data to be collected is that described SNMP accesses, or, when the access level of described hardware data to be collected is that described SNMP and TELNET is all addressable, and described TELNET service reception is to when gathering the SNMP service request of described hardware data to be collected, described service by described SNMP gathers and the step returning described hardware data to be collected comprises:
According to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps;
According to the result that described mib variable maps, send value order to described SNMP service;
Judge whether described SNMP service runs;
If run, then gather described hardware data to be collected according to described value order and return described hardware data;
If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data.
4. method according to claim 3, is characterized in that, also comprises:
Mib variable mapping is carried out to the hardware data that described SNMP service collects, and the hardware data after having carried out described mib variable mapping is converted to the hardware data meeting setting form;
And/or,
Text string extracting process is carried out to the hardware data that described TELNET service collects, and the hardware data after having carried out described text string extracting process is converted to the hardware data meeting described setting form.
5. method according to claim 1, it is characterized in that, when the access level of described hardware data to be collected is described SNMP access, at the described equipment by hardware data place to be collected described in TELNET service login, and started the step of the SNMP service on described equipment by described TELNET service before, also comprise:
According to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps;
According to the result that described mib variable maps, send value order to described SNMP service;
According to returning results of described value order, determine that described SNMP serves and close.
6. a data acquisition unit, is characterized in that, comprising:
Module is set, for whether accepting SNMP service and/or TELNET service access according to hardware data, the access level of described hardware data is set;
Determination module, for according to hardware data collection request, determines the access level of hardware data to be collected, and wherein, the access level of described hardware data comprises: SNMP access, TELNET access and, SNMP and TELNET is all addressable;
First Executive Module, access if the access level for described hardware data to be collected is described SNMP, then by the equipment at hardware data place to be collected described in TELNET service login, and started the SNMP service on described equipment by described TELNET service; Served by described SNMP and gather and return described hardware data to be collected; And after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
7. device according to claim 6, is characterized in that, also comprises:
Second Executive Module, access if the access level for described hardware data to be collected is described TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and gathered by described TELNET service and returned described hardware data to be collected;
3rd Executive Module, if it is all addressable that the access level for described hardware data to be collected is described SNMP and TELNET, then by the equipment at hardware data place to be collected described in described TELNET service login, and judge whether to receive the SNMP service request gathering described hardware data to be collected; If do not receive, then served by described TELNET and gather and return described hardware data to be collected; If receive, the SNMP service on described equipment is then started by described TELNET service, served by described SNMP and gather and return described hardware data to be collected, and after described SNMP service returns described hardware data to be collected, closed the SNMP service on described equipment by described TELNET service.
8. device according to claim 7, is characterized in that,
When the access level of described hardware data to be collected is that described SNMP accesses, described first Executive Module is when being gathered by described SNMP service and returned described hardware data to be collected, according to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps; According to the result that described mib variable maps, send value order to described SNMP service; Judge whether described SNMP service runs; If run, then gather described hardware data to be collected according to described value order and return described hardware data; If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data;
Or,
When the access level of described hardware data to be collected is that described SNMP and TELNET is all addressable, and described TELNET service reception is to when gathering the SNMP service request of described hardware data to be collected, described 3rd Executive Module is when being gathered by described SNMP service and returned described hardware data to be collected, according to described hardware data to be collected, the management information base mib variable carrying out described SNMP service maps; According to the result that described mib variable maps, send value order to described SNMP service; Judge whether described SNMP service runs; If run, then gather described hardware data to be collected according to described value order and return described hardware data; If go back off-duty, then by SNMP service described in described TELNET service operation; Gather described hardware data to be collected according to described value order and return described hardware data.
CN201310048908.5A 2013-02-06 2013-02-06 Collecting method and device Active CN103152195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310048908.5A CN103152195B (en) 2013-02-06 2013-02-06 Collecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310048908.5A CN103152195B (en) 2013-02-06 2013-02-06 Collecting method and device

Publications (2)

Publication Number Publication Date
CN103152195A CN103152195A (en) 2013-06-12
CN103152195B true CN103152195B (en) 2015-12-02

Family

ID=48550070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310048908.5A Active CN103152195B (en) 2013-02-06 2013-02-06 Collecting method and device

Country Status (1)

Country Link
CN (1) CN103152195B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429755B (en) * 2018-03-21 2021-02-05 深圳天源迪科信息技术股份有限公司 Dynamic management platform and method for network security basic information
CN109981362A (en) * 2019-03-21 2019-07-05 浪潮商用机器有限公司 A kind of server hardware information acquisition device, method, equipment and medium
CN111865639B (en) * 2019-04-30 2023-07-14 深信服科技股份有限公司 Method and device for collecting information of snmp service equipment and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420344A (en) * 2008-12-12 2009-04-29 北京邮电大学 Network performance automatic evaluation method based on Java and database
CN101998687A (en) * 2009-08-18 2011-03-30 中国移动通信集团广东有限公司 Method and device for collecting network parameters of WLAN (Wireless Local Area Network)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7010782B2 (en) * 2002-04-04 2006-03-07 Sapphire Infotech, Inc. Interactive automatic-test GUI for testing devices and equipment using shell-level, CLI, and SNMP commands
CN100395986C (en) * 2004-05-21 2008-06-18 华为技术有限公司 Network management system and method
CN102123043A (en) * 2011-01-05 2011-07-13 中国南方电网有限责任公司超高压输电公司百色局 System capable of realizing secondary safety protection and supervision of substation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420344A (en) * 2008-12-12 2009-04-29 北京邮电大学 Network performance automatic evaluation method based on Java and database
CN101998687A (en) * 2009-08-18 2011-03-30 中国移动通信集团广东有限公司 Method and device for collecting network parameters of WLAN (Wireless Local Area Network)

Also Published As

Publication number Publication date
CN103152195A (en) 2013-06-12

Similar Documents

Publication Publication Date Title
CN105207853B (en) A kind of LAN method for managing and monitoring
CN103546343B (en) The network traffics methods of exhibiting of network traffic analysis system and system
CN102420765B (en) Method and device for determining physical link between switchboard and terminal
CN103516541A (en) Configuration information automatic management method based on intelligent transformer substation
WO2008075355A2 (en) System and method for providing automated meter management layer intelligence to a power line communications system
CN104954153A (en) Method and device for node fault detection
CN102546260A (en) Simulator based on SNMP (Simple Network Management Protocol) network management
CN107959715A (en) Remote terminal information recognition software system and recognition methods based on wireless telecommunications
CN107040429A (en) A kind of method of testing and system of port forwarding performance
CN103152195B (en) Collecting method and device
CN111917741B (en) Micro-grid security defense system and method based on Dos and virtual data injection attack
CN103597466B (en) Real time data based on data-pushing is monitored
CN202094935U (en) Dynamic IP network based remote switch signal control system
CN101360090A (en) Application protocol recognition method
CN107819611A (en) Client method of testing based on the more service end emulation of IEC61850
CN114611576A (en) Accurate identification technology for terminal equipment in power grid
CN104506425A (en) Instant messaging system based on family cloud host and method thereof
CN110677303A (en) Network management system
CN108134841A (en) Tryoff Internet of Things remote monitoring system
KR20030060598A (en) Method and apparatus for managing networks operated by different protocol
CN107896240A (en) Single-chip microcomputer and configuration software telecommunication system based on Internet
CN114745398A (en) Data acquisition and access system
CN105306315B (en) System and method based on SMB agreement mobile phone remote access family gateway equipment
KR101047152B1 (en) Data Driven Traffic Management System and Traffic Management Method
CN104378699B (en) The method of communication is realized in PON equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant