[go: up one dir, main page]

CN107943471A - Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program - Google Patents

Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program Download PDF

Info

Publication number
CN107943471A
CN107943471A CN201711226002.2A CN201711226002A CN107943471A CN 107943471 A CN107943471 A CN 107943471A CN 201711226002 A CN201711226002 A CN 201711226002A CN 107943471 A CN107943471 A CN 107943471A
Authority
CN
China
Prior art keywords
database
program
grep
check
monitoring data
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
CN201711226002.2A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711226002.2A priority Critical patent/CN107943471A/en
Publication of CN107943471A publication Critical patent/CN107943471A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present invention provides a kind of method for coming monitoring data storehouse in Linux dual systems using program, is related to database monitoring technology, and the close coupling of traditional duplex software is changed into loose coupling by the present invention, and the program function being internally integrated is discharged into outside to load.Program code amount is reduced, reduces the competency profiling and workload of developer, deployment is improved and safeguards easness.

Description

一种Linux双机系统中使用程序来监控数据库的方法A method of using program to monitor database in Linux dual-computer system

技术领域technical field

本发明涉及数据库监控技术,尤其涉及一种Linux双机系统中使用程序来监控数据库的方法。The invention relates to a database monitoring technology, in particular to a method for using a program to monitor a database in a Linux dual-computer system.

背景技术Background technique

现代IT系统中,上层应用状态的监控重要性不言而喻,各种双机等业务软件也层出不穷。但是现在的双机软件都是紧耦合部署监控,对于软件的开发量,开发人员的要求,开发的质量和后期的部署维护都提出了很高的要求。In modern IT systems, the importance of monitoring the status of upper-layer applications is self-evident, and various dual-machine and other business software are also emerging in an endless stream. However, the current dual-machine software is tightly coupled deployment monitoring, which puts forward high requirements for the amount of software development, the requirements of developers, the quality of development, and the later deployment and maintenance.

针对常规的双机软件系统,通常一个软件大包大揽,各种功能都集成在里面,一个软件动辄好几百兆甚至好几个G大小。软件架构非常复杂,各个模块之间依赖性很强,牵一发动全身,对开发人员要求很高,对实施维护人员也要求也比较高。并且部署起来对于宿主机的资源要求非常高,否则不能满足软件的要求。并且某一个功能出现BUG,对于开发人员来说都是非常棘手的。For a conventional dual-machine software system, usually a single software package contains all kinds of functions, and the size of a software can be hundreds of megabytes or even several gigabytes. The software architecture is very complex, and the dependencies between various modules are very strong, which affects the whole body. It has high requirements for developers and implementation and maintenance personnel. And the resource requirements of the host machine are very high when deployed, otherwise the software requirements cannot be met. And if there is a bug in a certain function, it is very difficult for developers.

因为上面这种软件发展的弊端,一种松耦合的软件部署开发部署方式越来越受到客户、开发人员、实施维护人员的欢迎。在市场面前,此种需求越来越强烈。Because of the disadvantages of the above software development, a loosely coupled software deployment and development deployment method is more and more welcomed by customers, developers, and implementation and maintenance personnel. In front of the market, this demand is getting stronger and stronger.

发明内容Contents of the invention

为了解决以上技术问题,本发明提出了一种Linux双机系统中使用程序来监控数据库的方法。软件架构进行质变,由原来的紧耦合变为松耦合。软件代码量变少,开发人员的素质要求降低,开发质量提升,后期的部署和维护复杂度降低。In order to solve the above technical problems, the present invention proposes a method for using a program in a Linux dual-computer system to monitor a database. The software architecture undergoes a qualitative change, from tight coupling to loose coupling. The amount of software code is reduced, the quality requirements of developers are lowered, the quality of development is improved, and the complexity of later deployment and maintenance is reduced.

本发明把传统双机软件的紧耦合变为松耦合,内部集成的程序功能释放到外部来加载。降低了程序代码量,降低了开发人员的素质要求和工作量,提升了部署和维护容易度The invention changes the tight coupling of traditional two-machine software into loose coupling, and releases the internally integrated program functions to the outside for loading. Reduce the amount of program code, reduce the quality requirements and workload of developers, and improve the ease of deployment and maintenance

具体做法如下:The specific method is as follows:

(1)、首先先写好外部程序,此程序的功能完成对数据库的启动和停止,完成对数据库和数据库监听程序的检测。程序的写法很多,不具有死板的要求。能实现相应的功能即可。(1) First, write the external program. The function of this program completes the start and stop of the database, and completes the detection of the database and the database monitoring program. There are many ways to write the program, and there are no rigid requirements. The corresponding function can be realized.

数据库启动:Database startup:

connect / as sysdbaconnect / as sysdba

startupstartup

exit;exit;

数据库停止:Database stopped:

connect / as sysdbaconnect / as sysdba

shutdown immediateshutdown immediate

exit;exit;

对数据库的检测:Detection of the database:

