CN102419751A - Configure script rapid collection method and network communication equipment - Google Patents

Configure script rapid collection method and network communication equipment Download PDF

Info

Publication number
CN102419751A
CN102419751A CN201010294785XA CN201010294785A CN102419751A CN 102419751 A CN102419751 A CN 102419751A CN 201010294785X A CN201010294785X A CN 201010294785XA CN 201010294785 A CN201010294785 A CN 201010294785A CN 102419751 A CN102419751 A CN 102419751A
Authority
CN
China
Prior art keywords
script
block
block node
node
script block
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
Application number
CN201010294785XA
Other languages
Chinese (zh)
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201010294785XA priority Critical patent/CN102419751A/en
Publication of CN102419751A publication Critical patent/CN102419751A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a configure script rapid collection method and network communication equipment. In the invention, the updating of script block nodes and the copying of script blocks corresponding to the script block nodes are carried out at different moments. The script block node corresponding to each module is pre-updated and separately stored; and then only when a configuration command of each module is changed, a configure script content corresponding to the script block node which is changed is separately updated and modified and few system resources are occupied. When the collection of configure scripts is carried out, the updating of the script block node corresponding to each module is completed. In the whole script collecting process, only the configuration contents of all the scripts are simply collected, so that the time of temporarily calling the scripts, updating functions and updating the scripts is saved, the script collecting speed is obviously improved, the normal operation of other modules cannot be influenced when the scripts are collected, and the system efficiency is improved.

Description

