CN106130807A - The extraction of a kind of Nginx daily record and analysis method and device - Google Patents

The extraction of a kind of Nginx daily record and analysis method and device Download PDF

Info

Publication number
CN106130807A
CN106130807A CN201610791743.4A CN201610791743A CN106130807A CN 106130807 A CN106130807 A CN 106130807A CN 201610791743 A CN201610791743 A CN 201610791743A CN 106130807 A CN106130807 A CN 106130807A
Authority
CN
China
Prior art keywords
journal file
time
setting
setting time
accumulated value
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
CN201610791743.4A
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.)
Baishi Software (beijing) Co Ltd
Original Assignee
Baishi Software (beijing) 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 Baishi Software (beijing) Co Ltd filed Critical Baishi Software (beijing) Co Ltd
Priority to CN201610791743.4A priority Critical patent/CN106130807A/en
Publication of CN106130807A publication Critical patent/CN106130807A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses the extraction of a kind of Nginx daily record and analyze method and device, relating to network security management field.Information retrieval or the slow problem of analysis method comparison is in use there is for solving existing Ngnix daily record.Including being input to Nginx daily record set under catalogue, read the journal file of the described Ngnix daily record of storage under described setting catalogue according to the time of setting;According to the $ time_local initial time in described journal file and end time, determine time interval;According to described time interval, described journal file is analyzed, and determines analysis result, described analysis result is exported setting receiving terminal.

Description

