WO2017220008A1 - 一种日志文件自动导出方法和机顶盒 - Google Patents
一种日志文件自动导出方法和机顶盒 Download PDFInfo
- Publication number
- WO2017220008A1 WO2017220008A1 PCT/CN2017/089696 CN2017089696W WO2017220008A1 WO 2017220008 A1 WO2017220008 A1 WO 2017220008A1 CN 2017089696 W CN2017089696 W CN 2017089696W WO 2017220008 A1 WO2017220008 A1 WO 2017220008A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- log
- top box
- set top
- file
- log file
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
Definitions
- the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method for automatically exporting log files and a set top box.
- the system log file is a file containing information about system messages. Record all information about hardware, software, and system issues in the system. Different log files record different information, for example, some are the default recording system running information, and some are recording network packets.
- the method for real-time crawling of logs in an Android system set-top box is mainly through a network port or a serial port or a serial port of an SD interface, but these methods need to connect a PC to a set-top box by wired or wireless means, and The specified command can be entered on the PC to capture the log file.
- the existing set-top box log files cannot be captured by the above existing methods. Export, which affects the staff's positioning and maintenance of set-top box failures and the efficiency of device development based on logs.
- the method for automatically exporting a log file and the set-top box provided by the embodiment of the present invention can solve the problem that the prior art cannot be connected to the PC terminal by using a wireless or wired connection to input a capture instruction to capture the log, which affects the work. Personnel analyzes the location of the fault, resulting in technical problems with low maintenance efficiency of the equipment.
- an embodiment of the present invention provides a method for automatically exporting a log file.
- the set top box detects that there is an external memory access
- an embodiment of the present invention further provides a set top box, including: a detection module, a determination module, a log capture module, and an export module;
- the detecting module is configured to detect that the set top box has an external memory access
- the determining module is configured to determine whether a log capture instruction exists in the external storage
- the log capture module has a log file corresponding to the set top box when the determining module determines that the log capture instruction exists in the external storage;
- the export module is configured to export the log file captured by the log capture module to the external output storage.
- an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the foregoing automatic log file export method.
- a storage medium comprising a stored program, wherein the program is executed to perform the method of any of the above.
- processor being arranged to run a program, wherein the program is executed to perform the method of any of the above.
- a method for automatically exporting a log file, a set top box, and a computer storage medium comprising: detecting whether the set top box has an external memory access, and determining that a log capture instruction exists in the external storage, according to the external storage
- the log capture instruction captures the corresponding log file in the set top box, and exports the captured log file to the external storage for storage; triggers the log capture instruction in the external storage to trigger the capture of the log file in the set top box.
- the log file after the capture is exported to the external storage, thereby realizing the automatic capture and export of the log text in the set top box, setting a log capture instruction in the external storage to trigger the log capture, instead of
- the existing method of connecting a PC terminal through a network port and obtaining a log for a specific command to be input by a person thereby solving the technical problem that the log cannot be located through the PC terminal in a special scenario and it is difficult to locate the fault for maintenance;
- the trigger log capture only needs to be implemented by an external memory with a Japanese master capture instruction, the set-top box log is exported, and the operation mode is simple and convenient, and the technical level of the staff is not high. This greatly improves work efficiency when performing fault maintenance.
- FIG. 1 is a flowchart of a method for automatically exporting a log file according to a first embodiment of the present invention
- FIG. 2 is a schematic diagram of a process of detecting an external memory insertion according to a first embodiment of the present invention
- FIG. 3 is a flowchart of analyzing a configuration file according to a first embodiment of the present invention
- FIG. 4 is a flowchart of processing for capturing and exporting log files according to the first embodiment of the present invention
- FIG. 5 is a schematic structural diagram of a set top box according to a second embodiment of the present invention.
- the embodiment of the present invention provides a method for automatically exporting the log file.
- the method firstly sets an external memory, which is a commonly used USB flash drive.
- an external memory which is a commonly used USB flash drive.
- the corresponding log file is exported to the USB flash drive, thereby automatically exporting the log file in the set top box; Automatic crawling of the log, the method does not need to have too high requirements for the professional ability of the technician, thereby improving the maintenance efficiency of the set top box, automatically triggering the crawling by presetting the log capture instruction, and avoiding human intervention. And export the log file to an external storage , Released a set-top box running more cache space applications.
- the log file in the set top box is captured, and the log file includes, but is not limited to, the core operation record information of the set top box, the business interaction record of the application program, the operation record of the operating system or the fault log information, and the network package of the set top box.
- the operator analyzes the cause of the failure by crawling the log files in the set-top box or developing an application for the set-top box.
- FIG. 1 is a flowchart of a method for automatically exporting log files according to a first embodiment of the present invention.
- the specific processing steps include:
- the set top box detects that there is an external memory access.
- the external memory can be any removable storage device with a USB interface, preferably. USB flash drive or USB storage device.
- the method further includes setting a capture function of the automatic capture log for the set top box, and detecting the access of the external storage is detected by the capture function.
- the detection process of the external storage of the set top box is as shown in the figure. As shown in 2, the process is as follows:
- the operating system of the set top box detects that there is an external memory access.
- the external storage is a USB flash drive or a USB storage device. If a USB flash drive is detected, the USB flash drive is inserted into the set top box.
- the set-top box sends an internal MEDIA_MOUNTED broadcast to inform other functional units.
- step S1023 Start a crawl function according to the broadcast information, and obtain configuration file information from the external memory for parsing processing, and the step jumps to step S104.
- the log capture instruction set in the external storage may be a configuration file for controlling the set top box to capture the log file, or may be an authorization information for the external storage to capture the log file; if the log is captured When the command includes the configuration file, it is determined whether there is a configuration file in the external memory. If yes, the set top box acquires the configuration file in the external memory, and performs parsing processing, and fetches the configuration file according to the parsed information from the set top box. Log file.
- the log capture instruction includes the identifier information
- the capturing the log file corresponding to the set top box includes: determining that the identifier information exists in the external memory, and according to the The configuration file locally preset by the set top box retrieves a log file corresponding to the configuration file from the set top box.
- the configuration file may be set in the external storage.
- the set-top box activates the log capture function in the set-top box by determining whether the configuration file exists in the connected external storage; when the configuration file is set in the set-top box The log file is captured to determine whether there is identification information in the external storage of the set-top box, and the identification information is used for the authority authentication. Only the external storage device with the identification information can start the log capture function of the set-top box, and is based on Presetting the configuration file in the set-top box to capture the log file;
- At least one configuration file may be set according to actual requirements, and specifically, according to which configuration file is used for the log capture, according to the identification information set in the inserted external storage. Selecting, parsing the identification information in the external memory, obtaining the information of selecting the configuration information, and selecting a qualified configuration information from the set top box according to the information to perform the log file capture.
- the log capture instruction includes a log type and a capture time, where the capture time is used to control a capture time limit when the log file is captured, and the configuration file is from the set top box.
- the fetching the log file corresponding to the configuration file includes: obtaining the configuration file, and parsing the configuration file to obtain the log type and the fetching time; and the fetching time is from the set top box according to the fetching time Grab the log file corresponding to the log type.
- the specific parsing process is shown in FIG. 3, and the process is illustrated by setting the configuration file in the external storage as an example. The process is as follows:
- the set top box reads a configuration file from a path specific to the external storage, for example, reading from a “CatchLog” directory in the USB flash drive.
- the configuration file in the external storage is obtained, and parsed to obtain the log type and the fetch time required to be fetched. For example, only the kernel log file is captured, and the file in the configuration file is obtained.
- the name can be CatchLog_10_kernel. If the kernel, system log and network package are fetched, the file name can be CatchLog_10_log_kernel-netpacket, where the file name is only given to you 10 is the crawl time is 10 minutes, if you do not take this fetch The time value will be set to no default value.
- step S1045 The log file is captured from the set top box according to the log type and the fetch time obtained by the parsing. After the fetching is completed, the process proceeds to step S106.
- the export log file may be exported according to the configuration file, or may be stored in the set storage box in the flash storage unit of the set-top box according to the configuration file. After all the fetching is completed, it is exported from the flash storage unit and transferred to the external storage.
- the storage duration/stored data amount may also be determined whether the storage duration/stored data amount reaches a preset value; If the preset value is reached, the log file is exported from the flash storage unit to the external storage, wherein the storage duration is an accumulation time of the flash storage unit storing the log file, and the storage The duration may be greater than or equal to the crawl time of the log in the configuration file, where the amount of stored data is all log files captured in the crawling time, the amount of stored data is from the start of crawling the log file according to the configuration file. After the stored data amount reaches the preset value, the log file is exported to the external storage, and the log file in the flash storage unit is deleted.
- the specific log file export operation process is shown in Figure 4. The process is as follows:
- S1061 Obtain a log type obtained by parsing the configuration file and a crawling time of the crawl log.
- S1062 Determine whether to obtain a kernel log according to a log type.
- S1064 determines whether to obtain the system application log according to the log type.
- S1065 invokes an operating system command to capture the set top box system log and save it to the flash storage unit in the set top box.
- S1066 Determine whether to capture the network packet according to the log type.
- S1067 invokes an operating system command to capture a network packet and save it to a flash storage unit in the set top box.
- S1068 Set a timer according to the grab duration of the parsed log obtained by the parsing and start timing until the end of the time.
- the set top box terminates all the commands for capturing the log, and copies the log files in the flash storage unit to a specific directory on the external storage, such as /CatchLog/YYYY-MM-DD, and deletes the flash at the same time. Each log file on the storage unit.
- the external storage after copying the log file to the external storage, the external storage is unplugged. If the analysis of the log file is required, the external storage is connected to other PC devices for analysis.
- the method for automatically exporting a log file includes: detecting whether an external memory is connected to the set top box, and if so, determining whether a log capture instruction exists in the external storage, and if yes, capturing a corresponding log file from the set top box. And exporting the log file to the external storage; triggering the log capture function in the set-top box by inserting the external storage, automatically fetching the log file, and no need to intervene through other devices or input instructions Export log files, which improves the efficiency of fault analysis of the set-top box and the efficiency of positioning processing and maintenance.
- FIG. 5 is a schematic structural diagram of a set top box according to a second embodiment of the present invention.
- the set top box 5 specifically includes: a detecting module 51, a determining module 52, a log capturing module 53 and an exporting module 54, wherein:
- the detecting module 51 is configured to detect that the set top box has an external memory 50. Specifically, the detecting module 51 detects whether a memory is connected to the USB interface of the set top box by starting an operating system in the set top box. If yes, the setting is set in the set top box.
- the log crawl feature grabs log files.
- the determining module 52 is configured to detect, after detecting that the external memory 50 is connected to the set top box, the file stored in the external memory to detect whether there is a log capture instruction;
- the log capture module 53 captures the corresponding log file from the set top box; if it does not exist, it indicates that the log file is not required to be fetched, and returns to continue to detect whether there is external storage access.
- the exporting module 54 is configured to export the log file captured by the log capture module 53 to an external storage for storage.
- the functions that the four modules provided in this embodiment need to implement can be implemented by a processor in the set top box, specifically by setting a code program to control the log files in the set top box, and storing the preprogrammed program code in the set top box.
- the top processor loads the corresponding program code from the memory and compiles and executes.
- the USB interface is monitored by a monitoring chip in the set top box, When a USB flash drive or USB interface device is accessed, the working parameters of the USB interface are changed, thereby determining that the set top box has an external memory access.
- the determining module determines whether the configuration file exists in the external storage, and if yes, the log capture module is configured according to the configuration file.
- the set top box captures a log file corresponding to the configuration file.
- the configuration file may be set in an external memory.
- the set top box is activated by determining whether a configuration file exists in the connected external storage. Log crawling in the set-top box.
- the determining module determines whether the identifier information exists in the external memory, and if yes, the log capture module is configured according to the local preset configuration file of the set top box. The log file corresponding to the configuration file is captured in the set top box.
- At least one configuration file is set according to actual requirements, and specifically, according to which configuration file is used for log capture, the identifier information selected in the external storage memory is selected, and the identification information in the external storage is parsed and processed. Obtaining information for selecting configuration information, and selecting a matching configuration information from the set top box according to the information to perform log file capture.
- the log capture module 53 is configured to acquire the configuration file, and parse the configuration file to obtain the log type and the crawl time, according to the crawl time.
- a log file corresponding to the log type is captured in the set top box.
- the log capture module 53 can use an information collection unit disposed in the set top box to collect log files in real time through the collection unit, or can be obtained from the set top box memory.
- the log capture module 53 obtains a configuration file from a specific storage path in the external storage.
- the format of the configuration file is: file name-crawl log duration-log type, for example, determining whether the USB flash drive is There is a CatchLog directory and there is The file named at the beginning, if it exists, is read from the "CatchLog" directory. The file named at the beginning, and the file is parsed to get the corresponding log type and duration. For example, if you grab the kernel log file, the file name in the configuration file can be CatchLog_10_kernel, the log type is kernel, and the crawl time is 10 minutes. If the crawl duration is not found in the file hit, the log capture module 53 sets the duration to the default time value.
- the set top box further includes a flash storage unit configured to store the log file obtained from the set top box
- the exporting module 54 is configured to store the obtained log file in the flash storage unit in the set top box. Determining whether the storage duration/storage data amount reaches a preset value; if the preset value is reached, exporting the log file from the flash storage unit to the external storage, wherein the storage duration is
- the flash storage unit stores an accumulation time of the log file, and the storage data amount is all log files captured in the crawling time.
- the export module 54 provided in this embodiment may adopt an original output interface in the set top box, and the output interface acquires the collected log file from the collection unit, and sends the log file to the external storage.
- the method before inserting the external memory into the set top box, the method further includes setting a configuration file for the external memory, specifically inserting the USB flash drive (or USB storage device) into the PC, and creating a specific directory in the USB flash drive, such as /CatchLog /YYYY-MM-DD, and create a configuration file in the directory according to requirements, such as catchlog_10_log_kernel_netpacket.
- the user directly inserts the USB flash drive (or USB storage device) into the USB port of the set-top box, and waits for the configured time or the system default of 10 minutes; the log automatic export device detects the configuration file in the USB flash drive and parses the configuration file. Get the log type log, kernel, netpacket, and retrieve it from the set-top box according to the three log types. Store it in the flash storage unit. After waiting for 10 minutes, the user directly pulls the USB flash drive out of the set-top box and generates the above in a specific directory. Log type log files, such as /CatchLog/YYYY-MM-DD, are available for analysis.
- the method for automatically exporting the log file and the set-top box provided by the embodiment of the present invention, by inserting the external storage device with the configuration file into the set-top box, the set-top box in the set-top box acquires the configuration file in the external storage, and performs parsing processing to obtain the corresponding log type.
- the fetch time grab the log file from the set-top box according to the log type, and store it in the external storage, when the crawling time
- the fetch time set in the arrived configuration file is stopped
- the log file is stopped
- the captured log file is exported to the external storage, thereby realizing the automatic control and fetching of the set-top box log file by the user, no longer It is necessary to improve the maintenance efficiency and development accuracy of the set-top box through the cooperation of its equipment or the intervention of the input commands.
- the efficiency of the positioning process solves the technical problem that the prior art can be restricted by the field conditions and cannot be connected to the PC terminal by using the wireless or wired method to input the capture instruction capture log.
- Embodiments of the present invention also provide a storage medium including a stored program, wherein the program described above executes the method of any of the above.
- the storage medium may be configured to store program code set to perform the following steps:
- the set top box detects that there is an external memory access
- the storage medium is further configured to store program code configured to perform the step of: the log capture instruction including a configuration file
- the set top box determines that the log file corresponding to the set top box is captured by the set top box, and the log file corresponding to the configuration file is captured according to the configuration file.
- the storage medium is further configured to store program code configured to perform the following steps: the log capture instruction includes identification information;
- the set top box determines that the log file corresponding to the set top box is: when the set top box captures the log file corresponding to the set top box, the set top box fetches from the set top box according to a locally preset configuration file.
- the log file corresponding to the configuration file is: when the set top box captures the log file corresponding to the set top box, the set top box fetches from the set top box according to a locally preset configuration file.
- the storage medium is further configured to store program code configured to perform the following steps: the configuration file includes a crawl log type and a crawl time;
- the set top box fetching the log file corresponding to the configuration file from the set top box according to the configuration file includes: parsing the configuration file to obtain the log type and the fetching time; according to the fetching Time grabs a log file corresponding to the log type from the set top box.
- the storage medium is further configured to store program code set to perform the following steps: the exporting the captured log file to the external storage comprises:
- the storage duration is an accumulation time of the flash storage unit storing the log file, where the storage data volume is all log files captured in the crawling time.
- the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM).
- ROM Read-Only Memory
- RAM Random Access Memory
- Embodiments of the present invention also provide a processor configured to execute a program, wherein the program is operative to perform the steps of any of the above methods.
- the foregoing program is configured to perform the following steps:
- the set top box detects that there is an external memory access
- the foregoing program is configured to perform the following steps: the log capture instruction includes a configuration file
- the set top box determines that the log file corresponding to the set top box is captured by the set top box, and the log file corresponding to the configuration file is captured according to the configuration file.
- the foregoing program is configured to perform the following steps: the log capture instruction includes identification information;
- the set top box determines that the log file corresponding to the set top box is: when the set top box captures the log file corresponding to the set top box, the set top box fetches the log file corresponding to the configuration file from the set top box according to the locally preset configuration file. .
- the foregoing program is configured to perform the following steps: the configuration file includes a crawl log type and a crawl time;
- the set top box fetching the log file corresponding to the configuration file from the set top box according to the configuration file includes: parsing the configuration file to obtain the log type and the fetching time; according to the fetching Time grabs a log file corresponding to the log type from the set top box.
- the foregoing program is configured to perform the following steps: the exporting the captured log file to the external storage includes:
- the storage duration is an accumulation time of the flash storage unit storing the log file, where the storage data volume is all log files captured in the crawling time.
- modules or steps of the above embodiments of the present invention can be implemented by a general computing device, which can be concentrated on a single computing device. Or distributed on a network composed of a plurality of computing devices, optionally, they can be implemented by program code executable by the computing device, so that they can be stored in a computer storage medium (ROM/RAM, disk, optical disk). Executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that herein, or they may be fabricated into individual integrated circuit modules, or multiple of them. Or the steps are made into a single integrated circuit module. Therefore, embodiments of the invention are not limited to any particular combination of hardware and software.
- a log file automatic export method, a set top box, and a computer storage medium detect whether a set top box has an external memory access, and determine that a log capture instruction exists in the external memory, according to a log capture instruction in the external memory. Grab the corresponding log file in the set-top box, and export the captured log file to the external storage for storage; trigger the log file in the set-top box by judging the log capture instruction in the external storage, and after the crawling The log file is exported to the external storage device, so that the automatic capture and export of the log files in the set top box is realized, and the log capture instruction is set in the external storage to trigger the log capture, instead of connecting the existing network port through the network port.
- the terminal and the manner in which a person must input a specific command to obtain a log thereby solving the technical problem that it is difficult to locate the fault for maintenance by exporting the log through the PC terminal in a special scenario; further, because the log is triggered Only need to pass a command with a Japanese master
- the external memory can be realized, and the set-top box log is exported. This operation mode is simple and convenient, and the technical level of the staff is not high, which greatly improves the work efficiency when performing fault maintenance.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明实施例提供了一种日志文件自动导出方法和机顶盒,所述方法通过检测机顶盒是否有外接存储器接入,并判断所述外接存储器中存在日志抓取指令,根据外接存储器中的日志抓取指令抓取机顶盒中对应的日志文件,并将抓取到的日志文件导出至外接存储器中存储,实现了用户对机顶盒日志文件的自动控制抓取,不再需要通过其设备或者认为的输入指令干预;由于在外接存储器中设置了触发日志抓取功能的指令,使得该方法使用时操作简单,进一步地提高了对机顶盒故障定位处理的效率,提高了对机顶盒的维护效率以及开发精度,解决了现有技术会受到现场条件的限制而无法使用无线或有线的方式连接PC终端输入抓取指令抓取日志的技术问题。
Description
本发明实施例涉及通信技术领域,特别是涉及一种日志文件自动导出方法和机顶盒。
在现有的通信系统中,采用日志文件记录系统的所有操作事件这种技术已经非常普及使用,已成为了所有通信系统的必备功能,系统日志文件是一种包含关于系统消息的文件,能够记录系统中硬件、软件和系统问题的所有信息。不同的日志文件记载不同的信息,例如,有的是默认记录系统运行信息,有的是记录网络包。通过分析系统日志能够了解系统的安全状况和运行情况,也便于发现系统异常,并为快速定位和解决问题提供了依据。
目前,应用于安卓系统机顶盒实时抓取日志的方法主要是通过网口或者串口或者SD接口的串口,但是这几种方式都需要通过有线或者无线的方式将一台PC机与机顶盒连接,并在PC机上输入指定的命令才能抓取日志文件。但在某些特殊情况下,由于环境、设备或者操作工作人员的技术水平有限,例如没有特定的串口线或者网络异常等,再通过上述的现有方法就无法完成现场机顶盒日志文件的抓取并导出,从而影响了工作人员对机顶盒故障的定位维护以及根据日志进行设备开发的效率。
发明内容
本发明实施例提供的一种日志文件自动导出方法和机顶盒,以解决现有技术中由于受到现场条件的限制而无法使用无线或有线的方式连接PC终端输入抓取指令抓取日志,而影响工作人员对故障的定位分析,从而导致对设备的维护效率较低的技术问题。
为解决上述技术问题,本发明实施例提供一种日志文件自动导出方法,
包括:
机顶盒检测到有外接存储器接入;
判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件;
将抓取到的日志文件导出至所述外界存储设备中存储。
一方面,本发明实施例还提供一种机顶盒,包括:检测模块、判断模块、日志抓取模块和导出模块;
所述检测模块设置为检测机顶盒有外接存储器接入;
所述判断模块设置为判断所述外接存储器中是否存在日志抓取指令;
所述日志抓取模块拥有在所述判断模块判定所述外接存储器中存在所述日志抓取指令时,抓取所述机顶盒对应的日志文件;
导出模块设置为将所述日志抓取模块抓取到的日志文件导出至所述外接出存储器中存储。
另一方面,本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令设置为执行前述的日志文件自动导出方法。
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述任一项所述的方法。
根据本发明的又一个实施例,还提供了一种处理器,所述处理器设置为运行程序,其中,所述程序运行时执行上述任一项所述的方法。
本发明实施例的有益效果是:
根据本发明实施例提供的日志文件自动导出方法、机顶盒以及计算机存储介质,所述方法包括检测机顶盒是否有外接存储器接入,并判断所述外接存储器中存在日志抓取指令,根据外接存储器中的日志抓取指令抓取机顶盒中对应的日志文件,并将抓取到的日志文件导出至外接存储器中存储;通过判断外接存储器中的日志抓取指令来触发抓取机顶盒中的日志文
件,并将抓取完后的日志文件导出至外接存储器中,从而实现了对机顶盒中的日志文的自动抓取和导出,在外接存储器中设置日志抓取指令来触发日志抓取,代替了现有的通过网口连接PC终端以及必须要人为输入特定指令的来一个个日志进行获取的方式,从而解决了在特殊场景下无法通过PC终端导出日志而导致难以定位故障进行维护的技术问题;进一步的,由于触发日志抓取只需要通过一个带有日主抓取指令的外接存储器即可实现,机顶盒日志的导出,这样的操作方式既简单又便捷,对工作人员的技术水平要求也不高,使得在进行故障维护时,极大地提高了工作效率。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1为本发明第一实施例提供的日志文件自动导出方法的流程图;
图2为本发明第一实施例提供的检测外接存储器插入流程示意图;
图3为本发明第一实施例提供的配置文件解析流程图;
图4为本发明第一实施例提供的日志文件抓取和导出的处理流程图;
图5为本发明第二实施例提供的机顶盒结构示意图。
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。
第一实施例:
为了解决现有技术中对于一些特殊场景,操作人员无法通过PC终端与机顶盒建立连接导出日志文件,而导致无法进行故障的定位维护的问题,本发明实施例提供了一种日志文件自动导出方法,该方法首先是设置一个外接存储器,该外接存储器具体是人们常用的优盘,通过在优盘上设置日志抓取指令,当将该优盘插入机顶盒后,机顶盒检测到该日志抓取指令时,抓取机顶盒中对应的日志文件,并将该抓取到的日志文件导出至优盘中存储,从而实现了对机顶盒中的日志文件的自动导出;通过本方法只需将外接存储器直接插入到机顶盒上即可进行日志的自动抓取,该方法不需要对技术人员的专业能力有太高的要求,从而提高了对机顶盒的维护效率,通过预先设置日志抓取指令来自动触发抓取,也避免了人为的干预,并且将日志文件导出到外接存储器中存储,为机顶盒释放了更多的缓存空间进行应用的运行。
在本实施例中,抓取机顶盒中的日志文件,该日志文件包括但不限于机顶盒的内核运行记录信息、应用程序的业务交互记录、操作系统的操作记录或者故障日志信息以及机顶盒的网络包等等记录日志,操作人员通过抓取机顶盒中的日志文件来分析故障原因或者为机顶盒开发应用程序。
请参见图1,图1为本发明第一实施例提供的日志文件自动导出方法的流程图。其具体处理步骤包括:
S102,机顶盒检测到有外接存储器接入,在将外接存储器插入机顶盒时,机顶盒对该存储器进行检测识别,这里可理解的是,外接存储器可以为带有USB接口的任何可移动存储设备,优选的优盘或者USB存储设备。
在该步骤之前,该方法还包括为机顶盒设置自动抓取日志的抓取功能,检测外接存储器的接入具体是通过抓取功能进行检测,在该步骤中,机顶盒对外接存储器的检测流程如图2所示,该流程如下:
S1021,对机顶盒进行上电操作。
S1022,机顶盒运行操作系统检测到有外接存储器接入,具体的,该外接存储器为优盘或者USB存储设备,若检测到有优盘插入到机顶盒的
USB接口时,机顶盒发送内部MEDIA_MOUNTED广播,告知其他功能单元。
S1023,根据广播信息启动抓取功能,并从所述外接存储器中获取配置文件信息进行解析处理,级跳转至步骤S104。
S104,判定所述外接存储器中存在日志抓取指令,抓取所述机顶盒中对应的日志文件。
在本实施例中,在外接存储器中设置的日志抓取指令可以是用于控制机顶盒抓取日志文件的配置文件,也可以是对外接存储器抓取日志文件的授权信息;若所述日志抓取指令包括配置文件时,则判断外接存储器中是否存在配置文件,若存在,则机顶盒获取外接存储器中的配置文件,并进行解析处理,根据解析得到的信息从所述机顶盒中抓取与配置文件对应的日志文件。
在本实施例中,所述日志抓取指令包括标识信息,判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:判断所述外接存储器中存在所述标识信息,并根据所述机顶盒本地预设的配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
优选的,配置文件可以设置于外接存储器中,设置于外接存储器中时,机顶盒通过判断接入的外接存储器中是否存在配置文件来激活机顶盒中的日志抓取功能;当配置文件设置在机顶盒中时,则抓取日志文件通过判断接入机顶盒的外接存储器中是否存在标识信息,该标识信息用于权限认证,只有设置有该标识信息的外接存储器才能够启动机顶盒的日志抓取功能,并且是根据预设值于机顶盒中的配置文件来抓取日志文件;
进一步的,本实施例将配置文件设置于机顶盒时,可以根据实际的需求设置至少一个配置文件,而具体是按照哪一个配置文件进行日志的抓取,则根据插入的外接存储器中设置的标识信息选取,通过对外接存储器中的标识信息进行解析处理,得到选择配置信息的信息,根据该信息从机顶盒中选择一个符合条件的配置信息进行日志文件抓取。
在本实施例中,所述日志抓取指令包括日志类型和抓取时间,所述抓取时间是用于控制在抓取日志文件时的抓取时限,所述根据配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件包括:获取所述配置文件,并对所述配置文件进行解析处理,得到所述日志类型和抓取时间;根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。其中,对于配置文件的解析处理,具体的解析过程如图3所示,该过程是以配置文件设置在外接存储器中为例说明,该流程如下:
S1042,需要判断外接存储器中是否存在CatchLog目录并且有以CatchLog开头命名的文件。
S1043,如果目录或者文件缺少其中任何一个,则不需要抓取日志,则返回图2中的步骤继续监测外接存储器的接入。
S1044,如果目录和文件都存在,则获取外接存储器中的配置文件,并进行解析,得到所需要抓取的日志类型和抓取时间,例如,只抓取内核日志文件,则配置文件中的文件名可为CatchLog_10_kernel,若内核、系统日志和网络包都抓取,则文件名可为CatchLog_10_log_kernel-netpacket,其中文件名只给你的10表示的是抓取时间为10分钟,如果不带这个抓取时间值,则系统会设置为没默认值。
S1045,根据解析得到的日志类型和抓取时间从机顶盒中抓取日志文件,抓取完后,跳转至步骤S106。
S106,将抓取到的日志文件导出至所述外接存储器中存储。
在本步骤中,对导出日志文件可以是一边根据配置文件抓取一边导出存储,也可以是先根据配置文件从机顶盒中将所有需要抓取的日志文件抓取存储于机顶盒中的Flash存储单元中,在全部抓取完后,再从Flash存储单元中导出转存于外接存储器中。具体的,在抓取日志存储于Flash存储单元过程中还可以通过判断所述存储时长/存储数据量是否达到预设值;
若达到预设值,则将所述日志文件从所述Flash存储单元中导出至所述外接存储器中存储,其中所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,该存储时长可以是大于等于配置文件中的日志的抓取时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件,该存储数据量是从根据配置文件开始抓取日志文件起,直到存储数据量达到预设值后,将日志文件导出至外接存储器中,并删除Flash存储单元中的日志文件。其具体的日志文件导出操作流程如图4所示,该流程如下:
S1061,获取解析配置文件得到抓取的日志类型及抓取日志的抓取时长。
S1062,根据日志类型判断是否获取内核日志。
S1063,若需要,调用操作系统命令抓取内核日志并保存到机顶盒中的flash存储单元中。
S1064,根据日志类型判断是否获取系统应用日志。
S1065,若需要,调用操作系统命令抓取机顶盒系统日志并保存到机顶盒中的flash存储单元中。
S1066,根据日志类型判断是否抓取网络包。
S1067,若需要,调用操作系统命令抓取网络包并保存到机顶盒中的flash存储单元中。
S1068,根据解析得到的抓取日志的抓取时长设置定时器并启动计时,直到时间结束。
S1069,若定时器计时终止,则机顶盒终止所有抓取日志的命令,并将flash存储单元中的各日志文件拷贝到外接存储器上特定的目录,如/CatchLog/YYYY-MM-DD,同时删除flash存储单元上的各日志文件。
在本实施例中,在将日志文件拷贝到外接存储器后,拔下外接存储器,若需要对日志文件进行的分析,则将外接存储器连接到其他的PC设备进行分析即可。
本发明实施例提供的日志文件自动导出方法,包括检测是否有外接存储器接入机顶盒,若有,则判断外接存储器中是否存在日志抓取指令,若存在,则从机顶盒中抓取对应的日志文件,并将该日志文件导出至外接存储器中存储;通过插入外接存储器的方式来触发机顶盒中的日志抓取功能,对日志文件进行自动抓取,不需要再通过其他设备或者认为的输入指令进行干预导出日志文件,从而提高了对机顶盒的故障分析效率以及定位处理维护的效率。
第二实施例:
请参考图5,图5为本发明第二实施例提供的机顶盒结构示意图,该机顶盒5具体包括:检测模块51、判断模块52、日志抓取模块53和导出模块54,其中:
检测模块51设置为检测机顶盒有外接存储器50接入;具体的,检测模块51通过启动机顶盒中的操作系统来检测是否有存储器接入到机顶盒的USB接口中,若存在,在启动在机顶盒中设置的日志抓取功能抓取日志文件。
判断模块52设置为在检测到有外接存储器50接入机顶盒后,对外接存储器中存储的文件进行检测,检测是否存在日志抓取指令;
若存在,则通过日志抓取模块53从机顶盒中抓取对应的日志文件;若不存在,则说明不需要进行日志文件的抓取,返回继续检测是否有外接存储器接入。
导出模块54设置为将日志抓取模块53抓取到的日志文件导出至外接存储器中存储。
本实施例提供的四个模块所需要实现的功能,可以通过机顶盒中的处理器来实现,具体是通过设置代码程序来控制机顶盒中的日志文件,将预先编写好的程序代码存储到机顶盒中的存储器中,当检测到机顶盒上的USB接口中有外接存储器插入时,机顶处理器从存储器中加载对应的程序代码,并编译执行。优选的,通过机顶盒中的监测芯片监测USB接口,
当有优盘或者USB接口设备接入时,会使得USB接口的工作参数发生变化,从而判断机顶盒有外接存储器接入。
在本实施例中,当所述日志抓取指令包括配置文件,所述判断模块判断所述外接存储器中是否存在所述配置文件,若存在,则所述日志抓取模块根据所述配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件;优选的,配置文件可以设置于外接存储器中,设置于外接存储器中时,机顶盒通过判断接入的外接存储器中是否存在配置文件来激活机顶盒中的日志抓取功能。
当所述日志抓取指令包括标识信息,所述判断模块判断所述外接存储器中是否存在所述标识信息,若存在,则所述日志抓取模块根据所述机顶盒本地预设的配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
具体,根据实际的需求设置至少一个配置文件,而具体是按照哪一个配置文件进行日志的抓取,则根据插入的外接存储器中设置的标识信息选取,通过对外接存储器中的标识信息进行解析处理,得到选择配置信息的信息,根据该信息从机顶盒中选择一个符合条件的配置信息进行日志文件抓取。
在本实施例中,所述日志抓取模块53设置为获取所述配置文件,并对所述配置文件进行解析处理,得到所述日志类型和抓取时间,根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。优选的,该日志抓取模块53可以采用设置于机顶盒中的信息采集单元,通过采集单元来进行实时采集日志文件,也可以是从机顶盒存储器中获取。
具体的,在本实施例中,日志抓取模块53从外接存储器中特定存储路径获取配置文件,该配置文件的设置格式为:文件名-抓取日志时长-日志类型,例如,判断优盘中是否存在CatchLog目录并且有以开头命名的文件,若存在,则从“CatchLog”目录下读取以开头命名的文件,并对文件进行解析处理得到对应的日志类型和时长,例如,
抓取内核日志文件,则配置文件中的文件名可为CatchLog_10_kernel,日志类型为kernel,抓取时长为10分钟,若没有在文件命中找不到抓取时长,则日志抓取模块53会将时长设置为默认的时间值。
在本实施例中,所述机顶盒还包括Flash存储单元设置为存储从所述机顶盒中获取到的日志文件,导出模块54设置为将获取到的日志文件存储于所述机顶盒中的Flash存储单元中;判断所述存储时长/存储数据量是否达到预设值;若达到预设值,则将所述日志文件从所述Flash存储单元中导出至所述外接存储器中存储,其中所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件。优选的,本实施例中提供的导出模块54可以采用机顶盒中原有输出接口,该输出接口从采集单元中获取采集到的日志文件,并将日志文件发送至外接存储器中。
在本实施例中,在将外接存储器插入机顶盒之前,还包括为外接存储器设置配置文件,具体的是将优盘(或USB存储设备)插到PC上,并在优盘内创建特定目录,如/CatchLog/YYYY-MM-DD,并根据需求在目录下创建配置文件,如catchlog_10_log_kernel_netpacket。
在设置配置文件完成后,用户直接将优盘(或USB存储设备)插到机顶盒USB口,等待自己配置的时长或系统默认的10分钟;日志自动导出装置检测优盘中的配置文件,并进行解析处理,得到日志类型log、kernel、netpacket,根据三个日志类型从机顶盒中抓取存储于Flash存储单元中,等待10分钟过后,用户直接将优盘从机顶盒中拔出,在特定的目录下已经生成以上日志类型的日志文件,如/CatchLog/YYYY-MM-DD,可供分析使用。
本发明实施例提供的日志文件自动导出方法和机顶盒,通过将设有配置文件的外接存储器插入到机顶盒中,机顶盒中的机顶盒获取外接存储器中的配置文件,并进行解析处理,得到对应的日志类型和抓取时间,根据日志类型从机顶盒中抓取日志文件,并存储于外接存储器中,当抓取时长
到达的配置文件中设置的抓取时间时,则停止日志文件的抓取,同时将抓取到的日志文件导出到外接存储器中,从而实现了用户对机顶盒日志文件的自动控制抓取,不再需要通过其设备的配合或者认为的输入指令干预,提高了对机顶盒的维护效率以及开发精度。由于在外接存储器中设置了触发日志抓取功能的配置文件,因此,使用发明实施例提供的方法导出日志文件,其操作步骤简单,对操作人员的专业要求不高,进一步地提高了对机顶盒故障定位处理的效率,解决了现有技术会受到现场条件的限制而无法使用无线或有线的方式连接PC终端输入抓取指令抓取日志的技术问题。
第三实施例
本发明的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项所述的方法。
可选地,在本实施例中,上述存储介质可以被设置为存储设置为执行以下步骤的程序代码:
S1,机顶盒检测到有外接存储器接入;
S2,判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件;
S3,判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件。
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:所述日志抓取指令包括配置文件
S1,所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:根据配置文件抓取与所述配置文件对应的日志文件。
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:所述日志抓取指令包括标识信息;
S1,所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:所述机顶盒根据本地预设的配置文件从所述机顶盒中抓取与
所述配置文件对应的日志文件。
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:所述配置文件包括抓取日志类型和抓取时间;
S1,所述机顶盒根据配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件包括:对所述配置文件进行解析处理,得到所述日志类型和抓取时间;根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:所述将抓取到的日志文件导出至所述外接存储器中存储包括:
S1,先将获取到的日志文件存储于所述机顶盒中的Flash存储单元中;
S2,在存储时长/存储数据量达到预设值时,则将所述Flash存储单元中存储的日志文件导出至所述外接存储器中存储;
S3,所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本发明的实施例还提供了一种处理器,该处理器设置为运行程序,其中,该程序运行时执行上述任一项方法中的步骤。
可选地,在本实施例中,上述程序设置为执行以下步骤:
S1,机顶盒检测到有外接存储器接入;
S2,判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件;
S3,判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件。
可选地,在本实施例中,上述程序设置为执行以下步骤:所述日志抓取指令包括配置文件
S1,所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:根据配置文件抓取与所述配置文件对应的日志文件。
可选地,在本实施例中,上述程序设置为执行以下步骤:所述日志抓取指令包括标识信息;
S1,所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:所述机顶盒根据本地预设的配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
可选地,在本实施例中,上述程序设置为执行以下步骤:所述配置文件包括抓取日志类型和抓取时间;
S1,所述机顶盒根据配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件包括:对所述配置文件进行解析处理,得到所述日志类型和抓取时间;根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。
可选地,在本实施例中,上述程序设置为执行以下步骤:所述将抓取到的日志文件导出至所述外接存储器中存储包括:
S1,先将获取到的日志文件存储于所述机顶盒中的Flash存储单元中;
S2,在存储时长/存储数据量达到预设值时,则将所述Flash存储单元中存储的日志文件导出至所述外接存储器中存储;
S3,所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,
或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明实施例不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明实施例所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。
根据本发明实施例提供的日志文件自动导出方法、机顶盒以及计算机存储介质,检测机顶盒是否有外接存储器接入,并判断所述外接存储器中存在日志抓取指令,根据外接存储器中的日志抓取指令抓取机顶盒中对应的日志文件,并将抓取到的日志文件导出至外接存储器中存储;通过判断外接存储器中的日志抓取指令来触发抓取机顶盒中的日志文件,并将抓取完后的日志文件导出至外接存储器中,从而实现了对机顶盒中的日志文的自动抓取和导出,在外接存储器中设置日志抓取指令来触发日志抓取,代替了现有的通过网口连接PC终端以及必须要人为输入特定指令的来一个个日志进行获取的方式,从而解决了在特殊场景下无法通过PC终端导出日志而导致难以定位故障进行维护的技术问题;进一步的,由于触发日志抓取只需要通过一个带有日主抓取指令的外接存储器即可实现,机顶盒日志的导出,这样的操作方式既简单又便捷,对工作人员的技术水平要求也不高,使得在进行故障维护时,极大地提高了工作效率。
Claims (11)
- 一种日志文件自动导出方法,包括:机顶盒检测到有外接存储器接入;判定所述外接存储器中存在日志抓取指令时,抓取所述机顶盒对应的日志文件;将抓取到的日志文件导出至所述外接存储器中存储。
- 根据权利要求1所述的日志文件自动导出方法,其中,所述日志抓取指令包括配置文件;所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:根据配置文件抓取与所述配置文件对应的日志文件。
- 根据权利要求1所述的日志文件自动导出方法,其中,所述日志抓取指令包括标识信息;所述机顶盒判定存在日志抓取指令时,抓取所述机顶盒对应的日志文件包括:所述机顶盒根据本地预设的配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
- 根据权利要求2或3所述的日志文件自动导出方法,其中,所述配置文件包括抓取日志类型和抓取时间;所述机顶盒根据配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件包括:对所述配置文件进行解析处理,得到所述日志类型和抓取时间;根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。
- 根据权利要求4所述的日志文件自动导出方法,其中,所述将抓取到的日志文件导出至所述外接存储器中存储包括:先将获取到的日志文件存储于所述机顶盒中的Flash存储单元中;在存储时长/存储数据量达到预设值时,则将所述Flash存储单元中存储的日志文件导出至所述外接存储器中存储;所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件。
- 一种机顶盒,包括检测模块、判断模块、日志抓取模块和导出模块,其中:所述检测模块设置为检测机顶盒有外接存储器接入;所述判断模块设置为判断所述外接存储器中是否存在日志抓取指令;所述日志抓取模块设置为在所述判断模块判定所述外接存储器中存在所述日志抓取指令时,抓取所述机顶盒对应的日志文件;所述导出模块设置为将所述日志抓取模块抓取到的日志文件导出至所述外接存储器中存储。
- 根据权利要求6所述的机顶盒,其中,所述日志抓取指令包括配置文件;所述日志抓取模块根据所述配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
- 根据权利要求6所述的机顶盒,其中,所述日志抓取指令包括标识信息;所述日志抓取模块根据所述机顶盒本地预设的配置文件从所述机顶盒中抓取与所述配置文件对应的日志文件。
- 根据权利要求7或8所述的机顶盒,其中,所述配置文件包括抓取日志类型和抓取时间;所述日志抓取模块设置为对所述配置文件进行解析处理,得到所述日志类型和抓取时间,根据所述抓取时间从所述机顶盒中抓取与所述日志类型对应的日志文件。
- 根据权利要求9所述的机顶盒,其中,还包括Flash存储单元设置为存储从所述机顶盒中获取到的日志文件;所述导出模块设置为将获取到的日志文件存储于所述机顶盒中的Flash存储单元中;所述导出模块将获取到的日志文件先存储于所述机顶盒中的Flash存储单元中;在存储时长/存储数据量达到预设值时,再将所述日志文件从所述Flash存储单元中导出至所述外接存储器中存储;所述存储时长为所述Flash存储单元存储所述日志文件的累积时间,所述存储数据量为在所述抓取时间内抓取的所有日志文件。
- 一种存储介质,其中,所述存储介质包括存储的程序,其中,所述程序运行时执行权利要求1至5中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610465679.0A CN107547943A (zh) | 2016-06-23 | 2016-06-23 | 一种日志文件自动导出方法和机顶盒 |
CN201610465679.0 | 2016-06-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017220008A1 true WO2017220008A1 (zh) | 2017-12-28 |
Family
ID=60783321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/089696 WO2017220008A1 (zh) | 2016-06-23 | 2017-06-23 | 一种日志文件自动导出方法和机顶盒 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107547943A (zh) |
WO (1) | WO2017220008A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124684A (zh) * | 2021-10-22 | 2022-03-01 | 杭州依赛通信有限公司 | 一种运用u盘实现零接触全自动部署网元的方法 |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388496A (zh) * | 2018-01-23 | 2018-08-10 | 晶晨半导体(上海)股份有限公司 | 一种系统日志的收集方法 |
CN108401187A (zh) * | 2018-02-26 | 2018-08-14 | 深圳创维数字技术有限公司 | 机顶盒故障诊断方法、装置及计算机可读存储介质 |
CN108459932A (zh) * | 2018-03-02 | 2018-08-28 | 郑州云海信息技术有限公司 | 一种管理raid卡的方法、装置以及设备 |
CN108509317A (zh) * | 2018-03-29 | 2018-09-07 | 广州视源电子科技股份有限公司 | 日志文件保存方法、装置、电子装置及存储介质 |
CN109376129A (zh) * | 2018-10-08 | 2019-02-22 | 郑州云海信息技术有限公司 | 一种通过sys_tf卡定时自动收集存储日志的方法 |
CN109902068A (zh) * | 2019-02-15 | 2019-06-18 | 广州视源电子科技股份有限公司 | 一种抓取家电设备日志的方法、装置以及计算机可读存储介质 |
CN111694704B (zh) * | 2019-03-12 | 2023-10-10 | 杭州海康威视数字技术股份有限公司 | 调试信息输出方法、装置、电子设备及存储介质 |
CN110337017B (zh) * | 2019-07-05 | 2021-11-09 | 深圳市康冠科技股份有限公司 | 电视机及其日志处理方法、日志处理装置和可读存储介质 |
CN112260854A (zh) * | 2020-09-21 | 2021-01-22 | 深圳市广和通无线股份有限公司 | 物联网模块及其故障分析方法、装置、通信终端 |
CN113849135A (zh) * | 2021-09-30 | 2021-12-28 | 北京金山云网络技术有限公司 | 日志的访问方法、装置及服务器 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5309251A (en) * | 1990-04-19 | 1994-05-03 | Canon Kabushiki Kaisha | Communication apparatus capable of connecting memory card |
JP2007310827A (ja) * | 2006-05-22 | 2007-11-29 | Seiko Epson Corp | 記憶媒体及びログ情報取得システム |
CN101901154A (zh) * | 2010-07-16 | 2010-12-01 | 天津七一二通信广播有限公司 | 基于USB Host和U盘实现设备程序升级和维护的方法 |
CN103176924A (zh) * | 2011-12-26 | 2013-06-26 | 株式会社理光 | 输出设备以及输出设备的日志信息收集方法 |
CN103558997A (zh) * | 2013-10-30 | 2014-02-05 | 天津七一二通信广播有限公司 | 数字平调系统的数据记录与u盘导出方法 |
CN104346264A (zh) * | 2013-07-26 | 2015-02-11 | 鸿富锦精密工业(深圳)有限公司 | 系统事件日志处理系统及方法 |
CN106155875A (zh) * | 2016-06-29 | 2016-11-23 | 北京小米移动软件有限公司 | 一种导出系统日志的方法和装置 |
-
2016
- 2016-06-23 CN CN201610465679.0A patent/CN107547943A/zh active Pending
-
2017
- 2017-06-23 WO PCT/CN2017/089696 patent/WO2017220008A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5309251A (en) * | 1990-04-19 | 1994-05-03 | Canon Kabushiki Kaisha | Communication apparatus capable of connecting memory card |
JP2007310827A (ja) * | 2006-05-22 | 2007-11-29 | Seiko Epson Corp | 記憶媒体及びログ情報取得システム |
CN101901154A (zh) * | 2010-07-16 | 2010-12-01 | 天津七一二通信广播有限公司 | 基于USB Host和U盘实现设备程序升级和维护的方法 |
CN103176924A (zh) * | 2011-12-26 | 2013-06-26 | 株式会社理光 | 输出设备以及输出设备的日志信息收集方法 |
CN104346264A (zh) * | 2013-07-26 | 2015-02-11 | 鸿富锦精密工业(深圳)有限公司 | 系统事件日志处理系统及方法 |
CN103558997A (zh) * | 2013-10-30 | 2014-02-05 | 天津七一二通信广播有限公司 | 数字平调系统的数据记录与u盘导出方法 |
CN106155875A (zh) * | 2016-06-29 | 2016-11-23 | 北京小米移动软件有限公司 | 一种导出系统日志的方法和装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114124684A (zh) * | 2021-10-22 | 2022-03-01 | 杭州依赛通信有限公司 | 一种运用u盘实现零接触全自动部署网元的方法 |
CN114124684B (zh) * | 2021-10-22 | 2024-04-19 | 杭州依赛通信有限公司 | 一种运用u盘实现零接触全自动部署网元的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN107547943A (zh) | 2018-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017220008A1 (zh) | 一种日志文件自动导出方法和机顶盒 | |
CN108848067B (zh) | 智能学习并预置只读白名单规则的opc协议安全防护方法 | |
US8103762B2 (en) | Monitoring system for monitoring a message-sending system | |
US10545807B2 (en) | Method and system for acquiring parameter sets at a preset time interval and matching parameters to obtain a fault scenario type | |
US8015201B1 (en) | Servicing daemon for live debugging of storage systems | |
CN106528372B (zh) | 一种程序运行监视系统和方法 | |
WO2015188579A1 (zh) | 分布式虚拟防火墙装置、方法及防火墙控制器 | |
JP6957936B2 (ja) | 障害解析装置、障害解析方法および障害解析プログラム | |
WO2019051948A1 (zh) | 监控数据的处理方法、设备、服务器及存储介质 | |
JP2007334536A (ja) | マルウェアの挙動解析システム | |
JP2007257085A (ja) | 機器遠隔監視システム | |
WO2017148271A1 (zh) | 一种Linux系统复位处理方法、装置及计算机存储介质 | |
CN107729217A (zh) | 一种数据库异常处理方法和终端 | |
WO2015177879A1 (ja) | 情報処理装置、情報処理システム及び方法 | |
CN111858199A (zh) | 一种自适配硬盘日志采集方法、系统、终端及存储介质 | |
US20150113130A1 (en) | Problem determination in a hybrid environment | |
CN116974804A (zh) | 管理引擎挂死的调试方法、装置、设备及存储介质 | |
CN109901992B (zh) | 一种远程动态监听程序执行行为的方法 | |
CN113553243A (zh) | 远端侦错方法 | |
CN115022163B (zh) | 日志收集方法、装置、计算机设备及存储介质 | |
CN116431443A (zh) | 日志记录方法、装置、计算机设备及计算机可读存储介质 | |
CN114116645A (zh) | 多处理单元的日志管理方法、装置、存储介质及电子设备 | |
WO2020199469A1 (zh) | 基于django框架的接口调用记录方法、装置、设备及存储介质 | |
JP2014078126A (ja) | 機器のリモートログ収集システム及び機器のリモートログ収集方法 | |
CN107612768B (zh) | 基于Windows本地数据库访问流量采集方法及系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17814746 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17814746 Country of ref document: EP Kind code of ref document: A1 |