[go: up one dir, main page]

CN110990237B - Information collection system, method and storage medium - Google Patents

Information collection system, method and storage medium Download PDF

Info

Publication number
CN110990237B
CN110990237B CN201910996163.2A CN201910996163A CN110990237B CN 110990237 B CN110990237 B CN 110990237B CN 201910996163 A CN201910996163 A CN 201910996163A CN 110990237 B CN110990237 B CN 110990237B
Authority
CN
China
Prior art keywords
module
information
information collection
collection
collected
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
CN201910996163.2A
Other languages
Chinese (zh)
Other versions
CN110990237A (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910996163.2A priority Critical patent/CN110990237B/en
Publication of CN110990237A publication Critical patent/CN110990237A/en
Application granted granted Critical
Publication of CN110990237B publication Critical patent/CN110990237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明涉及一种信息收集系统、方法及存储介质,包括登录模块,设置及结果展示模块;服务器连接模块,该模块根据输入的IP地址启动线程连接被收集信息的服务器;检测模块;适配模块,接受来自检测模块检测到的系统运行环境信息,并根据接收到的信息,从模块库中提取对应的符合信息收集条件的全部模块名称和系统默认收集信息的模块名称,按照模块类的继承关系将模块名以树状结构在用户设置及结果展示界面展示,根据具体需要制定符合实际需求的信息收集设置;信息收集模块,根据适配模块传递的需要收集信息的模块信息,启动线程并发调用模块收集对应的配置信息和日志信息;信息存储模块。

Figure 201910996163

The invention relates to an information collection system, method and storage medium, comprising a login module, a setting and result display module; a server connection module, which starts a thread to connect a server with collected information according to an input IP address; a detection module; and an adaptation module , accept the system operating environment information detected by the detection module, and according to the received information, extract from the module library the corresponding names of all modules that meet the information collection conditions and the module names that the system collects information by default, according to the inheritance relationship of module classes Display the module name in a tree structure on the user setting and result display interface, and formulate information collection settings that meet the actual needs according to specific needs; the information collection module, according to the module information that needs to collect information transmitted by the adaptation module, starts the thread and calls the module concurrently Collect corresponding configuration information and log information; information storage module.

Figure 201910996163

Description

一种信息收集系统、方法及存储介质An information collection system, method and storage medium

技术领域technical field

本发明属于服务器信息收集技术领域,具体涉及一种信息收集系统、方法及存储介质。The invention belongs to the technical field of server information collection, and in particular relates to an information collection system, method and storage medium.

背景技术Background technique

不论是操作系统还是其上运行的重要软件业务系统,管理员都需要一种简单易操作的方法来收集系统的关键配置信息和日志诊断信息。Regardless of the operating system or the important software business systems running on it, administrators need an easy-to-use method to collect critical system configuration information and log diagnostic information.

目前一般靠管理员根据自身经验和业务需求,自行编写shell脚本来收集这些信息。这种方法除对管理员能力和经验有一定要求外,也不能保证收集到的信息是全面完整有针对性的。Currently, administrators generally rely on their own experience and business needs to write shell scripts to collect this information. In addition to certain requirements on the administrator's ability and experience, this method cannot guarantee that the collected information is comprehensive, complete and targeted.

虽然有些操作系统提供了自己独有的信息收集工具,比如红帽、CentOS上使用的sosreport,SUSe系统上使用的supportconfig,VMware系统上使用的vm-support等,但这些工具不统一,需要各自记忆,收集到的信息内容和结构也是不同的,而且无法由用户选择收集哪些关键信息,另外这些工具只是针对操作系统自身,无法收集软件系统、业务系统的信息。此为现有技术中存在的缺陷。Although some operating systems provide their own unique information collection tools, such as sosreport used on Red Hat and CentOS, supportconfig used on SUSE system, and vm-support used on VMware system, these tools are not unified and need to be remembered separately. , the content and structure of the collected information are also different, and users cannot choose which key information to collect. In addition, these tools are only for the operating system itself, and cannot collect information about software systems and business systems. This is a defect existing in the prior art.

有鉴于此,本申请提供一种信息收集系统、方法及存储介质;以解决现有技术中存在的上述缺陷,是非常有必要的。In view of this, the present application provides an information collection system, method and storage medium; it is very necessary to solve the above-mentioned defects in the prior art.

发明内容SUMMARY OF THE INVENTION

针对现有技术中存在的上述不足,本发明提供一种信息收集系统、方法及存储介质,以解决上述技术问题。In view of the above-mentioned deficiencies in the prior art, the present invention provides an information collection system, method and storage medium to solve the above-mentioned technical problems.

为实现上述目的,本发明给出以下技术方案:For achieving the above object, the present invention provides the following technical solutions:

第一方面,本发明提供一种信息收集系统,包括:In a first aspect, the present invention provides an information collection system, including:

登录模块,通过该模块登录服务器;支持用户名、密码的登录方式;Login module, log in to the server through this module; support the login method of user name and password;

设置及结果展示模块,该模块提供设置及结果展示界面,在该界面中,提供IP地址输入端口;通过该端口输入IP地址或者IP地址段;Setting and result display module, this module provides setting and result display interface, in this interface, provides IP address input port; input IP address or IP address segment through this port;

服务器连接模块,该模块根据输入的IP地址启动线程连接被收集信息的服务器;A server connection module, which starts a thread to connect to the server whose information is collected according to the input IP address;

检测模块,获取被收集信息服务器的系统运行环境信息;The detection module obtains the system operating environment information of the collected information server;

适配模块,接受来自检测模块检测到的系统运行环境信息,并根据接收到的信息,从模块库中提取对应的符合信息收集条件的全部模块名称和系统默认收集信息的模块名称,按照模块类的继承关系将模块名以树状结构在用户设置及结果展示界面展示,根据具体需要制定符合实际需求的信息收集设置;The adaptation module accepts the system operating environment information detected by the detection module, and according to the received information, extracts the corresponding module names that meet the information collection conditions and the module names that the system collects information by default from the module library, according to the module class. The inheritance relationship of the module name is displayed in the user setting and result display interface in a tree structure, and the information collection settings that meet the actual needs are formulated according to specific needs;

模块库,存储所有需要收集信息的模块名称及模块继承关系,Module library, which stores all module names and module inheritance relationships that need to collect information,

信息收集模块,根据适配模块传递的需要收集信息的模块信息,启动线程并发调用模块收集对应的配置信息和日志信息;在模块日志信息收集完毕后,调用setstate()函数将该模块的state置为1(1表示该模块所有信息收集完毕)。当对所有模块执行statecheck()得到state值都为1后,代表日志信息收集完毕。信息收集模块调用信息存储模块进行磁盘存储。The information collection module, according to the module information that needs to collect information passed by the adaptation module, starts the thread and calls the module to collect the corresponding configuration information and log information; after the module log information is collected, call the setstate() function to set the state of the module. It is 1 (1 indicates that all information of this module has been collected). When statecheck() is executed on all modules and the state value is 1, it means that the log information is collected. The information collection module calls the information storage module for disk storage.

信息存储模块,根据收集信息的配置存放路径,将模块类之间的继承关系转换成文件夹之间的父子关系,建立以模块名对应的文件存放结构,然后将信息收集模块收集到的信息分别存放到对应的文件夹下,最后进行打包压缩。The information storage module, according to the configuration storage path of the collected information, converts the inheritance relationship between the module classes into the parent-child relationship between the folders, establishes a file storage structure corresponding to the module name, and then separates the information collected by the information collection module. Stored in the corresponding folder, and finally packaged and compressed.

作为优选,该系统还包括:Preferably, the system also includes:

监控模块,对信息收集和存储的整个过程进行监控,并在用户设置与结果展示界面以进度条的方式展示信息收集的进度。信息收集和存储的整个过程中的任何error、warning信息就将存放在单独的日志文件中,供用户查看分析。The monitoring module monitors the entire process of information collection and storage, and displays the progress of information collection in the form of a progress bar on the user setting and result display interface. Any error and warning information in the entire process of information collection and storage will be stored in a separate log file for users to view and analyze.

作为优选,检测模块中,获取到的系统运行环境信息包括但不限于:运行的操作系统类型及版本、系统软件类型及版本、业务系统类型及版本;尽可能详细的获取运行系统的环境参数,为用户的个性化定制提供充足的选择。Preferably, in the detection module, the acquired system operating environment information includes but is not limited to: the operating system type and version, system software type and version, business system type and version; obtain the environmental parameters of the operating system as detailed as possible, Provide sufficient options for users' personalized customization.

作为优选,信息收集模块中,启动多个线程并发调用模块的collectinfo()函数收集模块对应的配置信息和日志信息;获取的配置信息和日志信息准确、全面,降低信息收集出现遗漏的可能性。Preferably, in the information collection module, multiple threads are started concurrently to call the collectinfo() function of the module to collect configuration information and log information corresponding to the module; the obtained configuration information and log information are accurate and comprehensive, reducing the possibility of omissions in information collection.

第二方面,本发明提供一种信息收集方法,包括以下步骤:In a second aspect, the present invention provides a method for collecting information, comprising the following steps:

S1:登录系统的步骤,登录服务器;S1: Steps to log in to the system, log in to the server;

S2:向IP地址输入端口输入IP地址或者IP地址段;S2: Input the IP address or IP address segment to the IP address input port;

S3:根据输入的IP地址启动线程连接至被收集信息的服务器;S3: Start a thread to connect to the server whose information is collected according to the input IP address;

S4:获取被收集信息服务器的系统运行环境信息;S4: Obtain the system operating environment information of the collected information server;

S5:收集信息适配的步骤,具体包括:S5: The steps of collecting information for adaptation, including:

根据步骤S4中获取的系统运行环境信息,提取对应的符合信息收集条件的全部模块名称和系统默认收集信息的模块名称,按照模块类的继承关系将模块名以树状结构进行展示,根据具体需要制定符合实际需求的信息收集设置;According to the system operating environment information obtained in step S4, extract the corresponding module names that meet the information collection conditions and the module names that the system collects information by default, and display the module names in a tree structure according to the inheritance relationship of the module classes. Develop information collection settings that meet actual needs;

S6:信息收集的步骤,具体包括:S6: Steps of information collection, including:

根据步骤S5中制定的信息收集设置,启动线程并发调用模块收集对应的配置信息和日志信息;在模块日志信息收集完毕后,调用setstate()函数将该模块的state置为1(1表示该模块所有信息收集完毕)。当对所有模块执行statecheck()得到state值都为1后,代表日志信息收集完毕。信息收集模块调用信息存储模块进行磁盘存储。According to the information collection settings made in step S5, start the thread and concurrently call the module to collect the corresponding configuration information and log information; after the module log information is collected, call the setstate() function to set the state of the module to 1 (1 means the module All information is collected). When statecheck() is executed on all modules and the state value is 1, it means that the log information is collected. The information collection module calls the information storage module for disk storage.

S7:信息存储的步骤,根据收集信息的配置存放路径,将模块类之间的继承关系转换成文件夹之间的父子关系,建立以模块名对应的文件存放结构,然后将信息收集模块收集到的信息分别存放到对应的文件夹下,最后进行打包压缩。S7: The step of information storage, according to the configuration storage path of the collected information, convert the inheritance relationship between module classes into the parent-child relationship between folders, establish a file storage structure corresponding to the module name, and then collect the information collection module into The information is stored in the corresponding folder, and finally packaged and compressed.

作为优选,该方法还包括监控的步骤,对信息收集和存储的整个过程进行监控,并在以进度条的方式展示信息收集的进度。Preferably, the method further includes the step of monitoring, monitoring the entire process of information collection and storage, and displaying the progress of the information collection in the form of a progress bar.

作为优选,所述步骤S4中,获取到的系统运行环境信息包括但不限于:运行的操作系统类型及版本、系统软件类型及版本、业务系统类型及版本;尽可能详细的获取运行系统的环境参数,为用户的个性化定制提供充足的选择。Preferably, in the step S4, the obtained system operating environment information includes but is not limited to: operating system type and version, system software type and version, business system type and version; obtain the operating system environment as detailed as possible. parameters to provide sufficient options for users' personalized customization.

作为优选,所述步骤S6中,启动多个线程并发调用模块的collectinfo()函数收集模块对应的配置信息和日志信息;获取的配置信息和日志信息准确、全面,降低信息收集出现遗漏的可能性。Preferably, in the step S6, start multiple threads concurrently calling the collectinfo() function of the module to collect configuration information and log information corresponding to the module; the obtained configuration information and log information are accurate and comprehensive, reducing the possibility of omissions in information collection .

第三方面,提供一种计算机存储介质,所述计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第二方面所述的方法。In a third aspect, a computer storage medium is provided, and instructions are stored in the computer storage medium, which, when executed on a computer, cause the computer to execute the method described in the second aspect.

第四方面,提供一种终端,包括:In a fourth aspect, a terminal is provided, including:

处理器、存储器,其中,processor, memory, which,

该存储器用于存储计算机程序,The memory is used to store computer programs,

该处理器用于从存储器中调用并运行该计算机程序,使得终端执行上述第二方面所述的方法。The processor is used to call and run the computer program from the memory, so that the terminal executes the method described in the second aspect.

第五方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二方面所述的方法。In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the second aspect above.

本发明的有益效果在于,适用于所有操作系统上软硬件配置信息和日志信息的收集,管理员无需自行编写Shell脚本,也无需记忆不同的命令,通过这个系统只需输入系统IP地址,就可自动得到多台服务器任何类型系统相关的配置信息,简化了管理员的工作,提高了工作效率和信息的准确度、完整度。The beneficial effect of the present invention is that it is suitable for the collection of software and hardware configuration information and log information on all operating systems, and administrators do not need to write Shell scripts by themselves, nor do they need to memorize different commands. Automatically obtain the configuration information related to any type of system of multiple servers, simplifying the work of administrators, improving work efficiency and the accuracy and completeness of information.

系统除了给出对应的操作系统、系统软件、业务软件默认收集的信息模块外,同时支持用户自定义设置收集哪些信息,这种方式使得信息收集在简单的同时更加符合客户的实际需求。The system not only provides the corresponding operating system, system software, and business software to collect information modules by default, but also supports users to customize which information to collect. This method makes the information collection simpler and more in line with the actual needs of customers.

此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。In addition, the present invention has reliable design principle and simple structure, and has a very wide application prospect.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, other drawings can also be obtained based on these drawings without creative labor.

图1是本发明提供的一种信息收集系统的原理框图。FIG. 1 is a schematic block diagram of an information collection system provided by the present invention.

图2是本发明提供的一种信息收集方法的流程图。FIG. 2 is a flowchart of an information collection method provided by the present invention.

其中,1-登录模块,2-服务器连接模块,3-检测模块,4-服务器,5-适配模块,6-模块库,7-信息收集模块,8-信息存储模块,9-监控模块,10-设置及结果展示模块。Among them, 1-login module, 2-server connection module, 3-detection module, 4-server, 5-adaptation module, 6-module library, 7-information collection module, 8-information storage module, 9-monitoring module, 10- Setting and result display module.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例1:Example 1:

如图1所示,本实施例提供的一种信息收集系统,包括:As shown in Figure 1, an information collection system provided by this embodiment includes:

登录模块1,通过该模块登录服务器;支持用户名、密码的登录方式;Login module 1, log in to the server through this module; support the login method of user name and password;

设置及结果展示模块10,该模块提供设置及结果展示界面,在该界面中,提供IP地址输入端口;通过该端口输入IP地址或者IP地址段;Setting and result display module 10, this module provides setting and result display interface, in this interface, provides IP address input port; input IP address or IP address segment through this port;

服务器连接模块2,该模块根据输入的IP地址启动线程连接被收集信息的服务器;Server connection module 2, this module starts a thread to connect the server of the collected information according to the input IP address;

检测模块3,获取被收集信息服务器4的系统运行环境信息;获取到的系统运行环境信息包括但不限于:运行的操作系统类型及版本、系统软件类型及版本、业务系统类型及版本;尽可能详细的获取运行系统的环境参数,为用户的个性化定制提供充足的选择。The detection module 3 obtains the system operating environment information of the collected information server 4; the obtained system operating environment information includes but is not limited to: operating system type and version, system software type and version, business system type and version; Detailed acquisition of the environmental parameters of the operating system provides sufficient options for the user's personalized customization.

适配模块5,接受来自检测模块检测到的系统运行环境信息,并根据接收到的信息,从模块库中提取对应的符合信息收集条件的全部模块名称和系统默认收集信息的模块名称,按照模块类的继承关系将模块名以树状结构在用户设置及结果展示界面展示,根据具体需要制定符合实际需求的信息收集设置;The adaptation module 5 accepts the system operating environment information detected by the detection module, and according to the received information, extracts from the module library the names of all modules that meet the information collection conditions and the module names that the system collects information by default, according to the module name. The inheritance relationship of the class displays the module name in a tree structure on the user setting and result display interface, and formulates information collection settings that meet the actual needs according to specific needs;

模块库6,存储所有需要收集信息的模块名称及模块继承关系,Module library 6, which stores all module names and module inheritance relationships that need to collect information,

信息收集模块7,根据适配模块传递的需要收集信息的模块信息,启动线程并发调用模块收集对应的配置信息和日志信息;在模块日志信息收集完毕后,调用setstate()函数将该模块的state置为1(1表示该模块所有信息收集完毕)。当对所有模块执行statecheck()得到state值都为1后,代表日志信息收集完毕。信息收集模块调用信息存储模块进行磁盘存储。启动多个线程并发调用模块的collectinfo()函数收集模块对应的配置信息和日志信息;获取的配置信息和日志信息准确、全面,降低信息收集出现遗漏的可能性。The information collection module 7, according to the module information that needs to collect information passed by the adaptation module, starts the thread and concurrently calls the module to collect the corresponding configuration information and log information; after the module log information is collected, the setstate() function is called to set the state of the module Set to 1 (1 means that all information of this module is collected). When statecheck() is executed on all modules and the state value is 1, it means that the log information is collected. The information collection module calls the information storage module for disk storage. Start multiple threads and call the collectinfo() function of the module concurrently to collect the configuration information and log information corresponding to the module; the obtained configuration information and log information are accurate and comprehensive, reducing the possibility of omissions in information collection.

信息存储模块8,根据收集信息的配置存放路径,将模块类之间的继承关系转换成文件夹之间的父子关系,建立以模块名对应的文件存放结构,然后将信息收集模块收集到的信息分别存放到对应的文件夹下,最后进行打包压缩。The information storage module 8, according to the configuration storage path of the collected information, converts the inheritance relationship between the module classes into the parent-child relationship between the folders, establishes a file storage structure corresponding to the module name, and then collects the information collected by the information collection module. Store them in corresponding folders, and then pack and compress them.

监控模块9,对信息收集和存储的整个过程进行监控,并在用户设置与结果展示界面以进度条的方式展示信息收集的进度。信息收集和存储的整个过程中的任何error、warning信息就将存放在单独的日志文件中,供用户查看分析。The monitoring module 9 monitors the entire process of information collection and storage, and displays the progress of information collection in the form of a progress bar on the user setting and result display interface. Any error and warning information in the entire process of information collection and storage will be stored in a separate log file for users to view and analyze.

实施例2:Example 2:

如图2所示,本实施例提供的一种信息收集方法,包括以下步骤:As shown in Figure 2, an information collection method provided by this embodiment includes the following steps:

S1:登录系统的步骤,登录服务器;S1: Steps to log in to the system, log in to the server;

S2:向IP地址输入端口输入IP地址或者IP地址段;S2: Input the IP address or IP address segment to the IP address input port;

S3:根据输入的IP地址启动线程连接至被收集信息的服务器;S3: Start a thread to connect to the server whose information is collected according to the input IP address;

S4:获取被收集信息服务器的系统运行环境信息;S4: Obtain the system operating environment information of the collected information server;

S5:收集信息适配的步骤,具体包括:S5: The steps of collecting information for adaptation, including:

根据步骤S4中获取的系统运行环境信息,提取对应的符合信息收集条件的全部模块名称和系统默认收集信息的模块名称,按照模块类的继承关系将模块名以树状结构进行展示,根据具体需要制定符合实际需求的信息收集设置;According to the system operating environment information obtained in step S4, extract the corresponding module names that meet the information collection conditions and the module names that the system collects information by default, and display the module names in a tree structure according to the inheritance relationship of the module classes. Develop information collection settings that meet actual needs;

S6:信息收集的步骤,具体包括:S6: Steps of information collection, including:

根据步骤S5中制定的信息收集设置,启动线程并发调用模块收集对应的配置信息和日志信息;在模块日志信息收集完毕后,调用setstate()函数将该模块的state置为1(1表示该模块所有信息收集完毕)。当对所有模块执行statecheck()得到state值都为1后,代表日志信息收集完毕。信息收集模块调用信息存储模块进行磁盘存储。启动多个线程并发调用模块的collectinfo()函数收集模块对应的配置信息和日志信息;获取的配置信息和日志信息准确、全面,降低信息收集出现遗漏的可能性。According to the information collection settings made in step S5, start the thread and concurrently call the module to collect the corresponding configuration information and log information; after the module log information is collected, call the setstate() function to set the state of the module to 1 (1 means the module All information is collected). When statecheck() is executed on all modules and the state value is 1, it means that the log information is collected. The information collection module calls the information storage module for disk storage. Start multiple threads and call the collectinfo() function of the module concurrently to collect the configuration information and log information corresponding to the module; the obtained configuration information and log information are accurate and comprehensive, reducing the possibility of omissions in information collection.

S7:信息存储的步骤,根据收集信息的配置存放路径,将模块类之间的继承关系转换成文件夹之间的父子关系,建立以模块名对应的文件存放结构,然后将信息收集模块收集到的信息分别存放到对应的文件夹下,最后进行打包压缩。S7: The step of information storage, according to the configuration storage path of the collected information, convert the inheritance relationship between module classes into the parent-child relationship between folders, establish a file storage structure corresponding to the module name, and then collect the information collection module into The information is stored in the corresponding folder, and finally packaged and compressed.

监控的步骤,对信息收集和存储的整个过程进行监控,并在以进度条的方式展示信息收集的进度。The monitoring step monitors the entire process of information collection and storage, and displays the progress of information collection in the form of a progress bar.

实施例3:Example 3:

本实施例提供一种计算机存储介质,所述计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例2所述的方法。This embodiment provides a computer storage medium, where instructions are stored in the computer storage medium, and when the computer storage medium runs on a computer, the computer executes the method described in Embodiment 2 above.

实施例4:Example 4:

本实施例提供一种终端,包括:This embodiment provides a terminal, including:

处理器、存储器,其中,processor, memory, which,

该存储器用于存储计算机程序,The memory is used to store computer programs,

该处理器用于从存储器中调用并运行该计算机程序,使得终端执行上述实施例2所述的方法。The processor is used to call and run the computer program from the memory, so that the terminal executes the method described in Embodiment 2 above.

实施例5:Example 5:

本实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例2所述的方法。This embodiment provides a computer program product containing instructions, which, when executed on a computer, cause the computer to execute the method described in Embodiment 2 above.

尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Although the present invention has been described in detail in conjunction with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention/any Those skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (9)

1. An information collection system, comprising:
a login module through which a server is logged in;
a setting and result display module, which provides a setting and result display interface, and in the interface, an IP address input port is provided; inputting an IP address or an IP address segment through the port;
a server connection module which starts a thread to connect the server of the collected information according to the input IP address;
the detection module is used for acquiring system operation environment information of the collected information server;
the adaptation module receives the system operation environment information detected by the detection module, extracts all corresponding module names meeting the information collection conditions and the corresponding module names of the system default collected information from the module library according to the received information, displays the module names in a tree structure on a user setting and result display interface according to the inheritance relationship of the module classes, and formulates the information collection setting meeting the actual requirements according to the specific requirements;
a module library for storing all module names and module inheritance relations,
the information collection module starts the thread concurrent calling module to collect corresponding configuration information and log information according to module information needing information collection transmitted by the adaptation module;
and the information storage module converts the inheritance relationship between the module classes into the parent-child relationship between the folders according to the configured storage path of the collected information, establishes a file storage structure corresponding to the module names, respectively stores the information collected by the information collection module under the corresponding folders, and finally packs and compresses the information.
2. An information collection system according to claim 1, further comprising:
and the monitoring module monitors the whole process of information collection and storage and displays the progress of information collection in a progress bar mode on a user setting and result display interface.
3. The information collection system according to claim 2, wherein in the detection module, the acquired system operating environment information includes but is not limited to: the type and version of the operating system, the type and version of the system software and the type and version of the service system.
4. The information collection system of claim 3, wherein the information collection module starts configuration information and log information corresponding to a collectinfo () function collection module of the multiple thread concurrent call module.
5. An information collection method, comprising the steps of:
s1: logging in the system, namely logging in a server;
s2: inputting an IP address or an IP address section to an IP address input port;
s3: starting a thread to connect to a server of the collected information according to the input IP address;
s4: acquiring system operation environment information of a collected information server;
s5: the step of collecting information adaptation specifically includes:
extracting all corresponding module names meeting the information collection conditions and the module names of the default collection information of the system according to the system operation environment information acquired in the step S4, displaying the module names in a tree structure according to the inheritance relationship of the module classes, and formulating information collection setting meeting actual requirements according to specific needs;
s6: the information collection step specifically comprises the following steps:
according to the information collection setting formulated in the step S5, starting a thread concurrent calling module to collect corresponding configuration information and log information;
s7: and information storage, namely converting inheritance relationships among module classes into parent-child relationships among folders according to the configured storage paths of the collected information, establishing a file storage structure corresponding to the module names, respectively storing the information collected by the information collection module under the corresponding folders, and finally packaging and compressing.
6. An information collection method according to claim 5, further comprising the step of monitoring the whole process of information collection and storage and showing the progress of information collection in the form of progress bars.
7. The information collecting method according to claim 6, wherein in the step S4, the obtained system operation environment information includes but is not limited to: the type and version of the operating system, the type and version of the system software and the type and version of the service system.
8. The method according to claim 7, wherein in step S6, the configuration information and the log information corresponding to the collectinfo () function collection module of the multiple thread concurrent call modules are started.
9. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 5-8.
CN201910996163.2A 2019-10-18 2019-10-18 Information collection system, method and storage medium Active CN110990237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910996163.2A CN110990237B (en) 2019-10-18 2019-10-18 Information collection system, method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910996163.2A CN110990237B (en) 2019-10-18 2019-10-18 Information collection system, method and storage medium

Publications (2)

Publication Number Publication Date
CN110990237A CN110990237A (en) 2020-04-10
CN110990237B true CN110990237B (en) 2022-05-31

Family

ID=70082170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910996163.2A Active CN110990237B (en) 2019-10-18 2019-10-18 Information collection system, method and storage medium

Country Status (1)

Country Link
CN (1) CN110990237B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858199A (en) * 2020-06-19 2020-10-30 苏州浪潮智能科技有限公司 A self-adaptive hard disk log collection method, system, terminal and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8694532B2 (en) * 2004-09-17 2014-04-08 First American Data Co., Llc Method and system for query transformation for managing information from multiple datasets
CN102123042B (en) * 2010-12-30 2013-05-15 中国民航信息网络股份有限公司 System configuration intelligent management system and management method thereof
CN103473636B (en) * 2013-09-03 2017-08-08 沈效国 A kind of system data element of collection, analysis and distribution network business information
CN105117830A (en) * 2015-08-11 2015-12-02 中节能港建(甘肃)风力发电有限公司 Wind farm production operation and maintenance information collection application system and method
CN108874602B (en) * 2018-06-15 2021-10-22 郑州云海信息技术有限公司 A method and system for automatically setting up and configuring IMDT and collecting information

Also Published As

Publication number Publication date
CN110990237A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110704277B (en) Method for monitoring application performance, related equipment and storage medium
CN110069464A (en) Log analysis processing method, device, equipment and readable storage medium storing program for executing
CN111614483A (en) Link monitoring method, device, storage medium and computer equipment
CN107026865A (en) Anomalous event processing method and system, client and service end
CN111897877A (en) High-performance and high-reliability data sharing system and method based on distributed idea
CN110990237B (en) Information collection system, method and storage medium
CN112579007B (en) Method and device for acquiring storage full link and electronic equipment
CN117389792A (en) Fault checking method and device, storage medium and electronic equipment
CN114064402A (en) Server system monitoring method
CN111062503B (en) A method, system, terminal and storage medium for power grid monitoring and alarm processing
CN116136801B (en) Cloud platform data processing method and device, electronic equipment and storage medium
CN114338347A (en) Ampere platform-based fault information out-of-band acquisition method and device
CN108920381A (en) A kind of method, system and the equipment of the performance test of NFS operation word
CN109558300B (en) Whole cabinet alarm processing method and device, terminal and storage medium
CN112799865A (en) Data processing method and device
CN109920466B (en) Hard disk test data analysis method, device, terminal and storage medium
CN103457771B (en) The management method of the cluster virtual machine of a kind of HA and equipment
CN110543394A (en) server sensor information consistency testing method, system, terminal and storage medium
CN111274083A (en) A method and system for distributed monitoring and collection of server hardware indicators
CN118445096A (en) Fault handling method and fault handling system
CN116260703A (en) Distributed message service node CPU performance fault self-recovery method and device
CN105991322A (en) Processing method and device for collection adapter management system
CN114090382A (en) Health inspection method and device for super-converged cluster
CN211579695U (en) Electric power monitoring system
CN115757045A (en) Transaction log analysis method, system and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China