CN106326355B - Log processing method and device in a kind of LFS system - Google Patents
Log processing method and device in a kind of LFS system Download PDFInfo
- Publication number
- CN106326355B CN106326355B CN201610649070.9A CN201610649070A CN106326355B CN 106326355 B CN106326355 B CN 106326355B CN 201610649070 A CN201610649070 A CN 201610649070A CN 106326355 B CN106326355 B CN 106326355B
- Authority
- CN
- China
- Prior art keywords
- log
- current
- log information
- information list
- thread
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F19/00—Complete banking systems; Coded card-freed arrangements adapted for dispensing or receiving monies or the like and posting such transactions to existing accounts, e.g. automatic teller machines
- G07F19/20—Automatic teller machines [ATMs]
- G07F19/206—Software aspects at ATMs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses the log processing methods and device in a kind of LFS system, the system comprises AP layers, LFS manager, SP layers and device drive layers, which comprises obtains the current log text that the log write incoming interface that current process calls LFS manager to provide is passed to;The setting of log rank is carried out to current log text, the log rank is including any in debugging, information, warning, mistake, fatal error;Process number combination producing current log information by duplication current log text and corresponding log rank, with current process;Current log information, is written in log information list, and discharge the thread lock by the thread lock for obtaining log information list in memory by the thread lock;By log thread accesses log information list, wherein all log informations log server will be sent to by asynchronous dbus message, log informations all in log information list are written in current log file instruction log server.
Description
Technical field
Log processing method and device the present invention relates to financial technology field, in particular in a kind of LFS system.
Background technique
Currently, most financial terminal equipments, such as ATM machine, follow the CEN/ based on Windows operating system
XFS (Comit é Europ é en de Normalisation/eXtensions for Financial Services) specification,
CEN/XFS specification is the financial service extension specification that European Committee for Standardization formulates.And as linux system is gradually applied to
Have there is the XFS based on linux system and have realized system, referred to as LFS (Linux in more and more fields
Financial Services) system.
The method of log processing in existing LFS system, usually first calls log to be written before calling normal function
Directly journal file is written in log information by interface, if writing log not yet terminates, normal function below can not just start to hold
Row.And the operation of written document is generally all relatively slow, may result in the performance decline of system normal function, and once writes log hair
Raw mistake, normal function can be unable to get execution.Simultaneously as not carrying out process isolation operation, the stabilization of system is reduced
Property and scalability, and a large amount of log information is mixed in together, it is difficult to carry out the data analysis in later period.
Summary of the invention
For this purpose, the present invention provides the log processing scheme in a kind of LFS system, to try hard to solve or at least alleviate above
There are the problem of.
According to an aspect of the present invention, the log processing method in a kind of LFS system is provided, suitable for setting in financial terminal
For middle execution, it is populated with LFS system in the financial terminal equipment, and connect with log server telecommunication, LFS system includes
AP layers, LFS manager, SP layers and device drive layer, this method comprises the following steps: firstly, obtaining current process calls LFS pipe
The current log text that the log write incoming interface that reason device provides is passed to, current process are any in AP process and SP process
Kind;The setting of log rank is carried out to current log text, log rank is including in debugging, information, warning, mistake, fatal error
It is any;By duplication current log text and corresponding log rank, work as the day before yesterday with the process number combination producing of current process
Will information;The thread lock for obtaining log information list in memory, is written to log information for current log information by thread lock
In list, and discharge thread lock;By log thread accesses log information list, will wherein all log informations pass through it is asynchronous
Dbus message is sent to log server, and log informations all in log information list write-in is worked as the day before yesterday by instruction log server
In will file.
Optionally, in the log processing method in LFS system according to the present invention, further includes: created by current process
Build the write-in thread to current log information list write-in current log information.
Optionally, in the log processing method in LFS system according to the present invention, further includes: will by current process
The thread lock of log information list authorizes write-in thread.
Optionally, in the log processing method in LFS system according to the present invention, current log is believed by thread lock
It includes: that write-in thread passes through the list of thread lock access log information that storage is carried out in breath write-in log information list;Work as the day before yesterday
Will information is written in log information list, and log information list stores log information in a manner of round-robin queue.
Optionally, in the log processing method in LFS system according to the present invention, further includes: if current log information
In log rank be mistake and fatal error in it is any, then current log information is printed to the console of current process
On.
Optionally, in the log processing method in LFS system according to the present invention, believed by log thread accesses log
List is ceased, it includes: to send out to log thread that wherein all log informations, which are sent to log server by asynchronous dbus message,
The notice of current log information is stored in log information list out;After log thread is notified, log information list is obtained
Thread lock;All log informations are sent into the Summer Solstice or the Winter Solstice by thread lock access log information list, and by asynchronous dbus message
Will server.
Optionally, in the log processing method in LFS system according to the present invention, further includes: if log thread has been incited somebody to action
All log informations are sent to log server in log information list, then Clear Log information list, release log information column
The thread lock of table.
According to a further aspect of the invention, the log processing device in a kind of LFS system is provided, suitable for residing in finance
In terminal device, LFS system is populated in the financial terminal equipment, and connect with log server telecommunication, LFS system packet
AP layers, LFS manager, SP layers and device drive layer are included, which writes including acquisition module, setup module, generation module, first
Enter module and sending module.Wherein, it obtains module and is suitable for obtaining the log write incoming interface that current process calls LFS manager to provide
The current log text being passed to, current process are any one of AP process and SP process;Setup module is suitable for working as the day before yesterday
Will text carries out the setting of log rank, and log rank is including any in debugging, information, warning, mistake, fatal error;It generates
Module is suitable for working as the day before yesterday with the process number combination producing of current process by duplication current log text and corresponding log rank
Will information;First writing module is suitable for obtaining the thread lock of log information list in memory, is believed current log by thread lock
Breath is written in log information list, and discharges thread lock;Sending module is suitable for through the log information list of log thread accesses,
Wherein all log informations log server will be sent to by asynchronous dbus message, instruction log server arranges log information
In table in all log information write-in current log files.
Optionally, further include creation module in the log processing device in LFS system according to the present invention, be suitable for logical
It crosses current process and creates the write-in thread that current log information is written to current log information list.
Optionally, further include authorizing module in the log processing device in LFS system according to the present invention, be suitable for logical
It crosses current process and authorizes the thread lock of log information list to write-in thread.
Optionally, in the log processing device in LFS system according to the present invention, the first writing module is further fitted
In: write-in thread passes through the list of thread lock access log information;Current log information is written in log information list and is deposited
Storage, log information list store log information in a manner of round-robin queue.
It optionally, further include print module, suitable for working as in the log processing device in LFS system according to the present invention
When log rank in current log information is any in mistake and fatal error, current log information is printed to when advance
On the console of journey.
Optionally, in the log processing device in LFS system according to the present invention, sending module is further adapted for: to
Log thread issues the notice that current log information is stored in log information list;After log thread is notified, day is obtained
The thread lock of will information list;All logs are believed by thread lock access log information list, and by asynchronous dbus message
Breath is sent to log server.
It optionally, further include emptying module, suitable for working as in the log processing device in LFS system according to the present invention
When log informations all in log information list are sent to log server by log thread, Clear Log information list is released
Put the thread lock of log information list.
According to a further aspect of the invention, a kind of log server is provided, with multiple financial terminal equipment telecommunications
Connection, which includes receiving module, judgment module, the second writing module, profiling module and third writing module.Its
In, receiving module is suitable for receiving all log informations in the log information list that financial terminal equipment is sent;Judgment module is suitable
In the size for judging current log file whether be more than systemic presupposition value;Second writing module is suitable for working as the big of current log file
It is small current log information to be written in current log file when being less than systemic presupposition value, and add the write-in moment it is corresponding when
Between stab;Profiling module is suitable for when the size of current log file has been more than systemic presupposition value, and current log file is returned
Shelves processing;Third writing module is suitable for when the size of current log file has been more than systemic presupposition value, regenerates log text
Part current log information is written in new current log file as new current log file, and adds the write-in moment pair
The timestamp answered.
The technical solution of log processing in LFS system according to the present invention carries out the current log text got
The setting of log rank, and current log text and corresponding log rank are replicated, work as with the process number combination producing of current process
Current log information is written in log information list by the thread lock of log information list, then passed through by preceding log information
Log thread accesses log information list wherein using asynchronous dbus message will be sent to log server by all log informations,
Indicate that all log informations are written in current log file log server.In above-mentioned technical proposal, by current log information
The log information list being written in memory uses asynchronous process mode, while also being arranged log information using asynchronous dbus message
All log informations in table are sent to long-range log server, further ensure the asynchronism of log processing, improve
Performance, stability and the scalability of whole system.Moreover, including corresponding log rank in current log information and current
The process number of process, the tracking and data for being convenient for the later period are analyzed.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings
Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect
It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned
And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical
Component or element.
Fig. 1 shows the flow chart of the log processing method 100 in LFS system according to an embodiment of the invention;
Fig. 2 shows the schematic diagrames of the log processing device 200 in LFS system according to an embodiment of the invention;With
And
Fig. 3 shows the schematic diagram of log server 300 according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows the schematic diagram of the log processing method 100 in LFS system according to an embodiment of the invention.
Log processing method 100 in LFS system is suitable for executing in financial terminal equipment, and LFS system is populated in financial terminal equipment
System, including AP layers, LFS manager, SP layers and device drive layer.Wherein, AP layers are application layer, and AP is
The english abbreviation of Application Program, LFS manager are the financial service manager under linux system, and SP layers are
Layer is provided for service, SP is the english abbreviation of Service Provider.LFS manager is to AP layers of offer API
(Application Programming Interface) interface, SP layers provide SPI (Service to LFS manager
Provider Interface) interface.
As shown in Figure 1, method 100 is suitable for step S110.In step s 110, it obtains current process and calls LFS manager
The current log text that the log write incoming interface of offer is passed to, current process are any one of AP process and SP process.?
In the present embodiment, current process is SP process, and the log write incoming interface that current process calls LFS manager to provide is incoming to it
Log text.
Then, S120 is entered step.In the step s 120, the setting of log rank, journal stage are carried out to current log text
It Bao Kuo not debug, is information, warning, mistake, any in fatal error.In the present embodiment, it is set by calling trace function
Set the corresponding log rank of current log text, log rank is 5 kinds total, respectively debugging, information, warning, mistake and fatal
Mistake.Wherein, debugging refers to some Debugging message opened to debug whole system, can should in system stable operation
Category information is closed;Information refers to all key exercise points and its corresponding result;Warning refers to record and work as system close to one
A little Critical value resources have had already appeared that some resources are not enough or system mistake, are temporarily also unlikely to influence whole system
Operation but the information for needing to arouse attention;Some mistakes have occurred in misrepresentation system, and the information of mistake is recorded;It is fatal
Misrepresentation has had already appeared problem very serious, needs the information for stopping system.At this point, the log of current log text
Rank is mistake.In fact, can be according to content that current log text is recorded, corresponding current process inside trace function
Type etc. carry out the other setting of journal stage.After log rank is provided with, trace function will be verified and current log text
The correctness of relevant parameter.
In step s 130, the process number by duplication current log text and corresponding log rank, with current process
Combination producing current log information.If the log rank in current log information, will to be any in mistake and fatal error
Current log information prints on the console of current process.In the present embodiment, the process number pid=40 of current process, then
After being replicated current log text and corresponding log rank by memory using trace function, combined with the process number
Generate current log information, finally obtain a log rank be mistake, corresponding current process process number be 40 it is current
Log information.Since the log rank of the current log information is mistake, current log information is beaten by trace function
It prints on the console of current process.Current log letter is written at this point, creating by current process to current log information list
The write-in thread of breath authorizes the thread lock of log information list to the write-in thread, and the type of the thread lock is pthread_
mutex_t。
In step S140, the thread lock of log information list in memory is obtained, by thread lock by current log information
It is written in log information list, and discharges thread lock.Write-in thread passes through thread lock access log information list first, then will
It is stored in the write-in log information list of current log information, log information list stores log letter in a manner of round-robin queue
Breath.In the present embodiment, the thread lock for obtaining log information list in memory, by calling pthread_mutex_lock function
Carry out the locking operation of execution journal information list, at this time the accessible log information column of the write-in process of only current process creation
Table, which, which is written to current log information in log information list, stores.After write operation runs succeeded,
It calls pthread_mutex_unlock function to be unlocked log information list, thread lock is discharged, it is hereafter, other
Thread or process can access to log information list.
In step S150, by log thread accesses log information list, will wherein all log informations pass through it is asynchronous
Dbus message is sent to log server, and log informations all in log information list write-in is worked as the day before yesterday by instruction log server
In will file.Firstly, issuing the notice for storing current log information in log information list to log thread, log thread is received
To after the notice, the thread lock of log information list is obtained, then by the thread lock access log information list, and by asynchronous
All log informations are sent to log server by dbus message.In the present embodiment, it is called by trace function
Pthread_cond_signal function is issued in log list to the log thread and is stored to notify internal log thread
The message of current log information.After log thread receives this notice, the thread lock of log information list is obtained, and is passed through
Pthread_mutex_lock function is called to carry out the locking operation of execution journal information list, only having the log thread at this time can be with
Access log information list.Log information list is that log information is stored in a manner of round-robin queue, then log thread is to log
Information list executes the operation that circulation is read, and the log information being stored in log information list is successively read out, and lead to
It crosses and calls the dbus_connection_send function in asynchronous dbus message that log information is sent to long-range log clothes
Business device.If log informations all in log information list are sent to log server, Clear Log information by log thread
List discharges the thread lock of log information list.At this point, log thread dispatching pthread_mutex_unlock function is by thread
Lock release, other threads or process can access to log information list later.
It includes that judgement is current that log informations all in log information list are written in current log file log server
Whether the size of journal file is more than systemic presupposition value;If the size of current log file is less than systemic presupposition value, will work as
In preceding log information write-in current log file, and add write-in moment corresponding timestamp;If the size of current log file
It has been more than systemic presupposition value, then current log file has been subjected to filing processing, while has regenerated journal file and working as new
Preceding journal file current log information is written in new current log file, and adds write-in moment corresponding timestamp.?
In the present embodiment, it is illustrated by taking the log information that log server receives as an example, in this log information, log
Rank is mistake, and the process number of corresponding current process is 40.For long-range log server, in actual process
Log server process is first created, relevant journalizing is carried out by the process.If log rank is wrong or fatal error,
Then log server process prints log information on the console of log server.And the log of above-mentioned log information
Rank is mistake, therefore it is printed on the console of log server.Meanwhile log server process is to reception
Before the log information that arrives carries out write operation, need the size for first judging the current log file in log server whether be more than
Systemic presupposition value.Systemic presupposition value is 8192KB, and it has been more than to be that the current log file in log server, which is 8215KB, at this time
System preset value, therefore current log file is subjected to filing processing, and regenerate journal file as new current log text
Part, is mistake by log rank, and the log information that the process number of corresponding current process is 40 is written to new current log text
In part, and add write-in moment corresponding timestamp.It is 32 milliseconds of 34 minutes and 25 seconds 15 points of on May 9th, 2016 that the moment, which is written, is 24
Hour system, the corresponding timestamp for being accurate to millisecond is 1462779265032.In order to guarantee that current log is written in log information
The timeliness of file, log server process can also call fflush function to refresh journal file caching, to force to be written
Log information.
Fig. 2 shows the schematic diagrames of the log processing device 200 in LFS system according to an embodiment of the invention.Such as
Shown in Fig. 2, which includes: to obtain module 210, setup module 220, generation module 230, the first writing module 240 and send
Module 250.Log processing device 200 in LFS system further includes creation module, authorizes module, print module and empty module
(being not shown in figure).Wherein, creation module is located between generation module 230 and the first writing module 240, authorizes module and is located at
Between creation module and the first writing module 240, print module empties module and is located between generation module and creation module
After sending module 250.
Module 210 is obtained to work as suitable for what the log write incoming interface of acquisition current process calling LFS manager offer was passed to
Preceding log text, current process are any one of AP process and SP process.In the present embodiment, current process is SP process,
The log write incoming interface that current process calls LFS manager to provide, is passed to log text to it.
Setup module 220 be suitable for current log text carry out the setting of log rank, log rank include debugging, information,
It is warning, mistake, any in fatal error.In the present embodiment, current log text pair is set by calling trace function
The log rank answered, log rank is 5 kinds total, respectively debugging, information, warning, mistake and fatal error.At this point, working as the day before yesterday
The log rank of will text is mistake.In fact, can be according to content that current log text is recorded, right inside trace function
Type for the current process answered etc. carries out the other setting of journal stage.After log rank is provided with, trace function will verify with
The correctness of the relevant parameter of current log text.
Generation module 230 is suitable for through duplication current log text and corresponding log rank, the process with current process
Number combination producing current log information.In the present embodiment, the process number pid=40 of current process then uses trace function will
After current log text and corresponding log rank are replicated by memory, believe with the process number combination producing current log
Breath, finally obtain a log rank be mistake, corresponding current process process number be 40 current log information.
Print module is suitable for work as when the log rank in current log information is any in mistake and fatal error
Preceding log information prints on the console of current process.Creation module is suitable for creating by current process to current log information
The write-in thread of list write-in current log information.It authorizes module and is suitable for passing through current process for the thread lock of log information list
Authorize write-in thread.In the present embodiment, the log rank of current log information is mistake, therefore will be worked as by trace function
Preceding log information prints on the console of current process.It is write at this point, being created by current process to current log information list
The write-in thread for entering current log information authorizes the thread lock of log information list to the write-in thread, the type of the thread lock
For pthread_mutex_t.
First writing module 240 is suitable for obtaining the thread lock of log information list in memory, works as the day before yesterday by thread lock
Will information is written in log information list, and discharges thread lock.First writing module 240 is further adapted for write-in thread and passes through
Current log information is written in log information list and is stored by thread lock access log information list, log information list
Log information is stored in a manner of round-robin queue.In the present embodiment, the thread lock for obtaining log information list in memory, passes through
Pthread_mutex_lock function is called to carry out the locking operation of execution journal information list, at this time only current process creation
The accessible log information list of write-in process, which, which is written to current log information in log information list, carries out
Storage.After write operation runs succeeded, pthread_mutex_unlock function is called to be unlocked log information list,
Thread lock is discharged, hereafter, other threads or process can access to log information list.
Sending module 250 is suitable for through the log information list of log thread accesses, will wherein all log informations pass through it is different
Step dbus message is sent to log server, and instruction log server log informations all in log information list is written current
In journal file.Sending module 250, which is further adapted for issuing to log thread, stores current log letter in log information list
The notice of breath after log thread is notified, obtains the thread lock of log information list, is arranged by thread lock access log information
Table, and all log informations are sent to by log server by asynchronous dbus message.In the present embodiment, pass through trace letter
Number issues log list to the log thread come the log thread for calling pthread_cond_signal function to notify internal
In store the message of current log information.After log thread receives this notice, the thread of log information list is obtained
Lock, and by calling pthread_mutex_lock function come the locking operation of execution journal information list, only have the day at this time
The accessible log information list of will thread.Log information list is that log information is stored in a manner of round-robin queue, then log
Thread executes the operation that circulation is read to log information list, and the log information being stored in log information list is successively read
Out, and by calling the dbus_connection_send function in asynchronous dbus message to be sent to log information remotely
Log server.
Module is emptied to be suitable for that log informations all in log information list are sent to log server when log thread
When, Clear Log information list discharges the thread lock of log information list.In the present embodiment, if log thread is by log
All log informations are sent to log server in information list, then Clear Log information list, release log information list
Thread lock.At this point, log thread dispatching pthread_mutex_unlock function discharges thread lock, later other threads or
Process can access to log information list.
Fig. 3 shows the schematic diagram of log server 300 according to an embodiment of the invention.As shown in figure 3, the device
It include: receiving module 310, judgment module 320, the second writing module 330, profiling module 340 and third writing module 350.
Receiving module 310 is suitable for receiving all log informations in the log information list that financial terminal equipment is sent.
Judgment module 320 is suitable for judging whether the size of current log file is more than systemic presupposition value.In the present embodiment,
Systemic presupposition value is 8192KB.
Second writing module 330 is suitable for when the size of current log file is less than systemic presupposition value, by current log
Information is written in current log file, and adds write-in moment corresponding timestamp.
Profiling module 340 is suitable for when the size of current log file has been more than systemic presupposition value, by current log file
Carry out filing processing.In the present embodiment, the current log file in log server is 8215KB, has been more than systemic presupposition
Value, therefore current log file is subjected to filing processing.
Third writing module 350 is suitable for when the size of current log file has been more than systemic presupposition value, regenerates day
Will file is as new current log file, when current log information being written in new current log file, and adding write-in
Carve corresponding timestamp.In the present embodiment, it since the size of current log file has been more than systemic presupposition value, then regenerates
Log rank is mistake, the day that the process number of corresponding current process is 40 as new current log file by journal file
Will information is written in new current log file, and adds write-in moment corresponding timestamp.The write-in moment is in May, 2016
9 days 15 points 25 seconds 34 minutes 32 milliseconds, the corresponding timestamp for being accurate to millisecond is 1462779265032.In order to guarantee log
The timeliness of current log file is written in information, and it is slow to refresh journal file that log server process can also call fflush function
It deposits, to force write-in log information.
About the specific steps and embodiment of log processing, it has been disclosed in detail in the description based on Fig. 1, herein not
It repeats again.
The method of log processing in existing LFS system usually first calls log write before calling normal function
Incoming interface, is directly written journal file for log information, does not carry out process isolation operation, and exists a large amount of mixed in together
Log information.The technical solution of log processing in LFS system according to an embodiment of the present invention, current log information is written
Log information list in memory uses asynchronous process mode, while will also be in log information list using asynchronous dbus message
All log informations be sent to long-range log server, further ensure the asynchronism of log processing.In addition, passing through
Dbus message separates log write incoming interface and the access interface of the journal file in long-range log server, ensure that IO
Mistake and performance bottleneck do not interfere with the normal function of system, mistake have not only been isolated, but also improve performance, provide well
Scalability.Moreover, including the process number of corresponding log rank and current process in current log information, it can be compared
His journal file, the tracking and data for being convenient for the later period are analyzed.
B11. the device as described in B10 further includes authorizing module, suitable for passing through current process for the line of log information list
Journey lock authorizes said write thread.
B12. device as described in b11, first writing module are further adapted for:
Write-in thread passes through the thread lock access log information list;
Current log information is written in log information list and is stored, the log information list is with round-robin queue
Mode stores log information.
B13. the device as described in any one of B9-12 further includes print module, suitable for when the day in current log information
When will rank is any in mistake and fatal error, current log information is printed on the console of current process.
B14. the device as described in any one of B9-12, the sending module are further adapted for:
The notice that current log information is stored in log information list is issued to log thread;
After log thread receives the notice, the thread lock of log information list is obtained;
All log informations are sent to by the thread lock access log information list, and by asynchronous dbus message
Log server.
B15. the method as described in B14 further includes emptying module, is suitable for when log thread is by institute in log information list
When having log information to be sent to log server, Clear Log information list discharges the thread lock of log information list.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, knot is not been shown in detail
Structure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims than feature more features expressly recited in each claim.More precisely, as following
As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it abides by
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
As a separate embodiment of the present invention.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple
Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment
The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method
The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice
Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by
Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc.
Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must
Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from
It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that
Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit
Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this
Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this
Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.
Claims (15)
1. the log processing method in a kind of LFS system, suitable for being executed in financial terminal equipment, in the financial terminal equipment
Be populated with LFS system, and connect with log server telecommunication, the system comprises AP layers, LFS manager, SP layers and set
Standby driving layer, which comprises
The current log text that the log write incoming interface that current process calls LFS manager to provide is passed to is obtained, it is described current
Process is any one of AP process and SP process;
The type of the content and corresponding current process that are recorded according to current log text carries out log to current log text
Rank setting, the log rank is including any in debugging, information, warning, mistake, fatal error;
By duplication current log text and corresponding log rank, believe with the process number combination producing current log of current process
Breath;
The thread lock for obtaining log information list in memory, is written to log information for current log information by the thread lock
In list, and discharge the thread lock;
By log thread accesses log information list, wherein all log informations log will be sent to by asynchronous dbus message
Log informations all in log information list are written in current log file for server, instruction log server.
2. the method as described in claim 1, further includes:
The write-in thread that current log information is written to current log information list is created by current process.
3. method according to claim 2, further includes:
The thread lock of log information list is authorized to said write thread by current process.
4. method as claimed in claim 3, described that current log information is written to log information column by the thread lock
Include: in table
Write-in thread passes through the thread lock access log information list;
Current log information is written in log information list and is stored, the log information list is in a manner of round-robin queue
Store log information.
5. such as method of any of claims 1-4, further includes:
If log rank in current log information be it is any in mistake and fatal error, current log information is printed to
On the console of current process.
6. it is described by log thread accesses log information list such as method of any of claims 1-4, it will wherein
All log informations are sent to log server by asynchronous dbus message
The notice that current log information is stored in log information list is issued to log thread;
After log thread receives the notice, the thread lock of log information list is obtained;
All log informations are sent to log by the thread lock access log information list, and by asynchronous dbus message
Server.
7. method as claimed in claim 6, further includes:
If log informations all in log information list are sent to log server, Clear Log information column by log thread
Table discharges the thread lock of log information list.
8. such as method of any of claims 1-4, the log server is by logs all in log information list
Include: in information write-in current log file
Whether the size for judging current log file is more than systemic presupposition value;
If the size of current log file is less than systemic presupposition value, the current log file is written into current log information
In, and add write-in moment corresponding timestamp;
If the size of current log file has been more than systemic presupposition value, the current log file is subjected to filing processing, together
When regenerate journal file as new current log file, current log information is written in new current log file,
And add write-in moment corresponding timestamp.
9. the log processing device in a kind of LFS system, suitable for residing in financial terminal equipment, in the financial terminal equipment
Be populated with LFS system, and connect with log server telecommunication, the system comprises AP layers, LFS manager, SP layers and set
Standby driving layer, described device include:
Module is obtained, the current log being passed to suitable for obtaining the log write incoming interface that current process calls LFS manager to provide
Text, the current process are any one of AP process and SP process;
Setup module, suitable for the type of the content and corresponding current process that are recorded according to current log text, to working as the day before yesterday
Will text carries out the setting of log rank, and the log rank is including any in debugging, information, warning, mistake, fatal error;
Generation module is suitable for combining by duplication current log text and corresponding log rank with the process number of current process
Generate current log information;
First writing module, suitable for obtaining the thread lock of log information list in memory, by the thread lock by current log
Information is written in log information list, and discharges the thread lock;
Sending module is suitable for through the log information list of log thread accesses, wherein will pass through asynchronous dbus by all log informations
Message is sent to log server, and instruction log server is literary by log informations all in log information list write-in current log
In part.
10. device as claimed in claim 9 further includes creation module, believe suitable for being created by current process to current log
Cease the write-in thread of list write-in current log information.
11. device as claimed in claim 10 further includes authorizing module, suitable for passing through current process for log information list
Thread lock authorizes said write thread.
12. device as claimed in claim 11, first writing module is further adapted for:
Write-in thread passes through the thread lock access log information list;
Current log information is written in log information list and is stored, the log information list is in a manner of round-robin queue
Store log information.
13. the device as described in any one of claim 9-12 further includes print module, suitable for when in current log information
When log rank is any in mistake and fatal error, current log information is printed on the console of current process.
14. the device as described in any one of claim 9-12, the sending module is further adapted for:
The notice that current log information is stored in log information list is issued to log thread;
After log thread receives the notice, the thread lock of log information list is obtained;
All log informations are sent to log by the thread lock access log information list, and by asynchronous dbus message
Server.
15. device as claimed in claim 14 further includes emptying module, it is suitable for when log thread is by log information list
In all log informations when being sent to log server, Clear Log information list discharges the thread lock of log information list.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610649070.9A CN106326355B (en) | 2016-08-09 | 2016-08-09 | Log processing method and device in a kind of LFS system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610649070.9A CN106326355B (en) | 2016-08-09 | 2016-08-09 | Log processing method and device in a kind of LFS system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106326355A CN106326355A (en) | 2017-01-11 |
| CN106326355B true CN106326355B (en) | 2019-10-18 |
Family
ID=57739813
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610649070.9A Active CN106326355B (en) | 2016-08-09 | 2016-08-09 | Log processing method and device in a kind of LFS system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106326355B (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109658588A (en) * | 2019-01-25 | 2019-04-19 | 浪潮金融信息技术有限公司 | A method of realizing that intelligence configures can recognize banknote |
| CN110008103B (en) * | 2019-04-10 | 2020-11-10 | 苏州浪潮智能科技有限公司 | Log collection method, system, device and storage medium for third-party application program |
| CN110333958A (en) * | 2019-06-28 | 2019-10-15 | 烽火通信科技股份有限公司 | A kind of method and system based on DBus signal management thread |
| CN111176968B (en) * | 2019-12-30 | 2023-04-25 | 东软集团股份有限公司 | Method and device for generating log file and related products |
| CN111935248B (en) * | 2020-07-22 | 2023-12-29 | 浪潮金融信息技术有限公司 | SP remote file transfer method |
| CN113886210A (en) * | 2021-10-21 | 2022-01-04 | 江苏域固威芯科技有限公司 | A method for quickly reading audit logs on BMC webpage based on dbus communication |
| CN114817185B (en) * | 2022-04-01 | 2026-01-06 | 中汽创智科技有限公司 | A message-driven asynchronous log processing method |
| CN114741036A (en) * | 2022-04-25 | 2022-07-12 | 扬州航盛科技有限公司 | Log management method under heterogeneous multi-core processor |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104375841A (en) * | 2014-12-03 | 2015-02-25 | 广州广电运通金融电子股份有限公司 | Structure and implementation method based on CEN/XFS standard of linux system |
| CN105408895A (en) * | 2013-06-22 | 2016-03-16 | 微软技术许可有限责任公司 | Latch-free, log-structured storage for multiple access methods |
| CN105574205A (en) * | 2016-01-18 | 2016-05-11 | 国家电网公司 | Dynamic log analyzing system for distributed computing environment |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9311327B1 (en) * | 2011-06-30 | 2016-04-12 | Emc Corporation | Updating key value databases for virtual backups |
| US10949401B2 (en) * | 2014-06-25 | 2021-03-16 | Vmware, Inc. | Data replication in site recovery environment |
-
2016
- 2016-08-09 CN CN201610649070.9A patent/CN106326355B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105408895A (en) * | 2013-06-22 | 2016-03-16 | 微软技术许可有限责任公司 | Latch-free, log-structured storage for multiple access methods |
| CN104375841A (en) * | 2014-12-03 | 2015-02-25 | 广州广电运通金融电子股份有限公司 | Structure and implementation method based on CEN/XFS standard of linux system |
| CN105574205A (en) * | 2016-01-18 | 2016-05-11 | 国家电网公司 | Dynamic log analyzing system for distributed computing environment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106326355A (en) | 2017-01-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106326355B (en) | Log processing method and device in a kind of LFS system | |
| DE60108851T2 (en) | MULTI-CHANNEL, MULTI-SERVICE TROUBLESHOOTING IN PIPELINE CPU ARCHITECTURE | |
| US20060212759A1 (en) | Conformance testing of multi-threaded and distributed software systems | |
| US20080320437A1 (en) | Constructing Petri Nets from traces for diagnostics | |
| US6928378B2 (en) | Stress testing at low cost through parallel execution of unit tests | |
| CN113051155A (en) | Control system and control method of automatic test platform | |
| JP7309306B2 (en) | Formal verification method, system, computer equipment and readable storage medium for certificate storage smart contract | |
| US20100125758A1 (en) | Distributed system checker | |
| EP3864547B1 (en) | Method for detecting safety-relevant data flows | |
| CN101727394A (en) | Method and device for testing performance of memory device | |
| CN109274782A (en) | A kind of method and device acquiring website data | |
| CN112149109A (en) | Modularized authority control management method and system | |
| CN106817388A (en) | The system that virtual machine, host obtain the method, device and access data of data | |
| CN106293966B (en) | The AP layers of communication means and LFS system with SP layers in a kind of LFS system | |
| US8887241B2 (en) | Virtual roles | |
| EP2163956A1 (en) | Method for providing control information for a distributed operation in an automation system, computer program and automation system | |
| CN106649000B (en) | Fault recovery method of real-time processing engine and corresponding server | |
| Ter Beek et al. | Formal verification of an automotive scenario in service-oriented computing | |
| CN114491662B (en) | Block chain-based data asset auditing method, system and equipment | |
| CN101425034A (en) | Log recording method and log system | |
| CN107526672A (en) | A kind of method and device of data record | |
| US20160283050A1 (en) | Adaptive tour interface engine | |
| CN111045891B (en) | Monitoring method, device, equipment and storage medium based on java multithreading | |
| Fischer et al. | Combining CSP and Object-Z: Finite or infinite trace semantics? | |
| Kofron | Checking software component behavior using behavior protocols and spin |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |