[go: up one dir, main page]

CN106326355A - Log processing method and device in LFS (Linux Financial Services) system - Google Patents

Log processing method and device in LFS (Linux Financial Services) system Download PDF

Info

Publication number
CN106326355A
CN106326355A CN201610649070.9A CN201610649070A CN106326355A CN 106326355 A CN106326355 A CN 106326355A CN 201610649070 A CN201610649070 A CN 201610649070A CN 106326355 A CN106326355 A CN 106326355A
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.)
Granted
Application number
CN201610649070.9A
Other languages
Chinese (zh)
Other versions
CN106326355B (en
Inventor
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Technology Co Ltd
Original Assignee
Wuhan Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Technology Co Ltd filed Critical Wuhan Technology Co Ltd
Priority to CN201610649070.9A priority Critical patent/CN106326355B/en
Publication of CN106326355A publication Critical patent/CN106326355A/en
Application granted granted Critical
Publication of CN106326355B publication Critical patent/CN106326355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F19/00Complete 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/20Automatic teller machines [ATMs]
    • G07F19/206Software 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 a log processing method and device in an LFS (Linux Financial Services) system. The system comprises an AP (Application Program) layer, an LFS manager, an SP (Service Provider) layer and an equipment driving layer. The method comprises: acquiring a current log file which is input by calling a log writing-in interface, provided by the LFS manager, in a current progress; carrying out log level setting on the current log file, wherein the log level comprises any one of debugging, information, warning, an error and a fatal error; copying the current log file and the corresponding log level and combining with a progress number of the current progress to generate current log information; acquiring a thread lock of a log information list in an internal memory; writing the current log information into the log information list through the thread lock and releasing the thread lock; accessing the log information list through a log thread, and sending all the log information into a log server through an asynchronous dbus message; indicating the log server to write all the log information in the log information list into the current log file.

Description

Log processing method in a kind of LFS system and device
Technical field
The present invention relates to financial technology field, particularly to the log processing method in a kind of LFS system and device.
Background technology
At present, overwhelming majority financial terminal equipment, such as ATM etc., all follow 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 along with linux system is gradually applied to Increasing field, has occurred in that the XFS based on linux system realizes system, referred to as LFS (Linux Financial Services) system.
The method of log processing in existing LFS system, is usually and first called daily record write before calling normal function Interface, directly writes journal file by log information, not yet terminates if writing daily record, and normal function below just cannot start to hold OK.And the operation of written document is general the slowest, may result in the hydraulic performance decline of system normal function, and once write daily record and send out Raw mistake, normal function can cannot be performed.Simultaneously as do not carry out process isolation operation, reduce stablizing of system Property and extensibility, and substantial amounts of log information is mixed in together, it is difficult to carry out the data analysis in later stage.
Summary of the invention
To this end, the present invention provides the log processing scheme in a kind of LFS system, to try hard to solve or at least alleviate above The problem existed.
According to an aspect of the present invention, it is provided that the log processing method in a kind of LFS system, be suitable to set at financial terminal Standby middle execution, is populated with LFS system, and is connected with log server telecommunication in this financial terminal equipment, LFS system includes AP layer, LFS manager, SP layer and device drive layer, first the method comprises the steps:, obtains current process and calls LFS pipe The incoming current log text of log write incoming interface that reason device provides, current process is arbitrary in AP process and SP process Kind;Current log text carries out daily record rank setting, and daily record rank includes in debugging, information, warning, mistake, fatal error Any one;By replicating current log text and corresponding daily record rank, work as the day before yesterday with the process number combination producing of current process Will information;Obtain the thread lock of log information list in internal memory, by thread lock, current log information is written to log information In list, and discharge thread lock;By daily record thread accesses log information list, the most all log informations are passed through asynchronous Dbus message sends to log server, and all log informations write in log information list is worked as the day before yesterday by instruction log server In will file.
Alternatively, in the log processing method in the LFS system according to the present invention, also include: created by current process Build the write thread to current log information list write current log information.
Alternatively, in the log processing method in the LFS system according to the present invention, also include: will by current process The thread lock of log information list authorizes write thread.
Alternatively, in the log processing method in the LFS system according to the present invention, by thread lock, current log is believed Breath write log information list carries out storage include: write thread is by thread lock access 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 the way of round-robin queue.
Alternatively, in the log processing method in the LFS system according to the present invention, also include: if current log information In daily record rank be mistake and fatal error in any one, then current log information is printed to the control station of current process On.
Alternatively, in the log processing method in the LFS system according to the present invention, believed by daily record thread accesses daily record Breath list, is included the most all of log information to log server by the transmission of asynchronous dbus message: send out to daily record thread Go out the notice storing current log information in log information list;After daily record thread is notified, obtain log information list Thread lock;By thread lock access log information list, and by asynchronous dbus message, all log informations are sent the Summer Solstice or the Winter Solstice Will server.
Alternatively, in the log processing method in the LFS system according to the present invention, also include: if daily record thread will In log information list, all log informations send to log server, then Clear Log information list, release log information row The thread lock of table.
According to a further aspect of the invention, it is provided that the log processing device in a kind of LFS system, be suitable to reside in finance In terminal unit, this financial terminal equipment is populated with LFS system, and is connected with log server telecommunication, LFS system bag Including AP layer, LFS manager, SP layer and device drive layer, this device includes acquisition module, arranges module, generation module, first writes Enter module and sending module.Wherein, acquisition module be suitable to obtain current process call LFS manager provide log write incoming interface Incoming current log text, current process is any one in AP process and SP process;Arrange module to be suitable to working as the day before yesterday Will text carries out daily record rank setting, and daily record rank includes any one in debugging, information, warning, mistake, fatal error;Generate Module is suitable to, by replicating current log text and corresponding daily record rank, work as the day before yesterday with the process number combination producing of current process Will information;First writing module is suitable to obtain the thread lock of log information list in internal memory, is believed by current log by thread lock Breath is written in log information list, and discharges thread lock;Sending module is suitable to by daily record thread accesses log information list, Being sent to log server by asynchronous dbus message by the most all log informations, log information is arranged by instruction log server In table in all log informations write current log file.
Alternatively, in the log processing device in the LFS system according to the present invention, also include creation module, be suitable to lead to Cross current process and create the write thread to current log information list write current log information.
Alternatively, in the log processing device in the LFS system according to the present invention, also include authorizing module, be suitable to lead to Cross current process and authorize write thread by the thread lock of log information list.
Alternatively, in the log processing device in the LFS system according to the present invention, the first writing module is fitted further In: write thread is by thread lock access log information list;The write log information list of current log information will be deposited Storage, log information list stores log information in the way of round-robin queue.
Alternatively, in the log processing device in the LFS system according to the present invention, also include print module, be suitable to work as Daily record rank in current log information be mistake and fatal error in any one time, current log information is printed to when advance On the control station of journey.
Alternatively, in the log processing device in the LFS system according to the present invention, sending module is further adapted for: to Daily record thread sends the notice storing current log information in log information list;After daily record thread is notified, obtain day The thread lock of will information list;By thread lock access log information list, and by asynchronous dbus message, all daily records are believed Breath sends to log server.
Alternatively, in the log processing device in the LFS system according to the present invention, also include emptying module, be suitable to work as When all log informations in log information list are sent to log server by daily record thread, Clear Log information list, release Put the thread lock of log information list.
According to a further aspect of the invention, it is provided that a kind of log server, with multiple financial terminal equipment telecommunications Connecting, this log server includes receiver module, judge module, the second writing module, profiling module and the 3rd writing module.Its In, receiver module is suitable to receive all log informations in the log information list that financial terminal equipment sends;Judge module is fitted Systemic presupposition value whether is exceeded in the size judging current log file;It is big that second writing module is suitable to when current log file Little not less than systemic presupposition value time, by current log information write current log file in, and add write the moment corresponding time Between stab;Profiling module is suitable to, when the size of current log file has exceeded systemic presupposition value, be returned by current log file Shelves process;3rd writing module is suitable to when the size of current log file has exceeded systemic presupposition value, regenerates daily record literary composition Current log information, as new current log file, is write in new current log file by part, and adds the write moment pair The timestamp answered.
The technical scheme of the log processing in LFS system according to the present invention, is carried out the current log text got Daily record rank is arranged, and replicates current log text and corresponding daily record rank, works as with the process number combination producing of current process Front log information, is written to current log information in log information list by the thread lock of log information list, then passes through The most all log informations are utilized asynchronous dbus message to send to log server by daily record thread accesses log information list, Instruction log server is by all log informations write current log file.In technique scheme, by current log information Log information list in write internal memory have employed asynchronous process mode, the most also utilizes asynchronous dbus message to be arranged by log information All log informations in table send to long-range log server, further ensure the asynchronism of log processing, improve The performance of whole system, stability and extensibility.And, current log information includes the daily record rank of correspondence with current The process number of process, it is simple to carry out tracking and the data analysis in later stage.
Accompanying drawing explanation
In order to realize above-mentioned and relevant purpose, herein in conjunction with explained below and accompanying drawing, some illustrative side is described Face, these aspects indicate can to put into practice the various modes of principles disclosed herein, and all aspects and equivalence aspect It is intended to fall under in the range of theme required for protection.By reading in conjunction with the accompanying detailed description below, the disclosure above-mentioned And other purpose, feature and advantage will be apparent from.Throughout the disclosure, identical reference generally refers to identical Parts 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 diagram 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.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys 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 to perform in financial terminal equipment, is populated with LFS system in financial terminal equipment System, including AP layer, LFS manager, SP layer and device drive layer.Wherein, AP layer is application layer, and AP is The english abbreviation of Application Program, LFS manager is the financial service manager under linux system, and SP layer is i.e. Thering is provided layer for service, SP is the english abbreviation of Service Provider.LFS manager provides API to AP layer (Application Programming Interface) interface, SP layer provides SPI (Service to LFS manager Provider Interface) interface.
As it is shown in figure 1, method 100 is suitable to step S110.In step s 110, obtain current process and call LFS manager The incoming current log text of log write incoming interface provided, current process is any one in AP process and SP process.? In the present embodiment, current process is SP process, and current process calls the log write incoming interface that LFS manager provides, incoming to it Daily record text.
Subsequently, step S120 is entered.In the step s 120, current log text is carried out daily record rank setting, journal stage Do not include any one in debugging, information, warning, mistake, fatal error.In the present embodiment, set by calling trace function Putting the daily record rank that current log text is corresponding, daily record rank amounts to 5 kinds, is respectively debugging, information, warning, mistake and fatal Mistake.Wherein, some Debugging message that debugging refers to debug whole system and opens, can will be somebody's turn to do when system stable operation Category information is closed;Information refers to all key exercises point and corresponding result thereof;Warning refers to record when system is close to one A little Critical value resources or occurred in that some resources are not enough or system mistake, are the most also unlikely to affect whole system Run but need the information aroused attention;Misrepresentation system there occurs some mistakes, the information of mistake is recorded;Fatal Misrepresentation has occurred in that the most serious problem, needs information system stopped.Now, the daily record of current log text Rank is mistake.It practice, the content that can be recorded according to current log text inside trace function, corresponding current process Type etc. carry out the other setting of journal stage.After daily record rank is provided with, trace function will verification and current log text The correctness of relevant parameter.
In step s 130, by replicating current log text and corresponding daily record rank, with the process number of current process Combination producing current log information.If the daily record rank in current log information is any one in mistake and fatal error, then will Current log information prints on the control station of current process.In the present embodiment, the process number pid=40 of current process, then After using trace function current log text and corresponding daily record rank to be replicated by internal memory, combine with this process number Generate current log information, finally give the process number that daily record rank is wrong, corresponding current process be 40 current Log information.Owing to the daily record rank of this current log information is mistake, therefore by trace function, current log information is beaten Print on the control station of current process.Now, created to current log information list write current log letter by current process The write thread of breath, authorizes this write thread by the thread lock of log information list, and the type of this thread lock is pthread_ mutex_t。
In step S140, obtain the thread lock of log information list in internal memory, by thread lock by current log information It is written in log information list, and discharges thread lock.Write thread first passes through thread lock access log information list, then will Storing in the write log information list of current log information, log information list stores daily record letter in the way of round-robin queue Breath.In the present embodiment, the thread lock of log information list in internal memory is obtained, by calling pthread_mutex_lock function That carrys out execution journal information list adds latching operation, and the write process that the most only current process creates can arrange with access log information Table, current log information is written in log information list store by this write process.After write operation runs succeeded, Call pthread_mutex_unlock function log information list is unlocked, thread lock is discharged, hereafter, other Log information list can be conducted interviews by thread or process.
In step S150, by daily record thread accesses log information list, the most all log informations are passed through asynchronous Dbus message sends to log server, and all log informations write in log information list is worked as the day before yesterday by instruction log server In will file.First, sending the notice storing current log information in log information list to daily record thread, daily record thread is received After this notice, obtain the thread lock of log information list, then by this thread lock access log information list, and by asynchronous All log informations are sent to log server by dbus message.In the present embodiment, called by trace function Pthread_cond_signal function, with the daily record thread within notice, sends in log list to this daily record thread and stores The message of current log information.After daily record thread receives this notice, obtain the thread lock of log information list, and pass through That calls that pthread_mutex_lock function carrys out execution journal information list adds latching operation, now only has this daily record thread permissible Access log information list.Log information list is to store log information in the way of round-robin queue, then daily record thread is to daily record Information list performs the operation that circulation is read, and the log information that will be stored in log information list is successively read out, and leads to Cross the dbus_connection_send function called in asynchronous dbus message and log information is sent to long-range daily record clothes Business device.If all log informations in log information list are sent to log server by daily record thread, then Clear Log information List, the thread lock of release log information list.Now, daily record thread dispatching pthread_mutex_unlock function is by thread Lock release, log information list can be conducted interviews by other thread or process afterwards.
All log informations write current log file in log information list is included judging currently by log server Whether the size of journal file exceedes systemic presupposition value;If the size of current log file is not less than systemic presupposition value, then ought In front log information write current log file, and add write timestamp corresponding to moment;If the size of current log file Exceed systemic presupposition value, then current log file has been carried out filing process, regenerated journal file simultaneously and work as new Front journal file, by the current log information new current log file of write, and adds timestamp corresponding to write moment.? In the present embodiment, illustrate as a example by the log information that log server receives, in this log information, daily record Rank is mistake, and the process number of corresponding current process is 40.For long-range log server, in actual process First create log server process, carried out the journalizing being correlated with by this process.If daily record rank is mistake or fatal error, Then log information is printed on the control station of log server by log server process.And the daily record of above-mentioned log information Rank is mistake, therefore it is printed on the control station of log server.Meanwhile, log server process is to reception To log information carry out write operation before, need whether the size first judging the current log file in log server exceedes Systemic presupposition value.Systemic presupposition value is 8192KB, and now the current log file in log server is 8215KB, has exceeded and is System preset value, therefore carries out current log file filing process, and regenerates journal file as new current log literary composition Part, is mistake by daily record rank, and the log information that process number is 40 of corresponding current process is written to new current log literary composition In part, and add write timestamp corresponding to moment.The write moment is 15: 34: 25 on the 9th May in 2016 32 milliseconds, is 24 Hour system, the timestamp being accurate to millisecond of its correspondence is 1462779265032.In order to ensure that log information writes current log The promptness of file, log server process also can be called fflush function and cache to refresh journal file, thus force write Log information.
Fig. 2 shows the schematic diagram of the log processing device 200 in LFS system according to an embodiment of the invention.As Shown in Fig. 2, this device includes: acquisition module 210, arrange module 220, generation module the 230, first writing module 240 and send Module 250.Log processing device 200 in LFS system also includes creation module, authorizes module, print module and empty module (the most not shown in figure).Wherein, creation module, between generation module 230 and the first writing module 240, is authorized module and is positioned at Between creation module and the first writing module 240, print module, between generation module and creation module, empties module and is positioned at After sending module 250.
Acquisition module 210 is suitable to obtain current process and calls incoming the working as of log write incoming interface that LFS manager provides Front daily record text, current process is any one in AP process and SP process.In the present embodiment, current process is SP process, Current process calls the log write incoming interface that LFS manager provides, to its incoming daily record text.
Module 220 is set and is suitable to current log text is carried out daily record rank setting, daily record rank include debugging, information, In warning, mistake, fatal error any one.In the present embodiment, current log text pair is set by calling trace function The daily record rank answered, daily record rank amounts to 5 kinds, is respectively debugging, information, warning, mistake and fatal error.Now, worked as the day before yesterday The daily record rank of will text is mistake.It practice, it is the content that can be recorded according to current log text inside trace function, right The type etc. of the current process answered carries out the other setting of journal stage.After daily record rank is provided with, trace function will verification with The correctness of the parameter that current log text is relevant.
Generation module 230 is suitable to by replicating current log text and corresponding daily record rank, with the process of current process Number combination producing current log information.In the present embodiment, the process number pid=40 of current process, then use trace function will After current log text and corresponding daily record rank are replicated by internal memory, believe with this process number combination producing current log Breath, finally gives the current log information that process number is 40 that daily record rank is wrong, corresponding current process.
Print module be suitable to when the daily record rank in current log information for mistake and fatal error in any one time, ought Front log information prints on the control station of current process.Creation module is suitable to be created to current log information by current process The write thread of list write current log information.Authorize module to be suitable to the thread lock of log information list by current process Authorize write thread.In the present embodiment, the daily record rank of current log information is mistake, therefore ought by trace function Front log information prints on the control station of current process.Now, write to current log information list by current process establishment Enter the write thread of current log information, the thread lock of log information list is authorized this write thread, the type of this thread lock For pthread_mutex_t.
First writing module 240 is suitable to obtain the thread lock of log information list in internal 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 writing thread to be passed through Thread lock access log information list, will store in the write log information list of current log information, log information list Log information is stored in the way of round-robin queue.In the present embodiment, obtain the thread lock of log information list in internal memory, pass through That calls that pthread_mutex_lock function carrys out execution journal information list adds latching operation, and the most only current process creates Write process can be with access log information list, and current log information is written in log information list carry out by this write process Storage.After write operation runs succeeded, call pthread_mutex_unlock function and log information list be unlocked, Thread lock being discharged, hereafter, log information list can be conducted interviews by other thread or process.
Sending module 250 is suitable to by daily record thread accesses log information list, passes through different by the most all log informations Step dbus message sends to log server, and instruction log server is by current for all log informations write in log information list In journal file.Sending module 250 is further adapted for sending to daily record thread and stores current log letter in log information list The notice of breath, after daily record thread is notified, is obtained the thread lock of log information list, is arranged by thread lock access log information Table, and by asynchronous dbus message, all log informations are sent to log server.In the present embodiment, by trace letter Several pthread_cond_signal functions that call, with the daily record thread within notice, send log list to this daily record thread In store the message of current log information.After daily record thread receives this notice, obtain the thread of log information list Lock, and add latching operation by call that pthread_mutex_lock function carrys out execution journal information list, now only have this day Will thread can be with access log information list.Log information list is to store log information, then daily record in the way of round-robin queue Thread performs, to log information list, the operation that circulation is read, and the log information that will be stored in log information list is successively read Out, and by calling the dbus_connection_send function in asynchronous dbus message log information is sent to remotely Log server.
Empty module to be suitable to when all log informations in log information list are sent to log server by daily record thread Time, Clear Log information list, the thread lock of release log information list.In the present embodiment, if daily record thread is by daily record In information list, all log informations send to log server, then Clear Log information list, release log information list Thread lock.Now, daily record thread dispatching pthread_mutex_unlock function by thread lock discharge, afterwards other thread or Log information list can be conducted interviews by process.
Fig. 3 shows the schematic diagram of log server 300 according to an embodiment of the invention.As it is shown on figure 3, this device Including: receiver module 310, judge module the 320, second writing module 330, profiling module 340 and the 3rd writing module 350.
Receiver module 310 is suitable to receive all log informations in the log information list that financial terminal equipment sends.
Judge module 320 is suitable to judge whether the size of current log file exceedes systemic presupposition value.In the present embodiment, Systemic presupposition value is 8192KB.
Second writing module 330 is suitable to when the size of current log file is not less than systemic presupposition value, by current log In information write current log file, and add write timestamp corresponding to moment.
Profiling module 340 is suitable to when the size of current log file has exceeded systemic presupposition value, by current log file Carry out filing process.In the present embodiment, the current log file in log server is 8215KB, has exceeded systemic presupposition Value, therefore carries out filing process by current log file.
3rd writing module 350 is suitable to, when the size of current log file has exceeded systemic presupposition value, regenerate day Current log information, as new current log file, is write in new current log file by will file, and when adding write Carve corresponding timestamp.In the present embodiment, owing to the size of current log file has exceeded systemic presupposition value, then regenerate Daily record rank, as new current log file, is mistake by journal file, the day that process number is 40 of corresponding current process Will information is written in new current log file, and adds write timestamp corresponding to moment.The write moment is in May, 2016 15: 34: 25 on the 9th 32 milliseconds, the timestamp being accurate to millisecond of its correspondence is 1462779265032.In order to ensure daily record The promptness of information write current log file, log server process also can be called fflush function and delay to refresh journal file Deposit, thus force to write log information.
About concrete steps and the embodiment of log processing, detailed disclosure in description based on Fig. 1, the most not Repeat again.
The method of the log processing in existing LFS system, is usually and first called log write before calling normal function Incoming interface, directly writes journal file by log information, does not carry out process isolation operation, and exists the most mixed in together Log information.The technical scheme of the log processing in LFS system according to embodiments of the present invention, writes current log information Log information list in internal memory have employed asynchronous process mode, the most also utilizes asynchronous dbus message by log information list All log informations send to long-range log server, further ensure the asynchronism of log processing.Additionally, pass through The access interface of log write incoming interface with the journal file in long-range log server is separated by dbus message, it is ensured that IO Mistake and performance bottleneck do not interfere with the normal function of system, have both isolated mistake, and have improve again performance, it is provided that well Extensibility.And, current log information includes the daily record rank of correspondence and the process number of current process, can be contrasted it His journal file, it is simple to carry out tracking and the data analysis in later stage.
B11. the device as described in B10, also includes authorizing module, is suitable to the line of log information list by current process Said write thread authorized by journey lock.
B12. the device as described in B11, described first writing module is further adapted for:
Write thread is by described thread lock access log information list;
To store in the write log information list of current log information, described log information list is with round-robin queue Mode stores log information.
B13. the device as according to any one of B9-12, also includes print module, is suitable to when the day in current log information Will rank be mistake and fatal error in any one time, current log information is printed on the control station of current process.
B14. the device as according to any one of B9-12, described sending module is further adapted for:
The notice storing current log information in log information list is sent to daily record thread;
After daily record thread receives described notice, obtain the thread lock of log information list;
By described thread lock access log information list, and by asynchronous dbus message, all log informations are sent extremely Log server.
B15. the method as described in B14, also includes emptying module, is suitable to when daily record thread is by institute in log information list When having log information to send to log server, Clear Log information list, the thread lock of release log information list.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, knot Structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor The application claims protected is than the feature more features being expressly recited in each claim.More precisely, as following As claims are reflected, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself Independent embodiment as the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or group Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in this example In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into multiple in addition Submodule.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint One of meaning can mode use in any combination.
Additionally, some in described embodiment be described as at this can be by the processor of computer system or by performing The method of other device enforcement of described function or the combination of method element.Therefore, have for implementing described method or method The processor of the necessary instruction of element is formed for implementing the method or the device of method element.Additionally, device embodiment This described element is the example of following device: this device is for implementing by performed by the element of the purpose in order to implement this invention Function.
As used in this, unless specifically stated so, ordinal number " first ", " second ", " the 3rd " etc. is used Describe plain objects and be merely representative of the different instances relating to similar object, and be not intended to imply that the object being so described must Must have the time upper, spatially, sequence aspect or in any other manner to definite sequence.
Although the embodiment according to limited quantity describes the present invention, but benefits from above description, the art In 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 The language that uses in this specification primarily to the readable and purpose of teaching and select rather than in order to explain or limit Determine subject of the present invention and select.Therefore, in the case of without departing from the scope of the appended claims and spirit, for this For the those of ordinary skill of technical field, many modifications and changes will be apparent from.For the scope of the present invention, to this The disclosure that invention is done is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. the log processing method in LFS system, is suitable to perform, in described financial terminal equipment in financial terminal equipment Being populated with LFS system, and be connected with log server telecommunication, described system includes AP layer, LFS manager, SP layer and sets Standby driving layer, described method includes:
Obtain current process and call the incoming current log text of log write incoming interface that LFS manager provides, described currently Process is any one in AP process and SP process;
Current log text carries out daily record rank setting, and described daily record rank includes debugging, information, warning, mistake, fatal mistake In Wu any one;
By replicating current log text and corresponding daily record rank, believe with the process number combination producing current log of current process Breath;
Obtain the thread lock of log information list in internal memory, by described thread lock, current log information is written to log information In list, and discharge described thread lock;
By daily record thread accesses log information list, the most all log informations are sent to daily record by asynchronous dbus message Server, instruction log server is by all log informations write current log file in log information list.
2. the method for claim 1, also includes:
The write thread to current log information list write current log information is created by current process.
3. method as claimed in claim 2, also includes:
Said write thread is authorized by the thread lock of log information list by current process.
4. method as claimed in claim 3, the described log information that current log information is written to by described thread lock is arranged Table includes:
Write thread is by described thread lock access log information list;
To store in the write log information list of current log information, described log information list is in the way of round-robin queue Storage log information.
5. the method as according to any one of claim 1-4, also includes:
If the daily record rank in current log information is any one in mistake and fatal error, then current log information is printed to On the control station of current process.
6. the method as according to any one of claim 1-4, described by daily record thread accesses log information list, will wherein All of log information is included to log server by the transmission of asynchronous dbus message:
The notice storing current log information in log information list is sent to daily record thread;
After daily record thread receives described notice, obtain the thread lock of log information list;
By described thread lock access log information list, and by asynchronous dbus message, all log informations are sent to daily record Server.
7. method as claimed in claim 6, also includes:
If all log informations in log information list are sent to log server by daily record thread, then Clear Log information row Table, the thread lock of release log information list.
8. the method as according to any one of claim 1-4, described log server is by daily records all in log information list Information write current log file includes:
Judge whether the size of current log file exceedes systemic presupposition value;
If the size of current log file is not less than systemic presupposition value, then current log information is write described current log file In, and add write timestamp corresponding to moment;
If the size of current log file has exceeded systemic presupposition value, then described current log file is carried out filing process, with Time regenerate journal file as new current log file, by current log file new for the write of current log information, And add write timestamp corresponding to moment.
9. the log processing device in LFS system, is suitable to reside in financial terminal equipment, in described financial terminal equipment Being populated with LFS system, and be connected with log server telecommunication, described system includes AP layer, LFS manager, SP layer and sets Standby driving layer, described device includes:
Acquisition module, is suitable to obtain current process and calls the incoming current log of log write incoming interface that LFS manager provides Text, described current process is any one in AP process and SP process;
Arranging module, be suitable to carry out current log text daily record rank setting, described daily record rank includes debugging, information, police In announcement, mistake, fatal error any one;
Generation module, is suitable to, by replicating current log text and corresponding daily record rank, combine with the process number of current process Generate current log information;
First writing module, is suitable to obtain the thread lock of log information list in internal memory, by described thread lock by current log Information is written in log information list, and discharges described thread lock;
Sending module, is suitable to by daily record thread accesses log information list, and the most all log informations are passed through asynchronous dbus Message sends to log server, and instruction log server is by all log informations write current log literary composition in log information list In part.
10. device as claimed in claim 9, also includes creation module, is suitable to be created by current process believe to current log The write thread of breath list write current log information.
CN201610649070.9A 2016-08-09 2016-08-09 Log processing method and device in a kind of LFS system Active CN106326355B (en)

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 true CN106326355A (en) 2017-01-11
CN106326355B 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)

