CN106411563A - Log recording method and device and router - Google Patents
Log recording method and device and router Download PDFInfo
- Publication number
- CN106411563A CN106411563A CN201610512901.8A CN201610512901A CN106411563A CN 106411563 A CN106411563 A CN 106411563A CN 201610512901 A CN201610512901 A CN 201610512901A CN 106411563 A CN106411563 A CN 106411563A
- Authority
- CN
- China
- Prior art keywords
- log information
- trigger message
- debugging mode
- log
- preset time
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0677—Localisation of faults
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/60—Router architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a log recording method and device and a router. The method comprises the following steps: monitoring triggering information used for recording log information; enabling a temporary debugging mode according to the triggering information, wherein the temporary debugging mode is used for starting to record the log information when the triggering information is monitored; starting to record log information generated within preset time according to the temporary debugging mode. The log information generated by the router within the preset time is started to be recorded in the temporary debugging mode by monitoring the trigging information and enabling the temporary debugging mode according to the monitored triggering information, namely, the router does not need to continuously record all levels of log information which is generated continually, so that the complete occupation rate of the storage space of the router is lowered.
Description
Technical field
It relates to intelligent router technical field, more particularly, to a kind of log recording method, device and router.
Background technology
Router is to connect each LAN, the equipment of wide area network in the Internet, and it can automatically select according to the situation of channel and set
Fixed route, with optimal path, presses tandem sending signal.In home or small office network, generally using wireless
Router realizing multiple terminal devices and concentrate connecting, and shared verification.
Router can generate log information during running router program, because log information is positioning router issue
Important evidence, accordingly, it would be desirable to store to log information, so that when router goes wrong, is deposited by checking analysis
The log information orientation problem of storage.
Router is continuously generated log information, and the memory space of router is relatively small, is continuously generated with router and deposits
Storage log information, the memory space of router can be taken quickly.
Content of the invention
The disclosure provides a kind of log recording method, device and router, in order to reduce the speed that router memory space is occupied full
Rate.
According to the embodiment of the present disclosure in a first aspect, providing a kind of log recording method, the method includes:
Monitor the trigger message for log information;
According to described trigger message, open interim debugging mode, described interim debugging mode monitors described triggering letter for working as
During breath, start recording log information;
According to the log information generating in described interim debugging mode start recording Preset Time.
This technical scheme can include following beneficial effect:By monitoring trigger message, opened according to the trigger message monitoring
Interim debugging mode, the log information that start recording router generates in Preset Time under interim debugging mode, that is, it route
Device does not need persistence to record the gradational log information of institute that it is continuously generated, and reduces what router memory space was occupied full
Speed.
In the first possible implementation of first aspect, described interim debugging mode is opened according to described trigger message,
Including:
Obtain the temporal information monitoring during described trigger message;
When described temporal information is identified, open the operation for recording described log information.
This technical scheme can include following beneficial effect:By opening the operation for log information, open interim tune
Die trial formula, improves the convenience opening interim debugging mode.
According to the first possible implementation of first aspect, in the possible implementation of the second of first aspect, institute
State the target rank that trigger message includes log information to be recorded;
The described log information according to generation in described interim debugging mode start recording Preset Time, including:
Described target level other day is more than or equal to according to the rank generating in described interim debugging mode start recording Preset Time
Will information.
This technical scheme can include following beneficial effect:Trigger message includes the target rank of log information to be recorded, with
Triggering this corresponding log information of target rank of log recording apparatus record, improves the spirit of the log information of record different stage
Activity.
According to the possible implementation of the first or second of first aspect, first aspect, the third in first aspect can
In the implementation of energy, described trigger message also includes described Preset Time.
According to the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, institute
After stating according to the log information generating in described interim debugging mode start recording Preset Time, also include:
The log information of record in described Preset Time is sent to server, and closes described interim debugging mode.
This technical scheme can include following beneficial effect:Determine the Preset Time of log information by trigger message, can
The time span of precise control log recording apparatus log information;In addition, the log information recording in Preset Time is sent out
Give server it is ensured that the timely upload server of the log information of storage is backed up in router memory space, it is to avoid
Memory space leads to log information to be lost after being occupied full.
According to the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect,
The described trigger message monitored for log information, including:
The operation for log information of monitoring user's triggering;
Trigger message is generated according to described operation.
This technical scheme can include following beneficial effect:By the operation of user's trigger recording log information, to trigger daily record
The log information of recording device records different target rank, improves the aspect of user operation.
According to the 4th kind of possible implementation of first aspect, in the 6th kind of possible implementation of first aspect, institute
State the trigger message that monitoring is used for log information, including:
Monitoring fault message;
Described trigger message is generated according to described fault message.
This technical scheme can include following beneficial effect:By generating fault message during router failure, automatically trigger
The other log information of log recording apparatus record target level, improves the promptness of fault detect.
According to the second aspect of the embodiment of the present disclosure, provide a kind of log recording apparatus, this device includes:
Monitoring modular, is configured to monitor the trigger message for log information;
Opening module, is configured to, according to described trigger message, open interim debugging mode, described interim debugging mode is used for
When monitoring described trigger message, start recording log information;
Logging modle, is configured to according to the log information generating in described interim debugging mode start recording Preset Time.
This technical scheme can include following beneficial effect:By monitoring trigger message, opened according to the trigger message monitoring
Interim debugging mode, the log information that start recording router generates in Preset Time under interim debugging mode, that is, it route
Device does not need persistence to record the gradational log information of institute that it is continuously generated, and reduces what router memory space was occupied full
Speed.
In the first possible implementation of second aspect, described opening module includes:
Acquisition submodule, is configured to obtain temporal information when monitoring described trigger message;
Open submodule, be configured to, when described temporal information is identified, open for recording described log information
Operation.
This technical scheme can include following beneficial effect:By opening the operation for log information, open interim tune
Die trial formula, improves the convenience opening interim debugging mode.
According to the first possible implementation of second aspect, in the possible implementation of the second of second aspect, institute
State the target rank that trigger message includes log information to be recorded;
Described logging modle, is configured to the rank according to generating in described interim debugging mode start recording Preset Time and is more than
Equal to the other log information of described target level.
This technical scheme can include following beneficial effect:Trigger message includes the target rank of log information to be recorded, with
Triggering this corresponding log information of target rank of log recording apparatus record, improves the spirit of the log information of record different stage
Activity.
According to the possible implementation of the first or second of second aspect, second aspect, the third in second aspect can
In the implementation of energy, described trigger message also includes described Preset Time.
According to the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, institute
State device also to include:
Sending module, is configured to for the log information of record in described Preset Time to be sent to server;
Closedown module, is configured to described sending module and the log information of record in described Preset Time is sent to server
Afterwards, close described interim debugging mode.
This technical scheme can include following beneficial effect:Determine the Preset Time of log information by trigger message, can
The time span of precise control log recording apparatus log information;In addition, the log information recording in Preset Time is sent out
Give server it is ensured that the timely upload server of the log information of storage is backed up in router memory space, it is to avoid
Memory space leads to log information to be lost after being occupied full.
According to the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, institute
State monitoring modular to include:
Monitoring submodule, is configured to monitor the operation for log information of user's triggering;
Generate submodule, be configured to generate trigger message according to described operation.
This technical scheme can include following beneficial effect:By the operation of user's trigger recording log information, to trigger daily record
The log information of recording device records different target rank, improves the aspect of user operation.
According to the 4th kind of possible implementation of second aspect, in the 6th kind of possible implementation of second aspect, institute
State monitoring modular to include:
Monitoring submodule, is configured to monitor fault message;
Generate submodule, be configured to generate described trigger message according to described fault message.
This technical scheme can include following beneficial effect:By generating fault message during router failure, automatically trigger
The other log information of log recording apparatus record target level, improves the promptness of fault detect.
According to the third aspect of the embodiment of the present disclosure, provide a kind of router, including:
Processor;
It is configured to store the memorizer of processor executable;
Wherein, described processor is configured to:
Monitor the trigger message for log information;
According to described trigger message, open interim debugging mode, described interim debugging mode monitors described triggering letter for working as
During breath, start recording log information;
According to the log information generating in described interim debugging mode start recording Preset Time.
It should be appreciated that above general description and detailed description hereinafter are only exemplary and explanatory, can not limit
The disclosure processed.
Brief description
Accompanying drawing herein is merged in description and constitutes the part of this specification, shows and meets embodiment of the disclosure,
And be used for explaining the principle of the disclosure together with description.
Fig. 1 is a kind of flow chart of the log recording method embodiment one according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of the log recording method embodiment two according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of the log recording method embodiment three according to an exemplary embodiment;
Fig. 4 is a kind of flow chart of the log recording method example IV according to an exemplary embodiment;
Fig. 5 is a kind of flow chart of the log recording method embodiment five according to an exemplary embodiment;
Fig. 6 is a kind of flow chart of the log recording method embodiment six according to an exemplary embodiment;
Fig. 7 is a kind of block diagram of the log recording apparatus embodiment one according to an exemplary embodiment;
Fig. 8 is a kind of block diagram of the log recording apparatus embodiment two according to an exemplary embodiment;
Fig. 9 is a kind of block diagram of the log recording apparatus embodiment three according to an exemplary embodiment;
Figure 10 is a kind of block diagram of the log recording apparatus example IV according to an exemplary embodiment;
Figure 11 is a kind of block diagram of the router according to an exemplary embodiment.
By above-mentioned accompanying drawing it has been shown that the clear and definite embodiment of the disclosure, hereinafter will be described in more detail.These accompanying drawings and
Word description is not intended to limit the scope of disclosure design by any mode, but is this by reference to specific embodiment
Skilled person illustrates the concept of the disclosure.
Specific embodiment
Here will in detail exemplary embodiment be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to accompanying drawing
When, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.In following exemplary embodiment
Described embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they are only and such as appended power
The example of the consistent apparatus and method of some aspects being described in detail in sharp claim, the disclosure.
Fig. 1 is a kind of flow chart of the log recording method embodiment one according to an exemplary embodiment, and the method is permissible
To be executed by log recording apparatus, this log recording apparatus can integrated in the router, as shown in figure 1, the method includes
Following steps:
In step S101, monitor the trigger message for log information.
In the present embodiment, router can generate the log information of different stage during running router program, optionally,
This rank includes at least following five kinds of ranks:
1)DEBUG:Comprise the information of detailed exploitation information, generally only use when debugging a program;
2)INFO:Information, normal system message, such as harassing and wrecking report, band data etc. is it is not necessary to process;
3)WARNING:Warning message, is not mistake, and such as system disk employs 85% etc.;
4)ERROR:Mistake, is not very urgent, repairs within a certain period of time;
5)FATAL:Material circumstance, such as Hard disk error, standby connection is lost.
The priority of above-mentioned five kinds of ranks and importance incremented by successively.
When router generates the log information of different stage, not log information, when router failure, pass through
User operation or router automatic trigger recording log information, optionally, integrated log recording apparatus in the router are real-time
Monitoring trigger message, this trigger message is used for triggering the daily record letter of the different stage of log recording apparatus record router generation
Breath.
Or, when router generates the log information of different stage, the log information of record default level, optionally, write from memory
Recognizing rank is WARNING, then router record rank during running router program is more than or equal to WARNING
Log information, because the quantity of low-level log information is more than the quantity of high level log information, that is, DEBUG and
The log information of INFO rank is many with respect to the log information of WARNING, ERROR or FATAL rank.Due to
The log information of DEBUG and INFO rank can be used for the fault detect of router, positioning problems, then when router occurs
During fault, need to record the log information of DEBUG and/or INFO rank, in the present embodiment, be integrated in router
In log recording apparatus real-time monitoring trigger message, this trigger message be used for triggering log recording apparatus record DEBUG and
/ or INFO rank log information.
In step s 102, according to described trigger message, open interim debugging mode, described interim debugging mode is used for working as
When monitoring described trigger message, start recording log information.
In the present embodiment, under default situations, router not log information, when user triggers for log information
Button when, for example, user triggers a hardware button on router, after this user triggers this hardware button, route
Device produces trigger message, and opens interim debugging mode according to this trigger message, and interim debugging mode refers to monitor when router
During to trigger message, i.e. start recording log information, not log information under default situations, that is, need log information
When just open interim debugging mode and carry out the record of log information it is not necessary to during log information, can be not turned on adjusting temporarily
Die trial formula, does not carry out the record of log information.
In step s 103, according to the log information generating in described interim debugging mode start recording Preset Time.
Optionally, log recording apparatus are from monitoring trigger message moment start recording log information, and hold in Preset Time
Continue and record this log information, after Preset Time, log recording apparatus stop recording log information, or log recording dress
Put the log information of recovery record default level.
In the present embodiment, by monitoring trigger message, interim debugging mode is opened according to the trigger message monitoring, interim
The log information that under debugging mode, start recording router generates in Preset Time, that is, router do not need persistence to record it
The gradational log information of institute being continuously generated, reduces the speed that router memory space is occupied full.
Fig. 2 is a kind of flow chart of the log recording method embodiment two according to an exemplary embodiment, as shown in Fig. 2
The method can include the steps:
In step s 201, monitor the trigger message for log information.
In step S202, obtain the temporal information monitoring during described trigger message.
In the present embodiment, after trigger message can be the hardware button that user triggers on router, the information that router produces,
Can also be that router detects the information producing during fault message, can also be that user passes through subscriber terminal equipment and for example takes down notes
The order that this computer sends to router.
Router real-time monitoring trigger message, when monitoring trigger message, obtains the time monitoring during described trigger message
Information, for example, obtains user and triggers the temporal information during hardware button on router.
In step S203, when described temporal information is identified, open the operation for recording described log information.
In the present embodiment, router can automatically control whether log information, when router monitors trigger message, and
When obtaining the temporal information monitoring during described trigger message, when this temporal information is identified, open for recording
State the operation of log information, this operation can be the control instruction that the program that router runs produces, this control instruction can be used for
The function of open record log information.
In step S204, according to the log information generating in described operation start recording Preset Time.
In the present embodiment, by opening the operation for log information, open interim debugging mode, improve unlatching and face
When debugging mode convenience.
Fig. 3 is a kind of flow chart of the log recording method embodiment three according to an exemplary embodiment, as shown in figure 3,
The method can include the steps:
In step S301, monitor the trigger message for log information.
Described trigger message includes the target rank of log information to be recorded;In the present embodiment, can be included by trigger message
Target rank triggering log recording apparatus record this corresponding log information of target rank in above-mentioned five kinds of ranks.
Optionally, when router failure, in order to be accurately positioned fault, trigger message includes DEBUG class information.
In step s 302, obtain the temporal information monitoring during described trigger message.
In step S303, when described temporal information is identified, open the operation for recording described log information.
In step s 304, institute is more than or equal to according to the rank generating in described interim debugging mode start recording Preset Time
State the other log information of target level.
After log recording apparatus monitor the trigger message including DEBUG class information, when monitoring this trigger message
At quarter, record the log information of DEBUG rank in Preset Time, and log information more than DEBUG rank,
I.e. the log information of above-mentioned five kinds of ranks is all recorded.
If log recording apparatus monitor the trigger message including WARNING class information, from monitor this triggering believe
In the breath moment, record the log information of WARNING rank in Preset Time, and more than WARNING rank
Log information as ERROR, FATAL.Optionally, log recording apparatus are stored with time comparison table, this time pair
Include predetermined time period and the other corresponding relation of target level according to table, after log recording apparatus monitor trigger message, can root
Inquire about this time comparison table according to the target rank that trigger message includes, determine that the other log information of this target level needs to be recorded
Time span.
In the present embodiment, trigger message includes the target rank of log information to be recorded, to trigger log recording apparatus record
This corresponding log information of target rank, improves the motility of the log information of record different stage.
Fig. 4 is a kind of flow chart of the log recording method example IV according to an exemplary embodiment, as shown in figure 4,
The method may include steps of:
In step S401, monitor the trigger message for log information.
In the present embodiment, described trigger message includes target rank and the Preset Time of log information to be recorded, that is, in this reality
Apply in example, Preset Time is determined by trigger message.
In step S402, obtain the temporal information monitoring during described trigger message.
In step S403, when described temporal information is identified, open the operation for recording described log information.
In step s 404, institute is more than or equal to according to the rank generating in described interim debugging mode start recording Preset Time
State the other log information of target level.
In step S405, the log information of record in described Preset Time is sent to server, and closes described interim
Debugging mode.
Log recording apparatus from receive trigger message moment start recording rank be more than or equal to the other log information of target level, and
Persistently record this log information in Preset Time, after Preset Time, log recording apparatus stop recording log information,
Or the log information of log recording apparatus recovery record default level.
Log recording apparatus stop recording log information, or the log information of log recording apparatus recovery record default level
Afterwards, the log information of record in described Preset Time is sent to server by log recording apparatus, or, log recording apparatus
The log information of record in described Preset Time is compressed, the log information after compression is sent to server, closes simultaneously
Close described interim debugging mode, so that router returns to default conditions, no longer log information.Server receives pressure
After log information after contracting, the log information after compression is carried out storage backup, or, server is carried out to this log information
Decompression, carries out positioning problems according to the log information after decompression.
In the present embodiment, determine the Preset Time of log information by trigger message, be accurately controlled log recording apparatus
The time span of log information;In addition, the log information recording in Preset Time is sent to server it is ensured that road
Backed up by the timely upload server of log information of storage in device memory space, it is to avoid memory space leads to after being occupied full
Log information is lost.
Fig. 5 is a kind of flow chart of the log recording method embodiment five according to an exemplary embodiment, as shown in figure 5,
The method may include steps of:
In step S501, the operation for log information of monitoring user's triggering.
In the present embodiment, router is provided with the button or display interface with user mutual, when router failure, uses
Family presses the icon on button or click display interface, to trigger log recording apparatus start recording log information.
In step S502, trigger message is generated according to described operation.
Optionally, router is provided with multiple buttons, and the different button of user's pressing produces different trigger messages, or, show
Show that interface is provided with multiple icons, user clicks on different icons and produces different trigger messages, different trigger messages includes
Target rank is different and/or Preset Time is different.
In step S503, obtain the temporal information monitoring during described trigger message.
In step S504, when described temporal information is identified, open the operation for recording described log information.
In step S505, institute is more than or equal to according to the rank generating in described interim debugging mode start recording Preset Time
State the other log information of target level.
In step S506, the log information of record in described Preset Time is sent to server, and closes described interim
Debugging mode.
In the present embodiment, by the operation of user's trigger recording log information, to trigger log recording apparatus record different target
The log information of rank, improves the aspect of user operation.
Fig. 6 is a kind of flow chart of the log recording method embodiment six according to an exemplary embodiment, as shown in fig. 6,
The method may include steps of:
In step s 601, monitor fault message.
In the present embodiment, when router failure, router generates fault message, and log recording apparatus monitor this fault
Information.
In step S602, described trigger message is generated according to described fault message.
Optionally, log recording apparatus determine fault type according to this fault message, determine needs according to fault type further
The target rank of log information of record and the time span of record, and generate triggering letter according to this target rank and time span
Breath.
In step S603, obtain the temporal information monitoring during described trigger message.
In step s 604, when described temporal information is identified, open the operation for recording described log information.
The rank generating in step S605, according to described interim debugging mode start recording Preset Time is more than or equal to described
The other log information of target level.
In in step S606, by described Preset Time, the log information of record is sent to server, and closes described interim tune
Die trial formula.
In the present embodiment, by generating fault message during router failure, triggering log recording apparatus record target automatically
The log information of rank, improves the promptness of fault detect.
Fig. 7 is a kind of block diagram of the log recording apparatus embodiment one according to an exemplary embodiment, as shown in fig. 7,
This device includes monitoring modular 71, opening module 72, logging modle 73.
Monitoring modular 71, is configured to monitor the trigger message for log information.
Opening module 72, is configured to, according to described trigger message, open interim debugging mode, described interim debugging mode
For when monitoring described trigger message, start recording log information.
Logging modle 73, is configured to according to the log information generating in described interim debugging mode start recording Preset Time.
The log recording apparatus that the present embodiment provides can be used for executing the technical scheme of embodiment of the method shown in Fig. 1.
In the present embodiment, by monitoring trigger message, interim debugging mode is opened according to the trigger message monitoring, interim
The log information that under debugging mode, start recording router generates in Preset Time, that is, router do not need persistence to record it
The gradational log information of institute being continuously generated, reduces the speed that router memory space is occupied full.
Fig. 8 is a kind of block diagram of the log recording apparatus embodiment two according to an exemplary embodiment, as shown in figure 8,
On the basis of embodiment illustrated in fig. 7, opening module 72 includes:Acquisition submodule 721, unlatching submodule 722.
Acquisition submodule 721, is configured to obtain temporal information when monitoring described trigger message.
Open submodule 722, be configured to, when described temporal information is identified, open and be used for recording described daily record letter
The operation of breath.
The log recording apparatus that the present embodiment provides can be used for executing the technical scheme of embodiment of the method shown in Fig. 2.
In the present embodiment, by opening the operation for log information, open interim debugging mode, improve unlatching and face
When debugging mode convenience.
Fig. 9 is a kind of block diagram of the log recording apparatus embodiment three according to an exemplary embodiment, as shown in figure 9,
Described trigger message includes the target rank of log information to be recorded;Logging modle 73, is configured to according to described interim
The rank generating in debugging mode start recording Preset Time is more than or equal to the other log information of described target level.
In addition, described trigger message also includes described Preset Time.
Described log recording apparatus also include:Sending module 74, closedown module 75.
Sending module 74, is configured to for the log information of record in described Preset Time to be sent to server.
Closedown module 75, is configured to sending module 74 and the log information of record in described Preset Time is sent to server
Afterwards, close described interim debugging mode.
The log recording apparatus that the present embodiment provides can be used for executing the technical scheme of embodiment of the method shown in Fig. 3, Fig. 4.
In the present embodiment, trigger message includes the target rank of log information to be recorded, to trigger log recording apparatus record
This corresponding log information of target rank, improves the motility of the log information of record different stage;True by trigger message
Determine the Preset Time of log information, be accurately controlled the time span of log recording apparatus log information;In addition,
The log information recording in Preset Time is sent to server it is ensured that in router memory space storage log information
Upload server is backed up in time, it is to avoid memory space leads to log information to be lost after being occupied full.
Figure 10 is a kind of block diagram of the log recording apparatus example IV according to an exemplary embodiment, as shown in Figure 10,
On the basis of embodiment illustrated in fig. 9, monitoring modular 71 includes:Monitoring submodule 711 and generation submodule 712.
Monitoring submodule 711, is configured to monitor the operation for log information of user's triggering.
Generate submodule 712, be configured to generate trigger message according to described operation.
Or, monitor submodule 711, be configured to monitor fault message;Generate submodule 712, be configured to according to institute
State fault message and generate described trigger message.
The log recording apparatus that the present embodiment provides can be used for executing the technical scheme of embodiment of the method shown in Fig. 5, Fig. 6.
In the present embodiment, by the operation of user's trigger recording log information, to trigger log recording apparatus record different target
The log information of rank, improves the aspect of user operation;By generating fault message during router failure, automatically
The triggering other log information of log recording apparatus record target level, improves the promptness of fault detect.
With regard to the log recording apparatus in above-described embodiment, the concrete mode that wherein modules, submodule execution operate is
Embodiment about the method is described in detail, explanation will be not set forth in detail herein.
The foregoing describe built-in function and the structure of log recording apparatus, as shown in figure 11, in practice, this log recording fills
Put and can achieve as router, including:
Processor;
It is configured to store the memorizer of processor executable;
Wherein, described processor is configured to:
Monitor the trigger message for log information;
According to described trigger message, open interim debugging mode, described interim debugging mode monitors described triggering letter for working as
During breath, start recording log information;
According to the log information generating in described interim debugging mode start recording Preset Time.
In the present embodiment, by monitoring trigger message, interim debugging mode is opened according to the trigger message monitoring, interim
The log information that under debugging mode, start recording router generates in Preset Time, that is, router do not need persistence to record it
The gradational log information of institute being continuously generated, reduces the speed that router memory space is occupied full.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to the other real of the disclosure
Apply scheme.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or
Adaptations follow the disclosure general principle and include the undocumented common knowledge in the art of the disclosure or
Conventional techniques.Description and embodiments be considered only as exemplary, the true scope of the disclosure and spirit by following power
Profit requires to point out.
It should be appreciated that the disclosure is not limited to be described above and precision architecture illustrated in the accompanying drawings, and can
To carry out various modifications and changes without departing from the scope.The scope of the present disclosure only to be limited by appended claim.
Claims (15)
1. a kind of log recording method is it is characterised in that methods described includes:
Monitor the trigger message for log information;
According to described trigger message, open interim debugging mode, described interim debugging mode monitors described triggering letter for working as
During breath, start recording log information;
According to the log information generating in described interim debugging mode start recording Preset Time.
2. method according to claim 1 it is characterised in that described according to described trigger message, open interim tune
Die trial formula, including:
Obtain the temporal information monitoring during described trigger message;
When described temporal information is identified, open the operation for recording described log information.
3. method according to claim 2 is it is characterised in that described trigger message includes log information to be recorded
Target rank;
The described log information according to generation in described interim debugging mode start recording Preset Time, including:
Described target level other day is more than or equal to according to the rank generating in described interim debugging mode start recording Preset Time
Will information.
4. the method according to any one of claim 1-3 it is characterised in that described trigger message also include described pre-
If the time.
5. method according to claim 4 it is characterised in that described according to described interim debugging mode start recording
After the log information generating in Preset Time, also include:
The log information of record in described Preset Time is sent to server, and closes described interim debugging mode.
6. method according to claim 5 is it is characterised in that described monitoring is used for the triggering letter of log information
Breath, including:
The operation for log information of monitoring user's triggering;
Trigger message is generated according to described operation.
7. method according to claim 5 is it is characterised in that described monitoring is used for the triggering letter of log information
Breath, including:
Monitoring fault message;
Described trigger message is generated according to described fault message.
8. a kind of log recording apparatus are it is characterised in that described device includes:
Monitoring modular, is configured to monitor the trigger message for log information;
Opening module, is configured to, according to described trigger message, open interim debugging mode, described interim debugging mode is used for
When monitoring described trigger message, start recording log information;
Logging modle, is configured to according to the log information generating in described interim debugging mode start recording Preset Time.
9. device according to claim 8 is it is characterised in that described opening module includes:
Acquisition submodule, is configured to obtain temporal information when monitoring described trigger message;
Open submodule, be configured to, when described temporal information is identified, open for recording described log information
Operation.
10. device according to claim 9 is it is characterised in that described trigger message includes log information to be recorded
Target rank;
Described logging modle, is configured to the rank according to generating in described interim debugging mode start recording Preset Time and is more than
Equal to the other log information of described target level.
11. according to Claim 8 the device described in -10 any one it is characterised in that described trigger message also include described
Preset Time.
12. devices according to claim 11 are it is characterised in that described device also includes:
Sending module, is configured to for the log information of record in described Preset Time to be sent to server;
Closedown module, is configured to described sending module and the log information of record in described Preset Time is sent to server
Afterwards, close described interim debugging mode.
13. devices according to claim 12 are it is characterised in that described monitoring modular includes:
Monitoring submodule, is configured to monitor the operation for log information of user's triggering;
Generate submodule, be configured to generate trigger message according to described operation.
14. devices according to claim 12 are it is characterised in that described monitoring modular includes:
Monitoring submodule, is configured to monitor fault message;
Generate submodule, be configured to generate described trigger message according to described fault message.
A kind of 15. routers are it is characterised in that include:
Processor;
It is configured to store the memorizer of processor executable;
Wherein, described processor is configured to:
Monitor the trigger message for log information;
According to described trigger message, open interim debugging mode, described interim debugging mode monitors described triggering letter for working as
During breath, start recording log information;
According to the log information generating in described interim debugging mode start recording Preset Time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610512901.8A CN106411563B (en) | 2016-06-30 | 2016-06-30 | Log recording method, device and router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610512901.8A CN106411563B (en) | 2016-06-30 | 2016-06-30 | Log recording method, device and router |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106411563A true CN106411563A (en) | 2017-02-15 |
CN106411563B CN106411563B (en) | 2019-11-15 |
Family
ID=58006770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610512901.8A Active CN106411563B (en) | 2016-06-30 | 2016-06-30 | Log recording method, device and router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106411563B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107239493A (en) * | 2017-04-28 | 2017-10-10 | 努比亚技术有限公司 | Mobile terminal and its offline logs processing method, computer-readable recording medium |
CN109213667A (en) * | 2018-09-17 | 2019-01-15 | 广东小天才科技有限公司 | Exception handling method of Android system and electronic equipment |
CN109640347A (en) * | 2019-02-28 | 2019-04-16 | 努比亚技术有限公司 | Journal file automatically grabs method, apparatus, mobile terminal and readable storage medium storing program for executing |
CN114520974A (en) * | 2022-01-11 | 2022-05-20 | 锐捷网络股份有限公司 | Network authentication system, network authentication method, cloud server and network equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103840953A (en) * | 2012-11-21 | 2014-06-04 | 中兴通讯股份有限公司 | Remote log real-time acquisition method and system |
CN103957133A (en) * | 2014-04-22 | 2014-07-30 | 北京联时空网络通信设备有限公司 | Log monitoring method and device |
CN104125115A (en) * | 2014-08-01 | 2014-10-29 | 浪潮(北京)电子信息产业有限公司 | Log information transferring method and device |
CN105159964A (en) * | 2015-08-24 | 2015-12-16 | 广东欧珀移动通信有限公司 | Log monitoring method and system |
CN105677689A (en) * | 2015-05-27 | 2016-06-15 | 深圳Tcl数字技术有限公司 | Log record method and device |
-
2016
- 2016-06-30 CN CN201610512901.8A patent/CN106411563B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103840953A (en) * | 2012-11-21 | 2014-06-04 | 中兴通讯股份有限公司 | Remote log real-time acquisition method and system |
CN103957133A (en) * | 2014-04-22 | 2014-07-30 | 北京联时空网络通信设备有限公司 | Log monitoring method and device |
CN104125115A (en) * | 2014-08-01 | 2014-10-29 | 浪潮(北京)电子信息产业有限公司 | Log information transferring method and device |
CN105677689A (en) * | 2015-05-27 | 2016-06-15 | 深圳Tcl数字技术有限公司 | Log record method and device |
CN105159964A (en) * | 2015-08-24 | 2015-12-16 | 广东欧珀移动通信有限公司 | Log monitoring method and system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107239493A (en) * | 2017-04-28 | 2017-10-10 | 努比亚技术有限公司 | Mobile terminal and its offline logs processing method, computer-readable recording medium |
CN109213667A (en) * | 2018-09-17 | 2019-01-15 | 广东小天才科技有限公司 | Exception handling method of Android system and electronic equipment |
CN109213667B (en) * | 2018-09-17 | 2022-07-26 | 广东小天才科技有限公司 | Exception handling method of Android system and electronic equipment |
CN109640347A (en) * | 2019-02-28 | 2019-04-16 | 努比亚技术有限公司 | Journal file automatically grabs method, apparatus, mobile terminal and readable storage medium storing program for executing |
CN114520974A (en) * | 2022-01-11 | 2022-05-20 | 锐捷网络股份有限公司 | Network authentication system, network authentication method, cloud server and network equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106411563B (en) | 2019-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105159964B (en) | A kind of log monitoring method and system | |
US8667334B2 (en) | Problem isolation in a virtual environment | |
US20190361759A1 (en) | System and method to identify failed points of network impacts in real time | |
US7917536B2 (en) | Systems, methods and computer program products for managing a plurality of remotely located data storage systems | |
CN103490917B (en) | The detection method of troubleshooting situation and device | |
CN101197621B (en) | Method and system for remote diagnosing and locating failure of network management system | |
CN106411563A (en) | Log recording method and device and router | |
CN103441861B (en) | A kind of data record generation method and device | |
CN102857371B (en) | A kind of dynamic allocation management method towards group system | |
CN109726071A (en) | System failure processing method, device, equipment and storage medium | |
CN107888397A (en) | The method and apparatus for determining fault type | |
CN101854505B (en) | Digital video recording and playback of user displays in a process control system | |
EP1759303A2 (en) | Agent-less systems, methods and computer program products for managing a plurality of remotely located data storage systems | |
US7451206B2 (en) | Send of software tracer messages via IP from several sources to be stored by a remote server | |
CN105530220B (en) | The interface method of two kinds of different agreement system communications is realized based on OPC | |
CN109254922B (en) | Automatic testing method and device for BMC Redfish function of server | |
CN108459951B (en) | Test method and device | |
CN110286998A (en) | Virtual machine graphics user interface comes into force, implementation procedure recording method and device | |
CN103701655A (en) | Fault self-diagnosis and self-recovery method and system for interchanger | |
CN104133915B (en) | Monitoring method and system for operation and maintenance behavior of database administrator | |
CN111143185A (en) | Log-based fault analysis method and device | |
CN107171861A (en) | A kind of information processing method, electronic equipment and computer-readable storage medium | |
US10831634B1 (en) | Replication of user interface events | |
CN103684917A (en) | Multi-target-machine system monitoring system and method | |
CN110011853A (en) | It is a kind of to check method and device towards multi-platform and cluster cross faults |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |