CN102521112A - Memory-based reading and writing method of log information - Google Patents

Memory-based reading and writing method of log information Download PDF

Info

Publication number
CN102521112A
CN102521112A CN2011103719821A CN201110371982A CN102521112A CN 102521112 A CN102521112 A CN 102521112A CN 2011103719821 A CN2011103719821 A CN 2011103719821A CN 201110371982 A CN201110371982 A CN 201110371982A CN 102521112 A CN102521112 A CN 102521112A
Authority
CN
China
Prior art keywords
log information
internal memory
memory
write
read
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.)
Pending
Application number
CN2011103719821A
Other languages
Chinese (zh)
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.)
ZTE ICT Technologies Co Ltd
Original Assignee
ZTE ICT Technologies 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 ZTE ICT Technologies Co Ltd filed Critical ZTE ICT Technologies Co Ltd
Priority to CN2011103719821A priority Critical patent/CN102521112A/en
Publication of CN102521112A publication Critical patent/CN102521112A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a memory-based reading and writing method of log information. The method comprises the steps of writing contents of the log information in a memory and then reading the log information from the memory. By using the memory-based reading and writing method of the log information, provided by the invention, the reading and writing efficiency of the log information can be improved, the management of the log information can be effectively improved, the load on a server can be reduced and the software performance can be enhanced.

Description

A kind of log information reading/writing method based on internal memory
Technical field
The present invention relates to software field, particularly a kind of reading/writing method of log information.
Background technology
At present, along with the continuous expansion of computer software development project, file is more and more, can effectively trace into the action of program generation certain operations through journal file; As increasing, deletion is revised; Operations such as inquiry aspect the more important thing is when can the program of tracing into making a mistake, and some error messages are provided timely; The related personnel can find out problem where occurred through reading to separate this error log information at once, so that take corresponding means to revise and improve to problem timely.
Traditional log information read-write mode is that log information is write in the file, and this mode file read-write is convenient, not just can open by the restriction of special software function; The space is big, and storage copy is flexible.But defective is: (1) is influenced by machines configurations, and read or write speed is slow; (2) the frequent journal file read-write operation of transition reduces the running software performance; (3) security, crypticity is lower.
A kind of in addition mode is that log information is write in the database, and this mode storage space is little, and it is little to take disk space; Daily record increases, and deletes, and changes, and looks into very convenient; Security, crypticity is higher.But defective is: (1) is limited by special software, must just can open with the client or the service end software of appointment; (2) receive distance, the restriction of network speed, storage read-write speed is very slow; (3) file backup recovery comparatively bothers.
Along with the function of software goes from strength to strength, through above two kinds of methods, the daily record read-write is very frequent, and constantly frequent daily record read-write operation has then aggravated load of server, reduced software performance, and read-write mode efficient is very low.
Traditional daily record read-write mode is that daily record is read and write in journal file or the database table, and such read-write mode efficient is very low, can effectively improve log management through this method.
Summary of the invention
The object of the present invention is to provide a kind of log information reading/writing method based on internal memory, can improve the read-write efficiency of log information, the management that improves log information effectively reduces load of server, strengthens software performance.
In order to solve above technical matters, the present invention provides a kind of daily record reading/writing method based on internal memory, and the log information content is written to internal memory, from internal memory, reads log information again.
Further, said method with log information content write memory comprises: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
Further, the said method that from internal memory, reads log information comprises: the read () method through the ByteArrayInputStream class among the JAVA reads the information in the internal memory.
Compared with prior art, the present invention provides a kind of log information reading/writing method based on internal memory, goes through the log information content is written in the internal memory; And then go the information in the rdma read, and read and write and database access greater than direct file by the read or write speed of internal memory, can improve the read-write efficiency of log information; Realize log management fast, improve the management of log information effectively, reduce load of server; Strengthen software performance, improved the operational efficiency of software.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes a part of the present invention, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, does not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the synoptic diagram of a kind of daily record reading/writing method based on internal memory provided by the invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
As shown in Figure 1; The invention provides a kind of daily record reading/writing method, the log information content is written in the internal memory goes, and then remove to read the log information in the internal memory based on internal memory; Just the performance of project operation be can improve, internal memory daily record read operation and internal memory daily record write operation comprised.Concrete grammar is following:
1, log information is directly write in the internal memory, rather than directly read and write in journal file or the database.
In the present embodiment, a kind of method that log information is written in the internal memory is the log information content to be write in the internal memory through the wirte () method of the ByteArrayOutputStream class among the JAVA.
2, read log information in the internal memory.
In the present embodiment, the mode that reads of memory information daily record can read the information in the internal memory through the read () method of the ByteArrayInputStream class among the JAVA.
The present invention is through the mode of read/write memory; Read or write speed by internal memory is read and write and database access greater than direct file, can improve the read-write efficiency of log information, realizes log management fast; Improve the management of log information effectively; Reduce load of server, strengthen software performance, improved the operational efficiency of software.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention; But as previously mentioned; Be to be understood that the present invention is not limited to the form that this paper discloses, should do not regard eliminating as, and can be used for various other combinations, modification and environment other embodiment; And can in invention contemplated scope described herein, change through the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of accompanying claims of the present invention.

Claims (3)