check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`

while [ $check ]while [ $check ]

dodo

sleep 3 sleep 3

check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'` check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`

donedone

对数据库监听的检测:Detection of database monitoring:

check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`

while [ $check ]while [ $check ]

dodo

sleep 3 sleep 3

check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'` check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`

donedone

当然了上面只是举例的一种,开发人员开发的时候只要能实现对应的功能即可,灵活处理,不死板,不拘泥于格式等。Of course, the above is just an example. Developers only need to be able to realize the corresponding functions when developing, and they can handle them flexibly, not rigidly, and not sticking to the format.

(2)、然后部署松耦合方式的双机软件系统来监控数据库,对于启动的地方,可以用到上面开发的启动数据库的程序。同理,对于关闭数据库,用到上面关闭数据库的程序。对于数据库和数据库监听的监控,在双机软件系统中创建EXCE可执行的资源,资源中调用上面开发的监控数据库程序,监控数据库监听程序。(2), and then deploy a loosely coupled two-machine software system to monitor the database. For the starting place, the program for starting the database developed above can be used. Similarly, for closing the database, use the procedure for closing the database above. For the monitoring of the database and database monitoring, create EXCE executable resources in the dual-machine software system, and call the monitoring database program developed above in the resources to monitor the database monitoring program.

程序是事先设置好的SH格式的可执行文件,用软件来调用。软件只是调用,非自身功能,设置简化,松耦合,遇到故障便于分隔独立排查,增加可维护性。The program is an executable file in SH format set in advance, which is called by software. The software is only called, not its own function, the setting is simplified, loosely coupled, and it is easy to separate and independently troubleshoot when encountering a fault, increasing maintainability.

程序的设计可以不拘泥于格式,只要能实现拉起数据库和检测数据库状态的功能。灵活编写,对人员要求低,降低实现成本。The design of the program may not be limited to the format, as long as it can realize the functions of pulling up the database and detecting the state of the database. Flexible writing, low requirements for personnel, and reduced implementation costs.

程序本身实现的功能比较简单,对于双机系统中调用程序来实现数据库的监控不是很复杂,现实中具有很强的操作性和普适性,提高工作效率。The functions realized by the program itself are relatively simple, and it is not very complicated to call the program to realize the monitoring of the database in the dual-computer system. In reality, it has strong operability and universality, and improves work efficiency.

本发明的有益效果是The beneficial effect of the present invention is

这样部署松耦合的双机软件系统,对于数据库相关的一些操作和监控就全部由外部程序来完成了。降低了双机软件系统本身的操作,同时对应的软件内部开发也降低了复杂度。功能转移到外部来实现。实现了Linux中双机软件系统由原来紧耦合变为松耦合来监控数据库的方法。In this way, the loosely coupled two-machine software system is deployed, and some operations and monitoring related to the database are all completed by external programs. The operation of the dual-computer software system itself is reduced, and the corresponding internal development of the software also reduces the complexity. The functionality is shifted to the outside for implementation. Realized the method of monitoring the database in the dual-computer software system in Linux from tight coupling to loose coupling.

具体实施方式Detailed ways

下面对本发明的内容进行更加详细的阐述:The content of the present invention is described in more detail below:

具体做法如下:The specific method is as follows:

(1)、首先先写好外部程序,此程序的功能完成对数据库的启动和停止,完成对数据库和数据库监听程序的检测。如下就是一种:(1) First, write the external program. The function of this program completes the start and stop of the database, and completes the detection of the database and the database monitoring program. The following is one:

数据库启动:Database startup:

connect / as sysdbaconnect / as sysdba

startupstartup

exit;exit;

数据库停止:Database stopped:

connect / as sysdbaconnect / as sysdba

shutdown immediateshutdown immediate

exit;exit;

对数据库的检测:Detection of the database:

check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`

while [ $check ]while [ $check ]

dodo

sleep 3 sleep 3

check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'` check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`

donedone

对数据库监听的检测:Detection of database monitoring:

check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`

while [ $check ]while [ $check ]

dodo

sleep 3 sleep 3

check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'` check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`

donedone

(2)、然后部署松耦合方式的双机软件系统来监控数据库,对于启动的地方,用到上面开发的启动数据库的程序。同理,对于关闭数据库,用到上面关闭数据库的程序。对于数据库和数据库监听的监控,在双机软件系统中创建EXCE可执行的资源,资源中调用上面开发的监控数据库程序,监控数据库监听程序。(2), and then deploy a loosely coupled two-machine software system to monitor the database. For the start-up place, use the program to start the database developed above. Similarly, for closing the database, use the procedure for closing the database above. For the monitoring of the database and database monitoring, create EXCE executable resources in the dual-machine software system, and call the monitoring database program developed above in the resources to monitor the database monitoring program.

本发明将功能分散后,便产生了一种自然的好处,就是功能松耦合,功能独立部署,部署和后期维护都很有针对性,针对特定功能做特定的部署,后面特定的功能除了问题做特定的维护即可。After the present invention disperses the functions, it produces a natural benefit, that is, the functions are loosely coupled, the functions are deployed independently, and the deployment and post-maintenance are very targeted. Specific deployments are made for specific functions. Specific maintenance will do.