The extraction of a kind of Nginx daily record and analysis method and device
Technical field
The present invention relates to network security management field, more particularly relate to extraction and the analysis method of a kind of Nginx daily record And device.
Background technology
Ngnix is a kind of high performance HTTP and reverse proxy program, may operate at Windows and (SuSE) Linux OS Under, have that resource occupation is low, stable performance, feature that autgmentability is strong, use usually used as operating in http server.
Ngnix program, can be according to configuration record running log during running, and comprising HTTP in running log please Ask, http response information, these information to debugging Web program extremely important.Owing to Ngnix uses the mode added to write operation day Will, when there is a large amount of access request, running log file is generally the biggest, has following problem during using: 1) beat Open, browse, search, to position customizing messages the slowest;2) running log dependency is not strong, checks a HTTP request and response record Very inconvenient;3) directly cannot obtain conclusion from daily record, need may to check by discontinuous record a plurality of, this is right The requirement of operation maintenance personnel is higher.
Summary of the invention
The embodiment of the present invention provides the extraction of a kind of Nginx daily record and analyzes method and device, is used for solving existing The problem that Ngnix daily record in use exists.
The embodiment of the present invention provides a kind of extraction and the method for analysis of Nginx daily record, including:
It is input to Nginx daily record set under catalogue, reads according to the time of setting described in storing under described setting catalogue The journal file of Ngnix daily record;
According to the $ time_local initial time in described journal file and end time, determine time interval;
According to described time interval, described journal file is analyzed, and determines analysis result, by described analysis result Output is to setting receiving terminal.
Further, the described daily record reading the described Ngnix daily record stored under described setting catalogue according to the time of setting File, including:
Described analysis program, according to the described Ngnix daily record of storage under described setting catalogue, creates one and described Ngnix The wave file that daily record is corresponding, reads described journal file in described wave file.
Further, described according to described time interval, described journal file is analyzed, including:
Within the setting time, obtain the non-blank-white line number in described journal file, according to described non-blank-white line number and described time Between be spaced, determine the number of requests of Nginx service processing in the described setting time;And/or
Within the setting time, read the numerical value that in described journal file, $ body_bytes_sent parameter is corresponding line by line, obtain First accumulated value of described $ body_bytes_sent parameter, according to described first accumulated value and described time interval, determines institute State setting time Ngnix service response data volume;And/or
The request type information of $ request in described journal file is obtained, according to described request type within the setting time Second accumulated value of the row that journal file described in acquisition of information includes, according to described second accumulated value and described time interval, really The quantity of different request types in the fixed described setting time;And/or
The browser information obtained in described journal file in $ http_user_agent within the setting time, according to described The row that described journal file is included by browser information adds up, and obtains the 3rd accumulated value, according to described 3rd accumulated value and Described time interval, determines the access times of different browsers in the described setting time;And/or
The operation system information obtained in described journal file in $ http_user_agent within the setting time, according to institute State the row that described journal file includes by operation system information to add up, obtain the 4th accumulated value, add up according to the described 4th Value and described time interval, determine the access times of different operating system in the described setting time;And/or
The numerical value that in described journal file, often the capable $ status parameter included is corresponding is obtained, according to institute within the setting time State the row that described journal file includes by numerical value corresponding to status parameter and carry out the first statistics, according to described first statistics knot Fruit and described time interval, determine the response status information of Ngnix server in the described setting time;And/or
The numerical value that in described journal file, $ remote_addr parameter is corresponding is obtained, according to described $ within the setting time The row that described journal file is included by the different IP addresses included in remote_addr parameter adds up, and obtains the 5th and tires out Value added, according to described 5th accumulated value and described time interval, determine the log recording that single IP produces in the described setting time Quantity;And/or
The numerical value that in described journal file, $ request parameter is corresponding is obtained, according to described $ request within the setting time The row that described journal file is included by the URL address included in parameter adds up, and obtains the 6th accumulated value, according to the described 6th Accumulated value and described time interval, the access number of single URL address in determining the described setting time.
The embodiment of the present invention also provides for extraction and the analytical equipment of a kind of Nginx daily record, including:
Read unit, for being input to Nginx daily record set under catalogue, read described setting catalogue according to the time of setting The journal file of the described Ngnix daily record of lower storage;
Determine unit, be used for according to the $ time_local initial time in described journal file and end time, when determining Between be spaced;
Output unit, for according to described time interval, is analyzed described journal file, and determines analysis result, Described analysis result is exported setting receiving terminal.
Further, described reading unit is additionally operable to:
Described analysis program, according to the described Ngnix daily record of storage under described setting catalogue, creates one and described Ngnix The wave file that daily record is corresponding, reads described journal file in described wave file.
Further, described output unit is additionally operable to:
Within the setting time, obtain the non-blank-white line number in described journal file, according to described non-blank-white line number and described time Between be spaced, determine the number of requests of Nginx service processing in the described setting time;And/or
Within the setting time, read the numerical value that in described journal file, $ body_bytes_sent parameter is corresponding line by line, obtain First accumulated value of described $ body_bytes_sent parameter, according to described first accumulated value and described time interval, determines institute State setting time Ngnix service response data volume;And/or
The request type information of $ request in described journal file is obtained, according to described request type within the setting time Second accumulated value of the row that journal file described in acquisition of information includes, according to described second accumulated value and described time interval, really The quantity of different request types in the fixed described setting time;And/or
The browser information obtained in described journal file in $ http_user_agent within the setting time, according to described The row that described journal file is included by browser information adds up, and obtains the 3rd accumulated value, according to described 3rd accumulated value and Described time interval, determines the access times of different browsers in the described setting time;And/or
The operation system information obtained in described journal file in $ http_user_agent within the setting time, according to institute State the row that described journal file includes by operation system information to add up, obtain the 4th accumulated value, add up according to the described 4th Value and described time interval, determine the access times of different operating system in the described setting time;And/or
The numerical value that in described journal file, often the capable $ status parameter included is corresponding is obtained, according to institute within the setting time State the row that described journal file includes by numerical value corresponding to status parameter and carry out the first statistics, according to described first statistics knot Fruit and described time interval, determine the response status information of Ngnix server in the described setting time;And/or
The numerical value that in described journal file, $ remote_addr parameter is corresponding is obtained, according to described $ within the setting time The row that described journal file is included by the different IP addresses included in remote_addr parameter adds up, and obtains the 5th and tires out Value added, according to described 5th accumulated value and described time interval, determine the log recording that single IP produces in the described setting time Quantity;And/or
The numerical value that in described journal file, $ request parameter is corresponding is obtained, according to described $ request within the setting time The row that described journal file is included by the URL address included in parameter adds up, and obtains the 6th accumulated value, according to the described 6th Accumulated value and described time interval, the access number of single URL address in determining the described setting time.
In the embodiment of the present invention, it is provided that the extraction of a kind of Nginx daily record and analysis method and device, including by Nginx Daily record is input to set under catalogue, reads the daily record of the described Ngnix daily record of storage under described setting catalogue according to the time of setting File;According to the $ time_local initial time in described journal file and end time, determine time interval;According to described Time interval, is analyzed described journal file, and determines analysis result, described analysis result exports setting and receives End.By the form of definition Ngnix output running log with use specific algorithm, that extracts in Ngnix running log is effective Information is analyzed, and finally output running situation is in the media such as data base, file, memory object, thus when reaching to save Between, reduce the purpose analyzing difficulty, system operation information in quick obtaining a period of time.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawing is obtained according to these accompanying drawings.
The extraction of a kind of Nginx daily record that Fig. 1 provides for the embodiment of the present invention and analysis method flow schematic diagram;
The extraction of a kind of Nginx daily record that Fig. 2 provides for the embodiment of the present invention and analytical equipment structural representation.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
The extraction of a kind of Nginx daily record that the embodiment of the present invention that what Fig. 1 was exemplary show provides and analyze method flow Schematic diagram, the method may at least apply in software development technique.
As it is shown in figure 1, the extraction of a kind of Nginx daily record of embodiment of the present invention offer and analysis method include following step Rapid:
Step 101, is input to Nginx daily record set under catalogue, reads according to the setting time and deposits under described setting catalogue The journal file of the described Ngnix daily record of storage;
Step 102, according to the $ time_local initial time in described journal file and end time, determines between the time Every;
Step 103, according to described time interval, is analyzed described journal file, and determines analysis result, by described Analysis result exports setting receiving terminal.
It should be noted that in the embodiment of the present invention, executive agent can be server.
In a step 101, it is input to Nginx daily record set under catalogue, reads described setting catalogue according to the time of setting The journal file of the described Ngnix daily record of lower storage.
In embodiments of the present invention, server can be according to the time of setting, it may be judged whether receives analysis program, or root According to whether receiving triggering signal, it is determined whether receiving analysis program, wherein, triggering signal is certain that analysis program is carried Signal.In embodiments of the present invention, the determination methods used when server judges whether to receive server is not done specifically Restriction.
Further, after Nginx daily record is input to be set in catalogue, analyze the program time according to setting to setting Nginx daily record in catalogue processes, and specifically, analysis program is according to being input to set the elder generation of the Nginx daily record in catalogue Size shared by rear order or Nginx daily record, from setting extraction Nginx daily record catalogue, is created successively for the Nginx daily record extracted Build corresponding with a Nginx daily record wave file, in embodiments of the present invention, can be named by the wave file created F1, the Nginx daily record named F0 corresponding with wave file, the program of analysis reads journal file from wave file.
It should be noted that after analyzing program creation wave file, can be by the Nginx day corresponding with wave file Will is deleted.
In a step 102, analyze program according to the parameter $ time_local initial time in journal file and at the end of Between, determine interval analysis time of Nginx daily record.It should be noted that in embodiments of the present invention, to the time interval determined Concrete length do not do concrete restriction.
In step 103, according to described time interval, described journal file is analyzed, and determines analysis result, will Described analysis result exports setting receiving terminal, and in embodiments of the present invention, the system operation information of acquisition can include following But it is not limited to herein below:
1), within the setting time, the non-blank-white line number in journal file is obtained, according to non-blank-white line number and time interval, really Determine the number of requests of Nginx service processing in the setting time.
2), within the setting time, read the numerical value that in journal file, $ body_bytes_sent parameter is corresponding line by line, obtain $ First accumulated value of body_bytes_sent parameter, according to the first accumulated value and time interval, determines that setting time Ngnix takes Business reply data amount.
3), within the setting time, the request type information of $ request in journal file is obtained, according to request type information Obtain the second accumulated value of the row that journal file includes, according to the second accumulated value and time interval, different in determining the setting time The quantity of request type.
4), the browser information that obtains in journal file in $ http_user_agent within the setting time, according to browsing The row that journal file is included by device information adds up, and obtains the 3rd accumulated value, according to the 3rd accumulated value and time interval, determines The access times of different browsers in the setting time.
5), the operation system information that obtains in journal file in $ http_user_agent within the setting time, according to behaviour Make the row that journal file includes by system information to add up, obtain the 4th accumulated value, according to the 4th accumulated value and time interval, Determine the access times of different operating system in the setting time.
6), within the setting time, the numerical value that in journal file, often the capable $ status parameter included is corresponding is obtained, according to $ The row that journal file is included by numerical value corresponding to status parameter carries out the first statistics, according to the first statistical result with between the time Every, determine the response status information of Ngnix server in the setting time.
7), within the setting time, the numerical value that in journal file, $ remote_addr parameter is corresponding is obtained, according to $ remote_ The row that journal file is included by the different IP addresses included in addr parameter adds up, and obtains the 5th accumulated value, according to the Five accumulated values and time interval, the log recording quantity that in determining the setting time, single IP produces.
8), within the setting time, the numerical value that in journal file, $ request parameter is corresponding is obtained, according to $ request parameter The row that journal file is included by the URL address inside included adds up, and obtains the 6th accumulated value, according to the 6th accumulated value and time Interval, the access number of single URL address in determining the setting time.
In sum, the embodiment of the present invention is by specific by form and the employing of definition Ngnix output running log Algorithm, the effective information extracted in Ngnix running log analyzes, and finally output running situation is to data base, file, interior Deposit in the media such as object, thus reach the saving time, reduce and analyze difficulty, system operation information in quick obtaining a period of time Purpose.
Based on same inventive concept, embodiments provide extraction and the analytical equipment of a kind of Nginx daily record, due to The principle that this device solves technical problem is similar to the extraction of a kind of Nginx daily record and the method for analysis, the therefore enforcement of this device May refer to the enforcement of method, repeat no more in place of repetition.
The extraction of a kind of Nginx daily record that Fig. 2 provides for the embodiment of the present invention and analytical equipment structural representation, specifically Ground, including:
Read unit 21, for being input to Nginx daily record set under catalogue, read described setting mesh according to the time of setting The journal file of the described Ngnix daily record of the lower storage of record;
Determine unit 22, for according to the $ time_local initial time in described journal file and end time, determine Time interval;
Output unit 23, for according to described time interval, is analyzed described journal file, and determines analysis knot Really, described analysis result is exported setting receiving terminal.
Further, described reading unit 21 is additionally operable to:
Described analysis program, according to the described Ngnix daily record of storage under described setting catalogue, creates one and described Ngnix The wave file that daily record is corresponding, reads described journal file in described wave file.
Further, described output unit 23 is additionally operable to:
Within the setting time, obtain the non-blank-white line number in described journal file, according to described non-blank-white line number and described time Between be spaced, determine the number of requests of Nginx service processing in the described setting time;And/or
Within the setting time, read the numerical value that in described journal file, $ body_bytes_sent parameter is corresponding line by line, obtain First accumulated value of described $ body_bytes_sent parameter, according to described first accumulated value and described time interval, determines institute State setting time Ngnix service response data volume;And/or
The request type information of $ request in described journal file is obtained, according to described request type within the setting time Second accumulated value of the row that journal file described in acquisition of information includes, according to described second accumulated value and described time interval, really The quantity of different request types in the fixed described setting time;And/or
The browser information obtained in described journal file in $ http_user_agent within the setting time, according to described The row that described journal file is included by browser information adds up, and obtains the 3rd accumulated value, according to described 3rd accumulated value and Described time interval, determines the access times of different browsers in the described setting time;And/or
The operation system information obtained in described journal file in $ http_user_agent within the setting time, according to institute State the row that described journal file includes by operation system information to add up, obtain the 4th accumulated value, add up according to the described 4th Value and described time interval, determine the access times of different operating system in the described setting time;And/or
The numerical value that in described journal file, often the capable $ status parameter included is corresponding is obtained, according to institute within the setting time State the row that described journal file includes by numerical value corresponding to status parameter and carry out the first statistics, according to described first statistics knot Fruit and described time interval, determine the response status information of Ngnix server in the described setting time;And/or
The numerical value that in described journal file, $ remote_addr parameter is corresponding is obtained, according to described $ within the setting time The row that described journal file is included by the different IP addresses included in remote_addr parameter adds up, and obtains the 5th and tires out Value added, according to described 5th accumulated value and described time interval, determine the log recording that single IP produces in the described setting time Quantity;And/or
The numerical value that in described journal file, $ request parameter is corresponding is obtained, according to described $ request within the setting time The row that described journal file is included by the URL address included in parameter adds up, and obtains the 6th accumulated value, according to the described 6th Accumulated value and described time interval, the access number of single URL address in determining the described setting time.
Should be appreciated that this equipment dress according to unit that the extraction of one of the above Nginx daily record and analytical equipment include is only Put the logical partitioning that the function of realization is carried out, in actual application, superposition or the fractionation of said units can be carried out.And this enforcement A kind of Nginx that the function that the extraction of a kind of Nginx daily record that example provides and analytical equipment are realized provides with above-described embodiment The extraction of daily record and analysis method one_to_one corresponding, the more detailed handling process realized for this device, at said method Embodiment one is described in detail, is not described in detail herein.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the reality in terms of the present invention can use complete hardware embodiment, complete software implementation or combine software and hardware Execute the form of example.And, the present invention can use at one or more computers wherein including computer usable program code The upper computer program product implemented of usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) The form of product.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one The step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellent Select embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present invention God and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereof Within, then the present invention is also intended to comprise these change and modification.

