A method for automatically collecting and storing logs by SYS_TF card at regular intervals
The invention relates to a method for automatically collecting and storing logs by a SYS_TF card in time, which is characterized in that the method comprises the following steps: S1, a test script isprefabricated into the TF card; S2: the server starts up and enters the OS interface; S3, the current...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention relates to a method for automatically collecting and storing logs by a SYS_TF card in time, which is characterized in that the method comprises the following steps: S1, a test script isprefabricated into the TF card; S2: the server starts up and enters the OS interface; S3, the current time of the system is obtained; S4, the test script in the TF card is called when the system timeis the same as the prefabricated time; S5, a log under that system is obtained and the log is named; S6, the log file is copied into the TF card; S7, the size of the log file capacity is obtained; S8:when the log file capacity is larger than or equal to the capacity of the TF memory card, and the log files that are earlier in time can be deleted.
本发明涉及种通过SYS_TF卡定时自动收集存储日志的方法,其特征在于,包括以下步骤:S1:将测试脚本预制到TF卡内;S2:服务器开机进OS界面;S3:获取系统当前时间;S4:当系统时间与预制时间相同时,调用TF卡内测试脚本;S5:获取系统下日志,并对日志进行命名;S6:将日志文件拷贝到TF卡内;S7:获取日志文件容量大小;S8:当日志文件容量大小≥TF存储卡容量时;删除时间点比较早的日志文件。 |
---|