本发明大大减少了人力成本和实现成本,具有很强的操作性和实施性,对于推广具有天然的优势。The invention greatly reduces labor costs and implementation costs, has strong operability and implementability, and has natural advantages for popularization.

Claims (4)

1. carry out the method in monitoring data storehouse in a kind of Linux dual systems using program, it is characterised in that
The close coupling of traditional duplex software is changed into loose coupling, the program function being internally integrated is discharged into outside to load.
2. according to the method described in claim 1, it is characterized in that,
Specific practice is as follows
(1), finish writing external program first, the startup and stopping of the function database of this program, database and The detection of database oracle listener;
(2)And then the duplex software system of deployment loose coupling mode comes monitoring data storehouse, for the place of startup, uses above The program in the log-on data storehouse of exploitation;Similarly, for closing database, the program for closing database above is used;For data The monitoring that storehouse and database are monitored, the resource that EXCE can perform is created in duplex software system, is called in resource developed above Monitoring data library, monitoring data storehouse oracle listener.
3. according to the method described in claim 2, it is characterized in that,
Program is the executable file of the SH forms set in advance, is called with software.
4. according to the method described in claim 3, it is characterized in that,
Specific procedure is:
Database starts:
connect / as sysdba
startup
exit;
Database stops:
connect / as sysdba
shutdown immediate
exit;
Detection to database:
check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}'`
while [ $check ]
do
sleep 3
check=`ps -aef |grepora_pmon_orcl |grep -v grep |awk '{print $2}' `
done
The detection monitored database:
check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`
while [ $check ]
do
sleep 3
check=`ps -aef |greptnslsnr |grep -v grep |awk '{print $2}'`
done。
CN201711226002.2A 2017-11-29 2017-11-29 Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program Pending CN107943471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711226002.2A CN107943471A (en) 2017-11-29 2017-11-29 Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711226002.2A CN107943471A (en) 2017-11-29 2017-11-29 Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program

Publications (1)

Publication Number Publication Date
CN107943471A true CN107943471A (en) 2018-04-20

Family

ID=61947609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711226002.2A Pending CN107943471A (en) 2017-11-29 2017-11-29 Carry out the method in monitoring data storehouse in a kind of Linux dual systems using program

Country Status (1)

Country Link
CN (1) CN107943471A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763126A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 System and method for monitoring database and database monitoring device
US20160170743A1 (en) * 2014-12-10 2016-06-16 Salesforce.Com, Inc. Template based software container
CN106406911A (en) * 2016-10-26 2017-02-15 国云科技股份有限公司 A Method for Functional Componentization of Computer Software System

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763126A (en) * 2013-12-27 2014-04-30 乐视网信息技术(北京)股份有限公司 System and method for monitoring database and database monitoring device
US20160170743A1 (en) * 2014-12-10 2016-06-16 Salesforce.Com, Inc. Template based software container
CN106406911A (en) * 2016-10-26 2017-02-15 国云科技股份有限公司 A Method for Functional Componentization of Computer Software System

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
匿名用户: "解释下这个awk正则表达式", 《百度知道》 *

Similar Documents

Publication Publication Date Title
EP4004738B1 (en) Time-travel debugging with hot code replacement
US10761860B2 (en) Dynamically loaded plugin architecture
US8453118B2 (en) Automated multi-operating system testing with virtualization
US10713183B2 (en) Virtual machine backup using snapshots and current configuration
US8776028B1 (en) Virtual execution environment for software delivery and feedback
CN106933570B (en) A software platform for aerospace measurement, launch and control based on plug-in technology
CN101599039B (en) Exception handling method and device in embedded C language environment
CN102467448B (en) Test method and system of test case
US9164790B2 (en) Live virtual machine template creation
CN103620561B (en) The method and system of interoperability debugging when running for n road
CN104239037A (en) Software framework with reconfigurable business function
US20130042150A1 (en) Checkpoint Debugging Using Mirrored Virtual Machines
US6839647B2 (en) Same virtual machine mode for distributed test execution
US10740217B1 (en) Non-native system-level debugging using symbolic information
US10996935B2 (en) Automated technology modernization accelerator
CA2904253C (en) Computer system using in-service software upgrade
CN103019941B (en) program debugging method and device
CN105740139B (en) A kind of debugging embedded software method based on virtual environment
US7353498B2 (en) Multi-process debugger
CN106201745A (en) The remote debugging method of application program, remote debugging system and terminal
CN111459623A (en) Method and device for restoring running of application program and computer
CN102307208A (en) Virtual machine operation control device and operation control method based on cloud computing
CN103235755A (en) Basic input output system (BIOS) remote network debugging method
Kim et al. Dual execution for on the fly fine grained execution comparison
US20260010434A1 (en) Distributed package management using meta-scheduling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for 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: 20180420