Claims (6)

1. a Nginx daily record extraction and analyze method, it is characterised in that including:
It is input to Nginx daily record set under catalogue, reads the described Ngnix of storage under described setting catalogue according to the time of setting The journal file of daily record;
According to the $ time_local initial time in described journal file and end time, determine time interval;
According to described time interval, described journal file is analyzed, and determines analysis result, described analysis result is exported To setting receiving terminal.
2. the method for claim 1, it is characterised in that described reading according to the time of setting stores under described setting catalogue The journal file of described Ngnix daily record, including:
Described analysis program, according to the described Ngnix daily record of storage under described setting catalogue, creates one and described Ngnix daily record Corresponding wave file, reads described journal file in described wave file.
3. the method for claim 1, it is characterised in that described according to described time interval, enters described journal file Row is analyzed, and at least includes:
The non-blank-white line number in described journal file is obtained, according to described non-blank-white line number with between the described time within the setting time Every, determine the number of requests of Nginx service processing in the described setting time;And/or
Within the setting time, read the numerical value that in described journal file, $ body_bytes_sent parameter is corresponding line by line, obtain described First accumulated value of $ body_bytes_sent parameter, according to described first accumulated value and described time interval, determine described in set Fix time Ngnix service response data volume;And/or
The request type information of $ request in described journal file is obtained, according to described request type information within the setting time Obtain the second accumulated value of the row that described journal file includes, according to described second accumulated value and described time interval, determine institute The quantity of different request types in stating the setting time;And/or
The browser information obtained in described journal file in $ http_user_agent within the setting time, browses according to described The row that described journal file is included by device information adds up, and obtains the 3rd accumulated value, according to described 3rd accumulated value and described Time interval, determines the access times of different browsers in the described setting time;And/or
The operation system information obtained in described journal file in $ http_user_agent within the setting time, according to described behaviour Make the row that described journal file includes by system information to add up, obtain the 4th accumulated value, according to described 4th accumulated value and Described time interval, determines the access times of different operating system in the described setting time;And/or
The numerical value that in described journal file, often the capable $ status parameter included is corresponding is obtained, according to described $ within the setting time The row that described journal file is included by numerical value corresponding to status parameter carries out the first statistics, according to described first statistical result and Described time interval, determines the response status information of Ngnix server in the described setting time;And/or
The numerical value that in described journal file, $ remote_addr parameter is corresponding is obtained, according to described $ remote_ within the setting time The row that described journal file is included by the different IP addresses included in addr parameter adds up, and obtains the 5th accumulated value, root According to described 5th accumulated value and described time interval, determine the log recording quantity that single IP produces in the described setting time;With/ Or
The numerical value that in described journal file, $ request parameter is corresponding is obtained, according to described $ request parameter within the setting time The row that described journal file is included by the URL address inside included adds up, and obtains the 6th accumulated value, adds up according to the described 6th Value and described time interval, the access number of single URL address in determining the described setting time.
4. the extraction of a Nginx daily record and analytical equipment, it is characterised in that including:
Read unit, for being input to Nginx daily record set under catalogue, read according to the setting time and deposit under described setting catalogue The journal file of the described Ngnix daily record of storage;
Determine unit, for according to the $ time_local initial time in described journal file and end time, determine between the time Every;
Output unit, for according to described time interval, is analyzed described journal file, and determines analysis result, by institute State analysis result and export setting receiving terminal.
5. device as claimed in claim 4, it is characterised in that described reading unit is additionally operable to:
Described analysis program, according to the described Ngnix daily record of storage under described setting catalogue, creates one and described Ngnix daily record Corresponding wave file, reads described journal file in described wave file.
6. device as claimed in claim 4, it is characterised in that described output unit is additionally operable to:
The non-blank-white line number in described journal file is obtained, according to described non-blank-white line number with between the described time within the setting time Every, determine the number of requests of Nginx service processing in the described setting time;And/or
Within the setting time, read the numerical value that in described journal file, $ body_bytes_sent parameter is corresponding line by line, obtain described First accumulated value of $ body_bytes_sent parameter, according to described first accumulated value and described time interval, determine described in set Fix time Ngnix service response data volume;And/or
The request type information of $ request in described journal file is obtained, according to described request type information within the setting time Obtain the second accumulated value of the row that described journal file includes, according to described second accumulated value and described time interval, determine institute The quantity of different request types in stating the setting time;And/or
The browser information obtained in described journal file in $ http_user_agent within the setting time, browses according to described The row that described journal file is included by device information adds up, and obtains the 3rd accumulated value, according to described 3rd accumulated value and described Time interval, determines the access times of different browsers in the described setting time;And/or
The operation system information obtained in described journal file in $ http_user_agent within the setting time, according to described behaviour Make the row that described journal file includes by system information to add up, obtain the 4th accumulated value, according to described 4th accumulated value and Described time interval, determines the access times of different operating system in the described setting time;And/or
The numerical value that in described journal file, often the capable $ status parameter included is corresponding is obtained, according to described $ within the setting time The row that described journal file is included by numerical value corresponding to status parameter carries out the first statistics, according to described first statistical result and Described time interval, determines the response status information of Ngnix server in the described setting time;And/or
The numerical value that in described journal file, $ remote_addr parameter is corresponding is obtained, according to described $ remote_ within the setting time The row that described journal file is included by the different IP addresses included in addr parameter adds up, and obtains the 5th accumulated value, root According to described 5th accumulated value and described time interval, determine the log recording quantity that single IP produces in the described setting time;With/ Or
The numerical value that in described journal file, $ request parameter is corresponding is obtained, according to described $ request parameter within the setting time The row that described journal file is included by the URL address inside included adds up, and obtains the 6th accumulated value, adds up according to the described 6th Value and described time interval, the access number of single URL address in determining the described setting time.
CN201610791743.4A 2016-08-31 2016-08-31 The extraction of a kind of Nginx daily record and analysis method and device Pending CN106130807A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610791743.4A CN106130807A (en) 2016-08-31 2016-08-31 The extraction of a kind of Nginx daily record and analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610791743.4A CN106130807A (en) 2016-08-31 2016-08-31 The extraction of a kind of Nginx daily record and analysis method and device

