Use inotify-tools to monitor system events in real timeInotify-toolsHttp://linux.die.net/man/1/inotifywaitInotify-tools# Wget http://downloads.sourceforge.net/project/inotify-tools/inotify-tools/3.13/inotify-tools-3.13.tar.gzMonitoring script:# Cat file_file_inotifywait.sh#! /Bin/shInotifywait =/usr/local/bin/inotifywaitMonitor_dir =/opt/web/$ Inotifywait-mr \-E create, move, delete, modify \-- Timefmt '% Y-% m-% d % H: % m '\-- Format '% T % e % w % F '\-- Exclude upload \$ Monitor_dir>/var/
0
1 Active Incident Coun 0 0
t
11 rows selected.
As shown above, the directory corresponding to Diag Trace is the directory where the Alert Log File in text format is located, and the Directory corresponding to Diag Alert is the warning
.
Abstract observer role: Defines an interface for all specific observers and updates themselves when receiving topic notifications.
Specific observer role: This is a specific topic. When the internal status of a group topic changes, all registered observers send a notification.
Specific observer role: Implements the update interface required by the abstract observer role, while aligning its status with the drawing status.
Observer mode structure2. Implementation
Abstract observer:
package
can provide stronger database backup capabilities. After log shipping is configured, it can copy the entire database to another server. In this case, transaction logs are also regularly sent to the backup server for data recovery. This keeps the server in the Hot Backup state and updates the server when the data changes. Another server is called a monitoring server. It can be used to monitor shipping signa
;Log status of active, current state cannot be deleted, you need to manually switch the log until it can be deleted.Sql>alter Database drop logfile Group 9;Sql>alter database Drop logfile Group 5,group 6;To remove a member directive: ALTER DATABASE drop logfile member ' Sql>alter database Drop logfile member '/u01/oracle/oradata/orcl/redo07.log ';Sql>alter Databa
Use seek to monitor file content and print out changes:#/usr/bin/env python#-*-coding=utf-8-*-pos = 0while True:con = open ("A.txt") if pos! = 0:con.seek (pos,0) While true:line = Con.readline () if Line.strip (): Print Line.strip () pos = pos + len (line) if not Line.strip (): Brea K Con.close ()Use the tool pyinotify Monitor file content changes, when the file
center (where the database is primarily established, and the Administrator password)Step three, modify the monitor configuration file and compileThe main setting of the database connection information, need to monitor the Web directory with "/" End# Vim Src/conf/global.conf# CD release/# makeAfter running, the Falcon file is generated under the release folderFourth step, background running
Keywords: linux, monitoringIf you want to keep your server running at peak performance, you should set the Linux server's RunLevel runlevel to 3, which is the console mode, and use the STARTX command to start it when you need a graphical desktop. Modify configuration/etc/inittab to find Initdefault, change the ID: 5:initdefault to Id:3:initdefault.System management issues that need to be checked regularly
Configuration Management
Backup
Test your backup
IntroducedThis article mainly introduces a kind of lightweight file monitoring method, the file Create change Delete, there is a corresponding event method for processing. For the core file monitor class, we inherited a listener adapter class Filealterationlisteneradaptor, which makes it easier to rewrite every event
parameters for INotify
/proc/sys/fs/inotify/max_queued_events Default value: 16384 The value in this file is the maximum value allocated to the number of event queues that can be queued in the INotify instance when the Inotify_init is invoked. Beyond this worthy event is discarded, but triggers the In_q_overflow event
/proc/sys/fs/inotify/max_user_instances Default Value: 128 Specifies the maximum number of inotify instatnces that can be created by e
Using shell scripts to monitor and manage Oracle databases will greatly simplify DBA workload, such as common instance monitoring, monitoring, and alarm log monitoring, and database backup, AWR report automatic mail, etc. This section describes how to use the shell script to monitor the Oracle alarm
only increase with can be deleted
Chattr-a/var/log/messages minus-a property
Lsattr/var/log/messages Viewing hidden properties
You accidentally "manually" changed the login file, such as the/var/log/messages, you accidentally opened him with VI, leaving but issued: Wq parameters, hehe! Th
backup/differential backup is performed); BACKUP LOG database name with with NO_LOG or set the database option to "Simple Mode" (SQL 2008 only supports this method and does not support manual emptying of the log) 4 , experience Summary, precautionary measures and normative advice The automatic growth of the database, the proposed set to "**MB", reduce the use of "**%"; For databases that do not require bac
Author: Liu Zhiyong Guo conghui
Logs should also be noted by users. Do not underestimate the importance of log files for network security. Because log files can record various daily events of the system in detail, you can check the causes of errors through log files, or trace the attackers when they are attacked or attacked. Two important roles of logs are review
Logs should also be noted by users. Do not underestimate the importance of log files for network security. Because log files can record various daily events of the system in detail, you can check the causes of errors through log files, or trace the attackers when they are attacked or attacked. Two important roles of logs are review and
Tags: cat config ast rip success user std file appThe monitoring logs and warning logs for Oracle 11g are all in the/opt/oracle/app/diag/tnslsnr/machine name/listener directoryWhere the warning log is in the alert directory, the listening log is under the trace directory. The log
Print output-guided log file in PythonA. Use Sys.stdout to direct the print line to a log file of your definition, for example:Import Sys# Make a copy of original stdout Routestdout_backup= Sys.stdout# define the log file that rec
Issue: Login server times No monitoring serviceCheck the steps:1. Enter Sqlplus to view the status of the database, showing that the current database status is openScript: Select status from V$instance;2, check the database monitoring service, log in to find that the speed of entering the listener is very slowScript: Lsnrctl Status3, check the size of the listeni
system. Deleting a file system will automatically delete the logical volume in which the file system is located, whether the file system was established directly or on an existing logical volume. The relevant information in ODM and/etc/filesystems is also deleted.File System space management: Although AIX provides dynamic expansion capabilities for
listener password (listener)Configure the Oracle client to connect to the database
For more information about user-managed backup and recovery, seeOracle cold backupOracle Hot BackupConcept of Oracle backup recoveryOracle instance recoveryOracle recovery based on user managementSystem tablespace management and Backup RecoverySysaux tablespace management and recoveryOracle backup control file recovery (unsing backup controlfile)
For information on RMA
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.