Configuration script fast collecting method and network communication equipment
Technical field
The present invention relates to network communication field, relate in particular to the method that script is collected in the network communication equipment.
Background technology
Network communication equipment such as router or switch etc. are being carried out to user's configurations shown file command or are being write to start and all need carry out the configuration script collection process when configuration file or the like is operated.At present, in the time need using configuration information each time, network communication equipment all can be carried out the collection process of configuration script.The collection process of existing configuration script is through collecting temporary file of function creation; Call the script renewal function that needs to upgrade each module that disposes again and upgrade script block; Each script block content that to upgrade is at last write and is formed complete script configuration file in the temporary file of establishment, and it is shown or write at the terminal starts in the configuration file.
The problem that existing script collection method exists:
1) script collection process that all can complete when need using script each time; Like each execution configurations shown file or write when starting configuration file; All need carry out the corresponding script block of each module at script place and upgrade and collection, although a lot of modules configured does not change, even whole configuration does not all change; When collecting, also need complete execution script renewal function to upgrade content for script, the waste resource.
2) when other modules are being moved; Owing to carry out the script collection process and all need call the script block content that the script renewal function of each module upgrades own module at every turn; And the priority of script collection task is higher, influences the normal operation of other modules easily.
3) because the variation of script generally is arriving through ability perception after the script collection; Need carry out the process that script is collected for hot-swappable or synchronous etc.; Collect script and need consume very big resource, cause hot-swappable or synchronizing process has been carried out a lot of unnecessary spending.
Owing to also there is the redundancy backup of script configuration file, so the problems referred to above performance is even more serious in high-end network communication equipment such as high-end router or high-end switch.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of efficient higher configuration script collection method.
The present invention solves the problems of the technologies described above the technical scheme that is adopted to be, the configuration script fast collecting method comprises step:
The script that needs is generated each module of configuration is organized as at least one script block node;
And the script block correspondence in each script block node is saved to independently storage space;
When configuration order changes, trigger the script block of upgrading in the script block node corresponding stored space relevant with said variation;
When carrying out the script collection, travel through each script block node, the script block that each script block node is corresponding is copied in the script configuration file.
The copy of the script block that the present invention is corresponding with the renewal of script block node and script block node is placed on the different moment to carry out.Upgrade the also independent corresponding script block node of each module of preserving in advance, after this, only when each modules configured order changed, just independent renewal was also revised the pairing configuration script content of script block node that changes, and occupying system resources is few.When being configured the script collection; The renewal of the script block that each module is corresponding is accomplished; Whole script collection process just puts together each script block deploy content simply, has saved interim invoke script renewal function time of new script more, has significantly improved the script gathering speed; Also can when script is collected, not influence other module and normally move, improve system effectiveness.For occupying system resources as few as possible.The script that needs is generated each module of configuration can be organized into the script block node more than 2, is not limited to the only corresponding script block node of a module.According to the actual conditions of module, the script of a module is organized into a plurality of script block nodes, make when this modules configured order changes, the deploy content that needs again the script block of renewal still less, the working time that takies this module is shorter.
Further, when organizing the script block node, for each script block node distributes unique priority; When carrying out the script collection, according to each script block node of priority traversal of script block node.
Concrete, can the script block that it is corresponding not save as the configuration of default script piece for deploy content with the different script block nodes that change of the purposes of collecting script.
Further, there is the script block of minority module to have the deploy content situation also inequality of preserving because of the purposes difference script block of collecting script; Therefore, can be for deploy content with the different and different script block node of the purposes of collecting script, can according to the difference of the purposes of script with different script block respectively correspondence be saved to independently storage space; When carrying out the script collection, the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
Simultaneously, a kind of network communication equipment of realizing above-mentioned script collection method is provided, comprises script block node organization unit, script block updating block, script collector unit;
Script block node organization unit is used for, and the script that needs is generated each module of configuration is organized into the script block node;
The script block updating block is used for, and the script block correspondence in each script block node is saved to independently storage space; When configuration order changes, trigger the script block of upgrading in the script block node corresponding stored space relevant with said variation;
The script collector unit is used for, and when carrying out script when collecting, travels through each script block node, with each script block node corresponding stored space script block be copied in the script configuration file.
Further, script block node organization unit also is used for, when organizing the script block node, for each script block node distributes unique priority; The script collector unit also is used for, according to each script block node of priority traversal of script block node.
Concrete, said script block updating block also is used for, and can the script block that it is corresponding not save as the configuration of default script piece with the different script block nodes that change of the purposes of collecting script for deploy content;
Said script collector unit also is used for, and the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
Further, the script block updating block also is used for, can be for deploy content with the different and different script block node of the purposes of collecting script, can according to the difference of the purposes of script with different script block respectively correspondence be saved to independently storage space; The script collector unit also is used for, and the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
The invention has the beneficial effects as follows, improve script collection efficiency and system effectiveness, reduce the coupling of script collection and each module, system stability is provided.
Description of drawings
Fig. 1 is the network communication equipment synoptic diagram of embodiment of the present invention method.
Fig. 2 is among the embodiment, the preservation flow process of script block deploy content during configuration variation.
Fig. 3 is among the embodiment, the flow process when collecting script.
Embodiment
Network communication equipment as shown in Figure 1 comprises script block node organization unit, script block updating block, script collector unit.
Script block node organization unit is organized as one or more little script block nodes with the script of each module, and gives unique priority through the priority constant that distributes to each script block node.The configuration script content that the script block node is corresponding is preserved separately, makes it possible to when configuration order changes, revise separately this part content.Therefore need use one or more script block nodes according to the actual conditions of module.
As shown in Figure 2, when change that configuration order takes place, the script block updating block is handled the deploy content that function upgrades corresponding script block node through the script block of each module of notification triggers, is saved in corresponding independently storage space.Independently storage space is different from prior art the deploy content of all script block is kept in the temporary file, makes the deploy content that upgrades certain script block node separately become possibility.The script of collecting can be used to carry out the configurations shown order like show run; And carry out and write startup configuration file (startup file); Purposes such as synchronously; Because the content of most of script block is consistent, have only the deploy content also inequality situation of the script block node existence of minority module because of the difference script block preservation of the purposes of collection script, the deploy content of therefore preserving for the script block node can be with the purposes difference of collection script; And preserve a script block deploy content respectively, do not change the script block that changes for the deploy content of script block node and save as the configuration of default script piece with purposes.Then this script block is not preserved deploy content for the script block node that is not configured.
As shown in Figure 3; When script is collected; According to the purposes of script and all script block nodes of priority traversal of script block node,, then further search the deploy content that whether has its purposes according to purposes if the script block node has deploy content; Exist then deploy content to copy in the script file of collection with the script block node of this purposes; Do not have the script block node of distinguishing purposes, the configuration that then will give tacit consent to copies in the script file of collection, and continues to handle next priority script block node; There is not then skipping this node and continuing to handle next priority script block node of deploy content in the script block node.Concrete steps are following:
A, collect script, begin from the script block node of limit priority according to purposes;
B, judge whether the deploy content of the script block that current script block node is corresponding exists, in this way, get into step c; As not, get into step f;
Whether c, current script block exist the deploy content of this purposes, in this way, get into steps d; As not, get into step e;
D, the deploy content of the script block of this purposes is copied in the script file, gets into step f;
E, the deploy content of default script piece is copied in the script file, get into step f;
Whether all script block node traversals are accomplished, and in this way, script is collected and accomplished; As not, step b is returned in the processing that gets into next priority script block node;