Publications (1)

Publication Number Publication Date
CN106130807A true CN106130807A (en) 2016-11-16

Family

ID=57270992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610791743.4A Pending CN106130807A (en) 2016-08-31 2016-08-31 The extraction of a kind of Nginx daily record and analysis method and device

Country Status (1)

Country Link
CN (1) CN106130807A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598432A (en) * 2020-11-17 2021-04-02 深圳市世强元件网络有限公司 Website user point calculation method and device and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020097291A (en) * 2001-06-20 2002-12-31 (주)엔토시스 Method for analyzing log of wireless internet
US20090013007A1 (en) * 2007-07-05 2009-01-08 Interwise Ltd. System and Method for Collection and Analysis of Server Log Files
CN103001805A (en) * 2012-12-17 2013-03-27 重庆邮电大学 Web user flow producing method based on user behavior analysis
CN103178982A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and device for analyzing log
CN105515836A (en) * 2015-11-27 2016-04-20 小米科技有限责任公司 Log processing method, device and server
CN105577440A (en) * 2015-12-24 2016-05-11 华为技术有限公司 Network fault time location method and analyzing device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020097291A (en) * 2001-06-20 2002-12-31 (주)엔토시스 Method for analyzing log of wireless internet
US20090013007A1 (en) * 2007-07-05 2009-01-08 Interwise Ltd. System and Method for Collection and Analysis of Server Log Files
CN103178982A (en) * 2011-12-23 2013-06-26 阿里巴巴集团控股有限公司 Method and device for analyzing log
CN103001805A (en) * 2012-12-17 2013-03-27 重庆邮电大学 Web user flow producing method based on user behavior analysis
CN105515836A (en) * 2015-11-27 2016-04-20 小米科技有限责任公司 Log processing method, device and server
CN105577440A (en) * 2015-12-24 2016-05-11 华为技术有限公司 Network fault time location method and analyzing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN710409894: "nginx日志分析工具awstats,blog.51cto.com/chenhongyu/1723461", 《51CTO博客》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598432A (en) * 2020-11-17 2021-04-02 深圳市世强元件网络有限公司 Website user point calculation method and device and computer equipment

