Information technology turns into a kind of vital productivity of telecommunications industry, and the quality of operation system directly influences enterprise
The condition of production of industry.Database layer is a wherein the most key ring in current traditional forms of enterprises framework, how to find data in advance
Storehouse performance issue simultaneously gives effective solution, is the highly important responsibility of business support department one of which.
In the case, during system maintenance, one or more kinds of combine in following several schemes is typically taken
The failure that more or less database layer triggers.Fig. 1 is referred to, prior art mainly there are following three kinds：
1), using third party software (BOMC) system
Third party software (Business Operation Management Center), it is transported there is provided some databases
Row index, such as enter number of passes, cpu memory usages, sql and call situation etc..Specific monitor control index is designed or many according to manufacturer
Or there is little bit different less.
When the operation of certain class index reaches default monitoring threshold values, seriously put level policy with reference to configuration and alerted, it is ensured that
Problem responds promptness, needs manual intervention to handle.
Enterprise manager is database management tools, and it provides a graphic user interface (GUI).Enterprise manager leads to
Wieldy interface is crossed there is provided database management function.Database can be carried out by using Enterprise Manager
Related maintenance work centralized management.
Using deployment Enterprise Manager (EM) can real-time query Data Data dictionary carry out core resource make
Counted with situation, when certain class index exceedes alarm threshold value, then carry out red early warning, need manual intervention to handle.
3), manual inspection is handled
By manually periodically carrying out calling the inspection of the service conditions such as situation, and root into number of passes, cpu memory usages, sql
According to service condition carry out manual intervention processing, it is ensured that the stabilization of database and efficiently.
Current telecommunications level database system, with the increase of client, the growth of business and the accumulation of time, system list
Position time online transaction number and the complexity of every transaction have large-scale lifting, so also result in Database Systems
Data change it is more frequent, also necessarily cause the lifting to data management requirement.Therefore core database is carried out perspective
Performance evaluation is particularly important.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of database loads tendency monitoring method, can be automatically right
Database performance is given warning in advance, and reduces fault rate, and meet the standardization of magnanimity machine, hardware and software platform management and monitoring
The present invention is to provide a kind of database loads tendency prison to solve the technical scheme that above-mentioned technical problem is used
Prosecutor method, including：Step S1：By configuring timing tasks, timed collection database performance data, and set up resource baseline；Step
Rapid S2：Database performance data after collection is filtered, the year-on-year trend and ring that each resource of monitoring is used compare trend；Step
S3：For the resource not in baseline library, it is pushed in baseline library correction, by system, dynamically generation baseline restores baseline again
Storehouse；Step S4：Resource for having set up baseline, the performance data collected and baseline are contrasted, if performance change
Without departing from specified threshold, then baseline corrector is collected, for baseline correction；Otherwise, if performance change exceeds specified threshold,
Then to the resource using sending performance early warning.
Above-mentioned database loads tendency monitoring method, wherein, the database performance data in the step S1 includes
Host CPU utilization rate, IO utilization rates, memory usage, the sql amounts of calling, logic are read and sql analysis feature data, the step
S2 carries out real time monitoring to database performance data, and is contrasted with reference to history cycle data.
Above-mentioned database loads tendency monitoring method, wherein, the step S2 carries out sql tune on the whole in database
Consumption is collected, and monitoring judges whether operation layer changes；Read by periodic collection logic, with reference to the sql amount of calling decision logics
It is to be caused by fragment or the amount of calling causes to read change；And enter the database performance data formation real time load figure of timed collection
Row display directly perceived and judgement.
Above-mentioned database loads tendency monitoring method, wherein, the step S1 timings are regarded from Database Dynamic performance
Sql analysis feature data are gathered in figure, the Database Dynamic performance views include V $ SQL, V $ SQL_PLAN and V $
SQLARER；The sql analysis features data include PLAN_HASH_VALUE and PLAN_COST, if the current PLAN_ of system
HASH_VALUE values change compared with history same period PLAN_HASH_VALUE values, then PLAN_COST values current to system with
History same period PLAN_COST value progress is sought difference and is compared with default cost threshold values, if beyond cost threshold values, generation is same
Than trending early warning message；If the current PLAN_HASH_VALUE values of system become compared with last PLAN_HASH_VALUE values
Change, then PLAN_COST values current to system are sought difference with last issue PLAN_COST value progress and are compared with default cost threshold values,
If beyond cost threshold values, generation ring is than trending early warning message.
Above-mentioned database loads tendency monitoring method, wherein, when generating year-on-year trending early warning message or ring compares trend
After early warning message, also including by short message or lettergram mode, year-on-year trending early warning message or ring are pushed than trending early warning message
Present invention contrast prior art has following beneficial effect：The database loads tendency monitoring side that the present invention is provided
Method, can give warning in advance to database performance automatically, reduce fault rate, and meet magnanimity machine standardization,
Hardware and software platform management and monitoring demand.
The invention will be further described with reference to the accompanying drawings and examples.
Fig. 2 is database loads trend monitoring schematic flow sheet of the present invention.
Fig. 2 is referred to, overall flow of the invention is realized as follows：
Step S1：By configuring timing tasks, timed collection database performance data, and set up resource baseline；
Step S2：Database performance data after collection is filtered, year-on-year trend and ring that each resource is used is monitored
Step S3：For the resource not in baseline library, it is pushed in baseline library correction, baseline is dynamically generated again by system
Restore baseline library；
Step S4：Resource for having set up baseline, the performance data collected and baseline are contrasted, if performance
Change then collects baseline corrector, for baseline correction without departing from specified threshold；Otherwise, if performance change is beyond specified
Threshold values, then to the resource using sending performance early warning.
The deficiency of the existing three kinds of schemes of labor of the present invention, solves emphatically problems with：
Host resource is analyzed:Periodically to main frame IO, cpu, internal memory, etc. database related resource be acquired, according to number
According to year-on-year ring is carried out than computing, bottom problem is strangled in cradle.
Database resource is analyzed:Can in database running, periodically to the database sql amounts of calling, logic read,
The keystone resourceses such as sql parsings are collected and form real time load figure, and the load change of database just can be very clear.
The present invention is broadly divided into four layers to realize, as shown in Figure 3：
First, initialization layer：
The management of this layer of main responsible task, establishment, cancellation, renewal, deletion, inquiry and the backstage scheduling for mainly having task
Deng operation.Monitor task is defined, definable is once performed or repeatedly circulation is performed, by filter kernel resource, by key message
List is added, is recorded in information gathering storehouse.
2nd, information gathering layer：
Special baseline library is set up, for depositing keystone resources.Two major classes are included in baseline library:
1st, cpu information
By periodic collection main frame cpu utilization rate information, such as GT/s QPI, Run queue, process are carried out real-time
Property monitoring contrasted with reference to history cycle data.
2nd, IO information
Pass through periodic collection main frame IO use informations, such as Disk device, %busy, r+w/s, avwait, avserv
Deng, carry out real time monitoring combination history cycle data contrasted.
3rd, Mem information
Pass through periodic collection host memory information, such as free, page in, page out, swap in, swap out.
Real time monitoring combination history cycle data are carried out to be contrasted.
1st, the Sql amounts of calling
The sql amounts of calling are carried out on the whole in database to collect, and can intuitively find whether operation layer changes, if go out
Now exception sql is called.
2nd, Sql is parsed
Because database sql has a variety of executive plans, spy carries out specific parsing Data Collection for specific sql to be ensured to hold
Row plan uniformity
3rd, logic is read
Read by periodic collection logic, and can intuitively find that logic reads change with reference to the sql amounts of calling is caused also by fragment
It is that the amount of calling causes.
3rd, data analysis layer：
Reached in advance by carrying out analysis to resources such as main frame IO, cpu, internal memory, the sql amounts of calling, logic reading, sql parsings
Pinpoint the problems
3.1 year-on-year trend
Example sql parses the algorithm of the year-on-year trending early warnings of PLAN_HASH_VALUE：
F=N0-N (N1, N2, N3 ... .Nn)=0
F1=N0cost-N (N1cost, N2cost, N3cost ... Nncost)>fg
Wherein, N0 is the current sql PLAN_HASH_VALUE values of system, and Nn represents history same period sql PLAN_HASH_
VALUE values；When F is not equal to 0, i.e. explanation sql PLAN_HASH_VALUE values change within the year-on-year phase, and Sql there may be
Difference and and fg are asked again according to N0cost (current sql plan cost values) and history same period N1cost value progress
(cost threshold values) analyzes sql performance cost excursions, as shown in Figure 4.The Production trend early warning message if F1 is more than fg.In advance
After warning message generation, by modes such as short message, mails, early warning message is pushed to attendant, advanced processing hidden danger, in order to avoid
Trigger failure.Similarly, this is no longer going to repeat them for other monitor control indexs.
3.2 rings compare trend
Algorithm of the example sql parsing PLAN_HASH_VALUE rings than trending early warning：
Wherein, N0 is the current sql PLAN_HASH_VALUE values of system, and N1 represents last issue sql PLAN_HASH_VALUE
Value；When F is not equal to 0, i.e. explanation sql PLAN_HASH_VALUE values in the phase in ring than changing, and Sql there may be performance
Again according to N0cost (current sql plan cost values) and last issue N1cost value progress ask it is poor and with fg (cost
Threshold values) analyze sql performance cost excursions, as shown in Figure 5.The Production trend early warning message if F1 is more than fg.Precaution alarm
After text generation, by modes such as short message, mails, early warning message is pushed to attendant, advanced processing hidden danger, in order to avoid trigger
Failure.Other monitor control indexs are similarly.
4th, scheme implementation level：
After main frame, the analysis of database related resource service condition are finished, scheme implementation level is responsible for：
Problem is found in advance, by constantly analyzing after main frame, database associated core resource, can Real-time Feedback go out currently
Loading condition, early warning is carried out if downward trend occurs in load in advance.
Problem advanced processing, is given warning in advance after hidden danger by the present apparatus, and operation maintenance personnel has grace time to carry out resource coordination,
And carried out according to specific warning index for processing, in order to avoid trigger failure.
In summary, the present invention is read by periodic collection main frame IO, cpu, internal memory, the sql amounts of calling, logic, sql is parsed etc.
Resource, sets up baseline library and builds the links such as information matrix；By analyzing related resource service condition and making with reference to index of correlation
Reached with trend analysis and pinpoint the problems and give warning in advance in advance, so as to be given warning in advance automatically to database performance, drop
Low fault rate, and meet the standardization of magnanimity machine, hardware and software platform management and monitoring demand.Specific advantage is as follows：
1) standardize：Because main frame is the host platform of database, present apparatus spy combines database and carries out full side with main frame
The index of position combs and implements collection, integration specification unified management.
2) hardware and software platform：Because enterprise-level platform is all hundreds and thousands of set of environments, the baseline analysis center energy of present apparatus independence
It is enough to manage magnanimity machine easily.Greatly reduce the manpower and materials demand of BOSS grades of O＆Ms of telecommunications.
3) it is perspective：Early warning is produced before performance issue appearance, operation maintenance personnel has grace time to carry out resource coordination,
And be accurately positioned for processing according to specific warning index, reduce fault rate.
Although the present invention is disclosed as above with preferred embodiment, so it is not limited to the present invention, any this area skill
Art personnel, without departing from the spirit and scope of the present invention, when a little modification can be made and perfect, therefore the protection model of the present invention
Enclose when by being defined that claims are defined.