1. the daily record reading/writing method based on internal memory is characterized in that, with log information content write memory, from internal memory, reads log information again.
2. the method for claim 1 is characterized in that, said method with log information content write memory comprises: the wirte () method through the ByteArrayOutputStream class among the JAVA is write the log information content in the internal memory.
3. the method for claim 1 is characterized in that, the said method that from internal memory, reads log information comprises: the read () method through the ByteArrayInputStream class among the JAVA reads the information in the internal memory.
CN2011103719821A 2011-11-18 2011-11-18 Memory-based reading and writing method of log information Pending CN102521112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103719821A CN102521112A (en) 2011-11-18 2011-11-18 Memory-based reading and writing method of log information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103719821A CN102521112A (en) 2011-11-18 2011-11-18 Memory-based reading and writing method of log information

Publications (1)

Publication Number Publication Date
CN102521112A true CN102521112A (en) 2012-06-27

Family

ID=46292043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103719821A Pending CN102521112A (en) 2011-11-18 2011-11-18 Memory-based reading and writing method of log information

Country Status (1)

Country Link
CN (1) CN102521112A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131090A (en) * 2020-09-30 2020-12-25 北京北信源软件股份有限公司 Business system performance monitoring method and device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320348A (en) * 2008-06-25 2008-12-10 中兴通讯股份有限公司 Log function implementing method of embedded system
CN101625655A (en) * 2009-08-20 2010-01-13 华中科技大学 Parallel recovery method of memory database
CN101639848A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Spatial data engine and method applying management spatial data thereof
CN101686209A (en) * 2008-09-24 2010-03-31 阿里巴巴集团控股有限公司 Method and device for storing message in message retransmission system
CN101706811A (en) * 2009-11-24 2010-05-12 中国科学院软件研究所 Transaction commit method of distributed database system
CN101751394A (en) * 2008-12-16 2010-06-23 青岛海信传媒网络技术有限公司 Method and system for synchronizing data
CN101876996A (en) * 2009-12-01 2010-11-03 广州从兴电子开发有限公司 Method and system for synchronizing data from main memory data bank to file data bank
CN101908021A (en) * 2009-06-03 2010-12-08 康佳集团股份有限公司 Flash memory erasing-writing method and flash memory

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320348A (en) * 2008-06-25 2008-12-10 中兴通讯股份有限公司 Log function implementing method of embedded system
CN101686209A (en) * 2008-09-24 2010-03-31 阿里巴巴集团控股有限公司 Method and device for storing message in message retransmission system
CN101751394A (en) * 2008-12-16 2010-06-23 青岛海信传媒网络技术有限公司 Method and system for synchronizing data
CN101639848A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Spatial data engine and method applying management spatial data thereof
CN101908021A (en) * 2009-06-03 2010-12-08 康佳集团股份有限公司 Flash memory erasing-writing method and flash memory
CN101625655A (en) * 2009-08-20 2010-01-13 华中科技大学 Parallel recovery method of memory database
CN101706811A (en) * 2009-11-24 2010-05-12 中国科学院软件研究所 Transaction commit method of distributed database system
CN101876996A (en) * 2009-12-01 2010-11-03 广州从兴电子开发有限公司 Method and system for synchronizing data from main memory data bank to file data bank

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112131090A (en) * 2020-09-30 2020-12-25 北京北信源软件股份有限公司 Business system performance monitoring method and device, equipment and medium
CN112131090B (en) * 2020-09-30 2024-02-23 北京北信源软件股份有限公司 Service system performance monitoring method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10255235B2 (en) Database storage system based on jukebox and method using the system
CN102741843B (en) Method and apparatus for reading data from database
US9996557B2 (en) Database storage system based on optical disk and method using the system
CN110389942B (en) Method and system for separating and storing key values without garbage recovery
CN102662690A (en) Method and apparatus for starting application program
CN104657500A (en) Distributed storage method based on KEY-VALUE KEY VALUE pair
CN105335098A (en) Storage-class memory based method for improving performance of log file system
CN102521114B (en) File system log storage system under virtualization environment
CN103577574A (en) High-reliability linear file system based on nand flash
CN107967122A (en) A kind of method for writing data of block device, device and medium
CN104239438A (en) File information storage method and file information read-write method based on separate storage
CN105045850A (en) Method for recovering junk data in cloud storage log file system
CN102609484A (en) General method for managing log of system
CN101453490A (en) Synthesized backup method and apparatus
CN103559119B (en) File operation requests disposal route and device
CN101201774A (en) Method for snapshot of magnetic disc
CN109189724B (en) Method and device for improving audio and video data storage efficiency of video monitoring system
CN102323907A (en) Method for embedded ARM (advanced RISC machines) processor to store and delete NANDFLASH data
CN100543748C (en) A kind of method and system of utilizing file allocation table to carry out the file tracking
CN106775501A (en) Elimination of Data Redundancy method and system based on nonvolatile memory equipment
CN103544097A (en) Journal storing method, journal storing system, journal reading method and journal reading system of embedded system
KR100995546B1 (en) Database system based on hybrid storage device nand flash memory and non-volatile ram, and method of updating data in the database system
CN102521112A (en) Memory-based reading and writing method of log information
CN102609364A (en) Cache exchange method
CN103914318A (en) Program starting method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120627