Cited By (7)

* Cited by examiner, † Cited by third party
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
CN110008103A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 Log collecting method, system, device and the storage medium of third party application
CN110333958A (en) * 2019-06-28 2019-10-15 烽火通信科技股份有限公司 A kind of method and system based on DBus signal management thread
CN111176968A (en) * 2019-12-30 2020-05-19 东软集团股份有限公司 Method and device for generating log file and related product
CN111935248A (en) * 2020-07-22 2020-11-13 浪潮金融信息技术有限公司 SP remote file transmission method
CN113886210A (en) * 2021-10-21 2022-01-04 江苏域固威芯科技有限公司 A method for quickly reading audit logs on BMC webpage based on dbus communication
CN114741036A (en) * 2022-04-25 2022-07-12 扬州航盛科技有限公司 A method for log management under heterogeneous multi-core processors

Citations (5)

* Cited by examiner, † Cited by third party
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
US20150379038A1 (en) * 2014-06-25 2015-12-31 Vmware, Inc. Data replication in site recovery environment
CN105408895A (en) * 2013-06-22 2016-03-16 微软技术许可有限责任公司 Latch-free, log-structured storage for multiple access methods
US20160085635A1 (en) * 2011-06-30 2016-03-24 Emc Corporation Updating key value databases for virtual backups
CN105574205A (en) * 2016-01-18 2016-05-11 国家电网公司 Dynamic log analyzing system for distributed computing environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160085635A1 (en) * 2011-06-30 2016-03-24 Emc Corporation Updating key value databases for virtual backups
CN105408895A (en) * 2013-06-22 2016-03-16 微软技术许可有限责任公司 Latch-free, log-structured storage for multiple access methods
US20150379038A1 (en) * 2014-06-25 2015-12-31 Vmware, Inc. Data replication in site recovery environment
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