Claims (9)

1. the configuration script fast collecting method is characterized in that, comprises step:
The script that needs is generated each module of configuration is organized as at least one script block node;
And the script block correspondence in each script block node is saved to independently storage space;
When configuration order changes, trigger the script block of upgrading in the relevant script block node corresponding stored space of said variation;
When carrying out the script collection, travel through each script block node, the script block that each script block node is corresponding is copied in the script configuration file.
2. configuration script fast collecting method according to claim 1 is characterized in that, when organizing the script block node, is that each script block node distributes unique priority; When carrying out the script collection, according to each script block node of priority traversal of script block node.
3. configuration script fast collecting method according to claim 1 is characterized in that, for the script block node that is not configured, then it does not preserve corresponding script block.
4. configuration script fast collecting method according to claim 1 is characterized in that, can be for deploy content with the different script block nodes that change of the purposes of collecting script, and the script block that it is corresponding saves as the default script piece and disposes.
5. like each said configuration script fast collecting method of claim 1-4; It is characterized in that; Can be for deploy content with the different and different script block node of the purposes of collecting script, then according to the purposes of script with different script block respectively correspondence be saved to independently storage space; When carrying out the script collection, the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
6. network communication equipment is characterized in that, comprises script block node organization unit, script block updating block, script collector unit;
Script block node organization unit is used for, and the script that needs is generated each module of configuration is organized into the script block node;
The script block updating block is used for, and the script block correspondence in each script block node is saved to independently storage space; When configuration order changes, trigger the script block of upgrading in the script block node corresponding stored space relevant with said variation;
The script collector unit is used for, and when carrying out the script collection, travels through each script block node, and the script block in each script block node corresponding stored space is copied in the script configuration file.
7. like the said network communication equipment of claim 6, it is characterized in that said script block node organization unit also is used for, when organizing the script block node, for each script block node distributes unique priority;
Said script collector unit also is used for, according to each script block node of priority traversal of script block node.
8. like claim 6 or 7 said network communication equipments; It is characterized in that; Said script block updating block also is used for, and can the script block that it is corresponding not save as the configuration of default script piece with the different script block nodes that change of the purposes of collecting script for deploy content;
Said script collector unit also is used for, and the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
9. like claim 6 or 7 said network communication equipments; It is characterized in that; Said script block updating block also is used for; Can be for deploy content with the different and different script block node of the purposes of collecting script, can according to the purposes difference of script with different script block respectively correspondence be saved to independently storage space;
Said script collector unit also is used for, and the script block script block node is corresponding according to the script purposes is copied in the script configuration file.
CN201010294785XA 2010-09-28 2010-09-28 Configure script rapid collection method and network communication equipment Pending CN102419751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010294785XA CN102419751A (en) 2010-09-28 2010-09-28 Configure script rapid collection method and network communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010294785XA CN102419751A (en) 2010-09-28 2010-09-28 Configure script rapid collection method and network communication equipment

Publications (1)

Publication Number Publication Date
CN102419751A true CN102419751A (en) 2012-04-18

Family

ID=45944167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010294785XA Pending CN102419751A (en) 2010-09-28 2010-09-28 Configure script rapid collection method and network communication equipment

Country Status (1)

