CN114546764A - Method and system for remotely controlling T-BOX system log - Google Patents
Method and system for remotely controlling T-BOX system log Download PDFInfo
- Publication number
- CN114546764A CN114546764A CN202210126369.1A CN202210126369A CN114546764A CN 114546764 A CN114546764 A CN 114546764A CN 202210126369 A CN202210126369 A CN 202210126369A CN 114546764 A CN114546764 A CN 114546764A
- Authority
- CN
- China
- Prior art keywords
- log
- logs
- box
- box system
- cloud server
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000006854 communication Effects 0.000 claims description 28
- 238000004891 communication Methods 0.000 claims description 25
- 230000002159 abnormal effect Effects 0.000 claims description 16
- 230000006835 compression Effects 0.000 claims description 15
- 238000007906 compression Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 5
- 238000004140 cleaning Methods 0.000 abstract 1
- 238000011161 development Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
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/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
- G06F11/3072—Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
- G06F11/3082—Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting the data filtering being achieved by aggregating or compressing the monitored data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3013—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1734—Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and a system for remotely controlling a T-BOX system log, which comprises the following steps: s1: the cloud server analyzes and outputs the system LOGs generated by the T-BOX system into system LOGs of various grades by sending set control commands, and respectively stores the system LOGs of various grades in a plurality of parent folders of a storage unit of the T-BOX system, wherein the system LOGs of various grades at least comprise LOG _ ERROR LOGs; s2: and calculating and analyzing whether the total memory occupation value of the system logs of the same level output in the set time exceeds a set threshold value or not by a preset identification method. A method and system for remote control of T-BOX system log can realize remote control of log information output according to log grade, remote control of log information storage path, backup and cleaning, and remote uploading of log information.
Description
Technical Field
The invention relates to the field of control, in particular to a method and a system for remotely controlling a T-BOX system log.
Background
The T-BOX (intelligent vehicle-mounted terminal) is used as a core device of the internet of vehicles and has more functions including remote control of the vehicles, big data reporting, high-precision positioning and the like, so that the software complexity of the T-BOX is very high. A T-BOX product basically takes 2-3 years from the development completion to the mass production use, and the function of the T-BOX product can be stabilized only by continuously conducting software iteration in the period.
Although most problems of the T-BOX can be found in the development stage or the bench test stage, some problems can not be found in the development stage or the bench test stage, and the problems can be exposed only in the real vehicle environment and after the vehicle runs for a long time. In the using process of a vehicle, once the T-BOX has a problem, a T-BOX system log is usually derived on site to carry out positioning analysis on a development team of the T-BOX, a solution is determined, and finally the problem occurring in the T-BOX is repaired in a software upgrading mode, and the log information at the moment is of great importance to the problem analysis and repair of the T-BOX software.
The traditional T-BOX system log is divided into a log at an SOC end and a log at an MCU end according to modules. The log information of the two modules is usually output according to a fixed format content, and the storage path and the capacity of the log information are relatively fixed, and the method has the disadvantages that the log information amount is too much, the operation resource of the T-BOX system is occupied, the utilization rate of the information is low, the log output is not easy to control, and when the log information occupies a large capacity of the T-BOX system, an alarm and processing mechanism is not provided, and the risk of the whole T-BOX system breakdown can occur.
Disclosure of Invention
The invention provides a method and a system for remotely controlling a T-BOX system log, aiming at overcoming the defects in the prior art.
In order to solve the technical problems, the invention adopts the technical scheme that: a method of remotely controlling TBOX system logs, comprising:
s1: the cloud server analyzes and outputs the system LOGs generated by the T-BOX system into system LOGs of various grades by sending set control commands, and respectively stores the system LOGs of various grades in a plurality of parent folders of a storage unit of the T-BOX system, wherein the system LOGs of various grades at least comprise LOG _ ERROR LOGs;
s2: calculating and analyzing whether the total memory occupation value of the system logs of the same level output in a set time exceeds a set threshold value or not by a preset identification method, if so, storing the system logs of the same level output in the set time into a sub abnormal folder of the same parent folder, and simultaneously, alarming to a cloud server by the T-BOX system;
s3: when the memory of a single parent folder reaches a preset memory value, compressing the system logs and the child abnormal folders in the parent folder into log compression packages to be backed up in the parent folder, and deleting all the system logs and the child abnormal folders in the parent folder;
s4: when the file occupation value in the T-BOX system storage unit reaches a preset upper limit value, all the parent files in the T-BOX system storage unit are compressed and uploaded to a cloud server, the cloud server is enabled to give an alarm to prompt personnel, and when the file occupation value is successfully uploaded to the cloud server, all the system logs, the child abnormal folders and the log compression packages in the parent files in the T-BOX system storage unit are deleted.
Further, the method comprises the steps of setting preset time, compressing and uploading all the parent folders of the T-BOX system storage unit to a cloud server every other preset time, and deleting all the system logs and log compressed packets of the parent folders in the T-BOX system storage unit.
Further, the preset identification method comprises the steps of identifying in real time by using a stat function of the Linux system and outputting each memory occupation value of the system logs of the multiple grades.
Further, the set control command comprises that the T-BOX system and the server are based on an MQTT communication protocol and issue a data protocol command in a JSON format, and the data protocol command in the JSON format comprises { "TBOXSN": "XXX", "CtlType": "LogGrade", "TypeNum": X "," TYPE1": LOG _ ERROR".. the. }, wherein "TBOXSN": "XXX" represents a product serial number of the T-BOX, "CtlType": LogGrade "represents a control LOG level output," TypeNum ": X" represents the number of the control LOG level outputs, and the X range is 1-4, "TYPE1": LOG _ ERROR "represents a TYPE of the level.
Further, the system LOGs of multiple levels further include LOG _ WARNING LOG, LOG _ TRACE LOG, and LOG _ DEBUG LOG.
Further, when the T-BOX system does not receive the set control command, all the system LOGs are output according to the system LOG of the same level, and all the system LOGs are stored in the same parent folder, wherein the system LOG of the same level is a LOG _ ERROR LOG.
A system for remotely controlling a T-BOX system log, comprising:
the network communication unit is used for establishing network connection with the server end and maintaining the communication between the T-BOX system and the cloud server;
the state feedback unit is used for feeding back the result of the T-BOX system executing the remote log control instruction;
the command receiving unit is used for receiving a remote control system log command issued by the cloud server;
the command analysis unit is used for calling a JSON-C library to analyze a corresponding remote control log command;
the inter-process communication unit is used for communication between a network communication process and a log processing process in a message queue-based mode;
the log control output unit is used for outputting the log information according to a level format;
a log file storage unit for managing storage of log information;
the log file compression unit is used for compressing and backing up log files and reducing occupied internal memory;
the log file uploading unit is used for remotely exporting corresponding log information based on an ftp protocol;
and the log file clearing unit is used for clearing invalid log information in the T-BOX system.
Compared with the prior art, the invention has the beneficial effects that: the method and the system can improve the utilization rate of the log information of the T-BOX system, improve the efficiency of storing and extracting the log information of the T-BOX system, improve the stability of the T-BOX system, save the abnormal log into a new folder in real time, and facilitate the centralized check and processing of personnel.
Drawings
The disclosure of the present invention is illustrated with reference to the accompanying drawings. It is to be understood that the drawings are designed solely for the purposes of illustration and not as a definition of the limits of the invention. In the drawings, like reference numerals are used to refer to like parts. Wherein:
FIG. 1 schematically shows an overall architectural diagram proposed according to an embodiment of the present invention;
FIG. 2 schematically illustrates a flow diagram for controlling system log levels, according to one embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating remote log storage according to an embodiment of the present invention;
fig. 4 schematically shows a flow chart of the remote uploading of the system log according to an embodiment of the present invention.
Detailed Description
It is easily understood that according to the technical solution of the present invention, a person skilled in the art can propose various alternative structures and implementation ways without changing the spirit of the present invention. Therefore, the following detailed description and the accompanying drawings are merely illustrative of the technical aspects of the present invention, and should not be construed as all of the present invention or as limitations or limitations on the technical aspects of the present invention.
An embodiment according to the invention is shown in connection with fig. 1. A method of remotely controlling a T-BOX system log, comprising:
s1: the cloud server analyzes and outputs the system LOGs generated by the T-BOX system into system LOGs of various grades by sending set control commands, and respectively stores the system LOGs of various grades in a plurality of parent folders of a storage unit of the T-BOX system, wherein the system LOGs of various grades at least comprise LOG _ ERROR LOGs;
s2: calculating and analyzing whether the total memory occupation value of the system logs of the same level output in a set time exceeds a set threshold value or not by a preset identification method, if so, storing the system logs of the same level output in the set time into a sub abnormal folder of the same parent folder, and simultaneously, alarming to a cloud server by the T-BOX system;
s3: when the memory of a single parent folder reaches a preset memory value, compressing the system logs and the child abnormal folders in the parent folder into log compression packages to be backed up in the parent folder, and deleting all the system logs and the child abnormal folders in the parent folder;
s4: when the file occupation value in the T-BOX system storage unit reaches a preset upper limit value, all the parent files in the T-BOX system storage unit are compressed and uploaded to a cloud server, the cloud server is enabled to give an alarm to prompt personnel, and when the file occupation value is successfully uploaded to the cloud server, all the system logs, the child abnormal folders and the log compression packages in the parent files in the T-BOX system storage unit are deleted.
A method for remotely controlling a T-BOX system log is applied to the T-BOX, the T-BOX is used as a client and is provided with a network communication module and a log information processing module, and the method comprises the following steps:
the output level of the T-BOX system LOG information is mainly divided into four levels of LOG _ ERROR, LOG _ WARNING, LOG _ TRACE and LOG _ DEBUG, and the TBOX system only outputs the LOG _ ERROR level information by default.
The T-BOX system and the cloud server are based on an MQTT communication protocol, and the MQTT cloud server issues a command for controlling the T-BOX system to output log grade information.
And after receiving a control log command sent by the cloud server, a network communication module in the T-BOX system sends the control log command to a log processing module through interprocess communication.
And after receiving the control command of the log information output level, a log processing module in the T-BOX system outputs corresponding log information according to the command.
After a LOG processing module in the T-BOX system receives a LOG information storage path and a size control command, the LOG information is stored to a set path according to the command, for example, the LOG information is set within ten minutes, and the total memory of the output LOG _ ERROR LOG exceeds 20M, so that the T-BOX system is proved to have great problems, and the T-BOX system gives an alarm at the moment, so that a person knows that the T-BOX system has problems at a remote cloud server. At this point, another copy of LOG _ ERROR LOG for the first ten minutes is saved in the child exception folder. The problem is conveniently treated in a centralized way. When a single parent folder occupies a certain memory, all files in the parent folder are compressed into log compression packets and stored in the parent folder, the child abnormal folders and the system logs in the parent folder are deleted, and only the log compression packets are left.
When the memory of the storage unit of the T-BOX system is full, for example, the real-time file occupies more than seventy percent of the total storage unit, the file is compressed and uploaded to the cloud server, the cloud server is enabled to alarm and prompt personnel, and when the file is successfully uploaded to the cloud server, the system log, the sub-abnormal file and the daily-to-compressed packet in the storage unit of the T-BOX system are deleted.
Specifically, as shown in fig. 4, the method further includes setting a predetermined time, compressing and uploading all the parent folders of the T-BOX system storage unit to the cloud server every other predetermined time, and deleting all the system logs, the child exception folders, and the log compression packages of the parent folders in the T-BOX system storage unit. The logs are uploaded regularly, personnel can check the logs regularly conveniently, the safety of the logs is guaranteed, and some logs possibly existing in a small number in program running can be uploaded irregularly, so that key messages can be missed to cause great threat.
Specifically, as shown in fig. 3, the preset identification method includes identifying in real time by using a stat function of the Linux system and outputting each memory occupation value of the multiple levels of the system logs. The prior art of the stat function can identify the memory occupation value of the system log, and a specific implementation mode is provided.
Specifically, as shown in fig. 2, the set control command includes that the T-BOX system and the server are based on an MQTT communication protocol and issue a JSON-format data protocol command, where the JSON-format data protocol command includes { "TBOXSN": "XXX", "CtlType": "LOG grade", "TypeNum": X "," TYPE1": LOG _ ERROR" ·, where "TBOXSN": XXX "represents a product serial number of the T-BOX," CtlType ": and" LOG grade "represents a control LOG level output," TypeNum ": X" represents a number of control LOG level outputs, and an X range is 1 to 4, "TYPE1": LOG _ ERROR "represents a TYPE of the level. A specific control command is set, and this embodiment is preferred here.
Specifically, as shown in fig. 2, the multiple levels of system LOGs further include a LOG _ WARNING LOG, a LOG _ TRACE LOG, and a LOG _ DEBUG LOG. Generally, the method is divided into four types, so that people can more accurately search the real-time records.
Specifically, as shown in fig. 2, when the T-BOX system does not receive the set control command, all system LOGs are output according to the system LOG of the same level, and all system LOGs are stored in the same parent folder, where the system LOG of the same level is a LOG _ ERROR LOG. When the remote control is not received, all log information is output according to the same level, and then the log information is classified according to the above, so that the log can be automatically managed conveniently. New embodiments are provided.
A system for remotely controlling a T-BOX system log, comprising:
the network communication unit is used for establishing network connection with the server end and maintaining the communication between the T-BOX system and the cloud server;
the state feedback unit is used for feeding back the result of the T-BOX system executing the remote log control instruction;
the command receiving unit is used for receiving a remote control system log command issued by the cloud server;
the command analysis unit is used for calling a JSON-C library to analyze a corresponding remote control log command;
the inter-process communication unit is used for communication between a network communication process and a log processing process in a message queue-based mode;
the log control output unit is used for outputting the log information according to a level format;
a log file storage unit for managing storage of log information;
the log file compression unit is used for compressing and backing up log files and reducing occupied internal memory;
the log file uploading unit is used for remotely exporting corresponding log information based on an ftp protocol;
and the log file clearing unit is used for clearing invalid log information in the T-BOX system. The MQTT server side issues a command for remotely controlling the T-BOX log information, a network communication module of the T-BOX system receives and analyzes the remote control command, then log control parameters are transmitted to a log processing module through communication based on processes, and finally the log processing module carries out corresponding processing according to the corresponding control parameters. The MQTT server side issues a command for remotely controlling the output level of the T-BOX log information, and the T-BOX system log is output according to the corresponding log level; the MQTT cloud server issues a command for remotely controlling the information storage path and size of the T-BOX log, and the T-BOX system log stores and backups corresponding path data; and the MQTT cloud server issues a command for remotely controlling uploading of the T-BOX log information, and the T-BOX system log uploads the log information to a specified ftp server according to time periods. Therefore, the invention realizes the remote control of the T-BOX system log, not only has simple operation, but also greatly improves the utilization rate of log information and is beneficial to the quick analysis and positioning of the T-BOX developer.
In this embodiment, a method for remotely controlling a T-BOX system log is applied to a T-BOX having a network communication module and a log information processing module as a client, and includes: the T-BOX system LOG information output level is mainly divided into four levels of LOG _ ERROR, LOG _ WARNING, LOG _ TRACE and LOG _ DEBUG through { "TBOXSN": "XXX", "CtlType": LogGrade "," TypeNum ": X", "TYPE1": LOG _ ERROR ". } data protocol, and the TBOX system only outputs LOG _ ERROR level information by default.
The T-BOX and the server end are based on an MQTT communication protocol, and the MQTT cloud server issues a command for controlling the T-BOX system to output log grade information.
And after receiving a control log command sent by the cloud server, a network communication module in the T-BOX system sends the control log command to a log processing module through interprocess communication.
And after receiving the control command of the log information output level, a log processing module in the T-BOX system outputs corresponding log information according to the command.
After a LOG processing module in the T-BOX system receives a LOG information storage path and a size control command, the LOG information is stored to a set path according to the command, for example, the LOG information is set within ten minutes, and the total memory of the output LOG _ ERROR LOG exceeds 20M, so that the T-BOX system is proved to have great problems, and the T-BOX system gives an alarm at the moment, so that a person knows that the T-BOX system has problems at a remote cloud server. At this point, another copy of LOG _ ERROR LOG for the first ten minutes is saved in the child exception folder. The problem is conveniently treated in a centralized way. When a single parent folder occupies a certain memory, all files in the parent folder are compressed into log compression packets and stored in the parent folder, the child abnormal folders and the system logs in the parent folder are deleted, and only the log compression packets are left.
When the memory of the storage unit of the T-BOX system is full, for example, the real-time file occupies more than seventy percent of the total storage unit, the file is compressed and uploaded to the cloud server, the cloud server is enabled to alarm and prompt personnel, and when the file is successfully uploaded to the cloud server, the system log, the sub-abnormal file and the daily-to-compressed packet in the storage unit of the T-BOX system are deleted.
When the external remote control is not received, the system logs are not graded any more, but abnormal logs are automatically identified, so that the logs are stably stored and uploaded, and little memory is occupied.
The technical scope of the present invention is not limited to the above description, and those skilled in the art can make various changes and modifications to the above-described embodiments without departing from the technical spirit of the present invention, and such changes and modifications should fall within the protective scope of the present invention.
Claims (7)
1. A method for remotely controlling a T-BOX system log, comprising:
s1: the cloud server analyzes and outputs the system LOGs generated by the T-BOX system into system LOGs of various grades by sending set control commands, and respectively stores the system LOGs of various grades in a plurality of parent folders of a storage unit of the T-BOX system, wherein the system LOGs of various grades at least comprise LOG _ ERROR LOGs;
s2: calculating and analyzing whether the total memory occupation value of the system logs of the same level output in a set time exceeds a set threshold value or not by a preset identification method, if so, storing the system logs of the same level output in the set time into a sub abnormal folder of the same parent folder, and simultaneously, alarming to a cloud server by the T-BOX system;
s3: when the memory of a single parent folder reaches a preset memory value, compressing the system logs and the child abnormal folders in the parent folder into log compression packages to be backed up in the parent folder, and deleting all the system logs and the child abnormal folders in the parent folder;
s4: when the file occupation value in the T-BOX system storage unit reaches a preset upper limit value, all the parent files in the T-BOX system storage unit are compressed and uploaded to a cloud server, the cloud server is enabled to give an alarm to prompt personnel, and when the file occupation value is successfully uploaded to the cloud server, all the system logs, the child abnormal folders and the log compression packages in the parent files in the T-BOX system storage unit are deleted.
2. The method according to claim 1, further comprising setting a predetermined time, compressing and uploading all the parent folders of the T-BOX system storage unit to a cloud server every the predetermined time, and deleting all the system logs, child exception folders, and log compression packages of the parent folders in the T-BOX system storage unit.
3. The method of claim 1, wherein the predetermined identification method comprises identifying and outputting the memory usage values of the logs of different levels in real time by using a stat function of a Linux system.
4. The method as claimed in claim 1, wherein the set control command comprises that the T-BOX system and the server are based on MQTT communication protocol, and issues a JSON-format data protocol command, and the JSON-format data protocol command comprises { "TBOXSN": "XXX", "CtlType": "LogGrade", "TypeNum": "X", "TYPE1": "LOG _ ERROR" }, wherein "TBOXSN": XXX "represents the product serial number of the T-BOX," CtlType ":" LogGrade "represents the control LOG level output," petynum ": X" represents the number of control LOG level outputs, and X ranges from 1 to 4, "TYPE1": LOG _ ERROR "represents the TYPE of the level.
5. The method of claim 1, wherein the multiple levels of system LOGs further comprise LOG _ WARNING LOG, LOG _ TRACE LOG, and LOG _ DEBUG LOG.
6. The method of claim 1, wherein when the T-BOX system does not receive the set control command, all system LOGs are output as a same-level system LOG and stored in a same parent folder, wherein the same-level system LOG is a LOG ERROR LOG.
7. A system for remotely controlling a T-BOX system log as claimed in any one of claims 1 to 6, comprising:
the network communication unit is used for establishing network connection with the server end and maintaining the communication between the T-BOX system and the cloud server;
the state feedback unit is used for feeding back the result of the T-BOX system executing the remote log control instruction;
the command receiving unit is used for receiving a remote control system log command issued by the cloud server;
the command analysis unit is used for calling a JSON-C library to analyze a corresponding remote control log command;
the inter-process communication unit is used for communication between a network communication process and a log processing process in a message queue-based mode;
the log control output unit is used for outputting the log information according to a level format;
a log file storage unit for managing storage of log information;
the log file compression unit is used for compressing and backing up log files and reducing occupied internal memory;
the log file uploading unit is used for remotely exporting corresponding log information based on an ftp protocol;
and the log file clearing unit is used for clearing invalid log information in the T-BOX system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210126369.1A CN114546764B (en) | 2022-02-10 | 2022-02-10 | Method and system for remotely controlling T-BOX system log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210126369.1A CN114546764B (en) | 2022-02-10 | 2022-02-10 | Method and system for remotely controlling T-BOX system log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114546764A true CN114546764A (en) | 2022-05-27 |
CN114546764B CN114546764B (en) | 2024-09-24 |
Family
ID=81673437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210126369.1A Active CN114546764B (en) | 2022-02-10 | 2022-02-10 | Method and system for remotely controlling T-BOX system log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114546764B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457217A (en) * | 2019-07-31 | 2019-11-15 | 上海赫千电子科技有限公司 | A kind of cross-platform MCU debugging apparatus |
CN110912998A (en) * | 2019-11-26 | 2020-03-24 | 福建汉特云智能科技有限公司 | Vehicle problem troubleshooting system and method based on remote equipment terminal |
CN112437140A (en) * | 2020-11-13 | 2021-03-02 | 北京经纬恒润科技股份有限公司 | Method and device for remotely exporting TBOX log |
CN113497777A (en) * | 2020-03-18 | 2021-10-12 | 广州汽车集团股份有限公司 | Method and device for collecting information security logs of automobile gateway |
CN113985852A (en) * | 2021-10-29 | 2022-01-28 | 北京经纬恒润科技股份有限公司 | Method, device and system for processing log of vehicle-mounted terminal |
-
2022
- 2022-02-10 CN CN202210126369.1A patent/CN114546764B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457217A (en) * | 2019-07-31 | 2019-11-15 | 上海赫千电子科技有限公司 | A kind of cross-platform MCU debugging apparatus |
CN110912998A (en) * | 2019-11-26 | 2020-03-24 | 福建汉特云智能科技有限公司 | Vehicle problem troubleshooting system and method based on remote equipment terminal |
CN113497777A (en) * | 2020-03-18 | 2021-10-12 | 广州汽车集团股份有限公司 | Method and device for collecting information security logs of automobile gateway |
CN112437140A (en) * | 2020-11-13 | 2021-03-02 | 北京经纬恒润科技股份有限公司 | Method and device for remotely exporting TBOX log |
CN113985852A (en) * | 2021-10-29 | 2022-01-28 | 北京经纬恒润科技股份有限公司 | Method, device and system for processing log of vehicle-mounted terminal |
Also Published As
Publication number | Publication date |
---|---|
CN114546764B (en) | 2024-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106452881B (en) | Operation and maintenance data processing system based on cloud adding mode | |
CN109271602B (en) | Deep learning model publishing method and device | |
CN111459698A (en) | Database cluster fault self-healing method and device | |
CN114449018B (en) | Automatic log file uploading method and system for power acquisition terminal | |
CN110784352B (en) | Data synchronous monitoring and alarming method and device based on Oracle golden gate | |
CN113112038B (en) | Intelligent monitoring and diagnostic analysis system, device, electronic equipment and storage medium | |
CN112084087A (en) | Industrial equipment state monitoring and operation and maintenance management method and system | |
CN116302989A (en) | Pressure testing method and system, storage medium and computer equipment | |
CN113887749A (en) | Cloud edge cooperation-based multi-dimensional monitoring and disposal method, device and platform for power internet of things | |
CN117670033A (en) | Security check method, system, electronic equipment and storage medium | |
CN111586608A (en) | Intelligent health service system of power supply vehicle and data transmission method thereof | |
CN113742174A (en) | Cloud mobile phone application monitoring method and device, electronic equipment and storage medium | |
CN116719639A (en) | Link dynamic adjustment and data processing method, device, computer equipment and medium | |
CN114546764A (en) | Method and system for remotely controlling T-BOX system log | |
CN114500178B (en) | Self-operation intelligent Internet of things gateway | |
CN115460072A (en) | Log processing system integrating log collection, analysis, storage and service | |
CN111737097B (en) | Performance test method and related device of stream processing system | |
CN116416085A (en) | Cloud management method, system, server and storage medium of battery exchange station | |
CN113407415A (en) | Log management method and device of intelligent terminal | |
CN111131378A (en) | Method and system for supplementing and acquiring real-time data after communication recovery | |
CN112860527A (en) | Fault monitoring method and device of application server | |
CN111737242A (en) | Method for monitoring mass data processing process | |
CN110515955A (en) | Storage, querying method, system, electronic equipment and the storage medium of data | |
CN111245632A (en) | Safe log storage and management system based on cloud analysis | |
CN115118754B (en) | Remote monitoring test system and monitoring test method for electric automobile |
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 |