Cited By (9)

* Cited by examiner, † Cited by third party
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
CN110008103A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 Log collecting method, system, device and the storage medium of third party application
CN110333958A (en) * 2019-06-28 2019-10-15 烽火通信科技股份有限公司 A kind of method and system based on DBus signal management thread
CN111176968A (en) * 2019-12-30 2020-05-19 东软集团股份有限公司 Method and device for generating log file and related product
CN111176968B (en) * 2019-12-30 2023-04-25 东软集团股份有限公司 Method and device for generating log file and related products
CN111935248A (en) * 2020-07-22 2020-11-13 浪潮金融信息技术有限公司 SP remote file transmission method
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
CN114741036A (en) * 2022-04-25 2022-07-12 扬州航盛科技有限公司 A method for log management under heterogeneous multi-core processors

Also Published As

Publication number Publication date
CN106326355B (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN106326355A (en) Log processing method and device in LFS (Linux Financial Services) system
CN100412802C (en) Planned computer problem diagnosis and solvement and its automatic report and update
CN100585573C (en) Data processing system and method for executing memory management
US9129058B2 (en) Application monitoring through continuous record and replay
US7702613B1 (en) System and methods for validating and distributing test data
US20050203952A1 (en) Tracing a web request through a web server
CN102262680A (en) Distributed database proxy system based on massive data access requirement
US20210105608A1 (en) Subscription to dependencies in smart contracts
US20080059436A1 (en) Providing a visual representation of a sub-set of a visual program
CN101371230B (en) Reporting information to a network
CN106909325A (en) Daily record Method of printing and device and daily record print system
CN110740184A (en) Transaction strategy testing system based on micro-service architecture
DE102012203521A1 (en) Architecture with two trustworthiness levels
WO2020247115A1 (en) Subscription to edits of blockchain transaction
CN106997322B (en) Method and apparatus for automated testing
CN106293966A (en) The communication means of AP layer and SP layer and LFS system in a kind of LFS system
CN103164324A (en) Microblog test method and device
US11748354B2 (en) Data shape confidence
CN108241616B (en) Message pushing method and device
JP2024113165A (en) Data structure, memory means, and device
CN101425034A (en) Log recording method and log system
CN111435327B (en) Log record processing method, device and system
US12242638B2 (en) Mechanisms to predict system resource consumption of transactions
CN105913247A (en) Space management method for ESIM card and space management device
CN116521756A (en) Execution method and device of privacy calculation flow, electronic equipment and storage medium

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