Country Link
CN (1) CN102419751A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902558A (en) * 2012-09-11 2013-01-30 新浪网技术(中国)有限公司 Project script file updating system and method as well as script file merging method and device
CN103279373A (en) * 2013-05-31 2013-09-04 广州市动景计算机科技有限公司 Method and device for updating browser shell functions

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020010910A1 (en) * 2000-07-15 2002-01-24 International Business Machines Corporation Preferable modes of software package deployment
CN1412995A (en) * 2002-10-16 2003-04-23 华为技术有限公司 Information management method in data communication equipment
CN1588323A (en) * 2004-09-23 2005-03-02 上海交通大学 Parallel program visuable debugging method
CN101212344A (en) * 2006-12-29 2008-07-02 中国移动通信集团公司 Method for obtaining performance parameters of multimedia information service center
CN101258481A (en) * 2005-09-12 2008-09-03 微软公司 Script application programe framework
CN101340688A (en) * 2007-07-04 2009-01-07 中兴通讯股份有限公司 Configuration script configuring method based on strip operation tag in network management system
CN101625640A (en) * 2009-08-05 2010-01-13 中兴通讯股份有限公司 Device and method for combining software upgrade scripts in multiple environments

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020010910A1 (en) * 2000-07-15 2002-01-24 International Business Machines Corporation Preferable modes of software package deployment
CN1412995A (en) * 2002-10-16 2003-04-23 华为技术有限公司 Information management method in data communication equipment
CN1588323A (en) * 2004-09-23 2005-03-02 上海交通大学 Parallel program visuable debugging method
CN101258481A (en) * 2005-09-12 2008-09-03 微软公司 Script application programe framework
CN101212344A (en) * 2006-12-29 2008-07-02 中国移动通信集团公司 Method for obtaining performance parameters of multimedia information service center
CN101340688A (en) * 2007-07-04 2009-01-07 中兴通讯股份有限公司 Configuration script configuring method based on strip operation tag in network management system
CN101625640A (en) * 2009-08-05 2010-01-13 中兴通讯股份有限公司 Device and method for combining software upgrade scripts in multiple environments

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902558A (en) * 2012-09-11 2013-01-30 新浪网技术(中国)有限公司 Project script file updating system and method as well as script file merging method and device
CN102902558B (en) * 2012-09-11 2016-05-11 新浪网技术(中国)有限公司 Project script file upgrades system and method, script file merges method and apparatus
CN103279373A (en) * 2013-05-31 2013-09-04 广州市动景计算机科技有限公司 Method and device for updating browser shell functions
CN103279373B (en) * 2013-05-31 2017-09-22 广州市动景计算机科技有限公司 The update method and device of browser case function

Similar Documents

Publication Publication Date Title
CN111338854B (en) Kubernetes cluster-based method and system for quickly recovering data
CN103064742A (en) Automatic deployment system and method of hadoop cluster
CN103473277B (en) The Snapshot Method and device of file system
CN102520881A (en) Virtual machine snapshot management method and system of cloud computing platform
CN104731569B (en) A kind of data processing method and relevant device
CN105677736A (en) Method and apparatus for increasing and deleting server nodes
CN103902593A (en) Data transfer method and device
CN105653425A (en) Complicated event processing engine based monitoring system
CN105591778A (en) Method and system for updating configuration file in distributed system
CN109710586B (en) A kind of clustered node configuration file synchronous method and device
CN102932448A (en) Distributed network crawler URL (uniform resource locator) duplicate removal system and method
CN105721582A (en) Multi-node file backup system
CN101753362A (en) Configuring method and device of stacking virtual local area network of distributed network device
CN103399781A (en) Cloud server and virtual machine management method thereof
CN103324582A (en) Memory migration method, memory migration device and equipment
CN103546572A (en) Cloud storage device and multi-cloud storage networking system and method
CN103109293A (en) User motion processing system and method
CN105589756A (en) Batch processing cluster system and method
CN102437921B (en) Memory method and network device of configuration information
CN104517067A (en) Method, device and system for data access
CN102419751A (en) Configure script rapid collection method and network communication equipment
CN103856502A (en) Method and NAS cluster system for realizing mirror image document thermal migration of virtual machine
CN109725916B (en) Topology updating system and method for stream processing
CN101650666A (en) Computer management system and method
CN102932476A (en) Network storage synchronization system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120418