Similar Documents

Publication Publication Date Title
US20230289255A1 (en) Automatic correlation of dynamic system events within computing devices
Liu et al. Monitoring and analyzing big traffic data of a large-scale cellular network with Hadoop
CN105224606B (en) A kind of processing method and processing device of user identifier
US7945657B1 (en) System and method for emulating input/output performance of an application
CN104657435B (en) A kind of memory management method and Network Management System using data
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
US11675682B2 (en) Agent profiler to monitor activities and performance of software agents
CN107562532B (en) Method and device for predicting hardware resource utilization rate of equipment cluster
US8019765B2 (en) Identifying files associated with a workflow
CN112491602A (en) Behavior data monitoring method and device, computer equipment and medium
Markatchev et al. Webtraff: A GUI for web proxy cache workload modeling and analysis
CN114490375A (en) Method, device and equipment for testing performance of application program and storage medium
CN107423090B (en) Flash player abnormal log management method and system
US20230420083A1 (en) Method and apparatus for acquiring gene information of proprietary cloud container cluster
CN109559121A (en) Transaction path calls exception analysis method, device, equipment and readable storage medium storing program for executing
CN109189652A (en) A kind of acquisition method and system of close network terminal behavior data
CN106130807A (en) The extraction of a kind of Nginx daily record and analysis method and device
CN104778087B (en) A kind of information processing method and information processing unit
Kunkel et al. Understanding metadata latency with MDWorkbench
CN109933506A (en) Server big data method of evaluating performance, system and electronic equipment and storage medium
CN109992614B (en) Data acquisition method, device and server
CN106933718B (en) Method for monitoring performance and device
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN107766216A (en) It is a kind of to be used to obtain the method and apparatus using execution information
CN113220573A (en) Test method and device for micro-service architecture and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161116