The business database systems of all enterprises are the top priority. To ensure system security and stability, DBAs must record relevant inspection indicators on a daily basis, today, let's briefly describe the CPU
The business database systems of all enterprises are the top priority. To ensure system security and stability, DBAs must record relevant inspection indicators on a daily basis, today, let's briefly describe the CPU
The business database systems of all enterprises are the top priority. To ensure system security and stability, DBAs need to record relevant inspection indicators on a daily basis. Today we will give a brief introduction.
OS Health Check
Fill in the CPU, memory, disk I/O status, network status, and other information in the morning and afternoon peak check conditions. For CPU, memory, and disk I/O record values, for network conditions, the record is normal or abnormal.
Detect CPU usage
We can see that the load for 1 minute, 5 minutes, and 15 minutes is 0, and the system is healthy.
Detect memory status
As you can see, although the memory usage is more than 90%, the SWAP partition is not occupied, so it is a normal business situation.
Disk status detection
We can see that the file system only uses less than 10%, and there is a large disk space, which is very healthy.
Detect the system by using the vmstat command
Linux memory monitoring vmstat command output is divided into six parts: (references :)
1. Process procs:
R: Number of processes waiting in the running queue.
B: Number of processes waiting for io.
2. Linux memory monitoring memory memoy:
Swpd: available swap memory (unit: KB ).
Free: idle memory (unit: KB ).
Buff: the number of buffer memories (unit: KB ).
Cache: The amount of memory used as the cache (unit: KB ).
3. Linux memory monitoring swap switching page
Si: the number of pages exchanged from disk swap to memory. Unit: KB/second.
So: the number of pages exchanged from the memory to the disk. Unit: KB/second.
4. Linux memory monitoring I/O BLOCK devices:
Bi: number of blocks sent to the block device. Unit: block/second.
Bo: number of blocks received from the block device. Unit: block/second.
5. Linux memory monitoring system:
In: The number of interrupts per second, including clock interruptions.
Cs: the number of environment (context) Conversions per second.
6. Linux memory monitoring cpu central processor:
Cs: the time used by the user process. Expressed as a percentage.
Sy: the time used by the system process. Expressed as a percentage.
Id: the idle time of the central processor. Expressed as a percentage.
If r is often greater than 4 and the id is often less than 40, it indicates that the central processor is under heavy load. If bi and bo are not equal to 0 for a long time, the physical memory capacity is too small.
Detect the system using the iostat command
Important parameters (reference :)
% Util: The amount of time in one second for I/O operations, or the amount of time in one second for I/O queues is not empty.
Svctm: Average service time for each device I/O operation
Await: average wait time for each device I/O operation
Avgqu-sz: Average I/O Queue Length
If % util is close to 100%, it indicates that there are too many I/o requests, the I/o system is fully loaded, and the disk may have a bottleneck. Generally, if % util is greater than 70%, the I/o pressure is relatively high, wait has a high read speed. you can also view the parameters B (number of processes waiting for resources) and wa in combination with vmstat (percentage of CPU time occupied by IO wait, which is higher than 30% when I/O pressure is high ).
The size of await generally depends on the service time (svctm), the length of the I/O queue, and the mode in which I/O requests are sent. If svctm is close to await, it means that I/O has almost no waiting time. If await is much larger than svctm, it means that the I/O queue is too long and the response time of the application is slow.
Sar command Detection System
The sar command is complicated and involves many parameters. I will not explain it here.
Detect Oralce Processes
Oracle background processes are an important part of oracle instances. In US space, whether the background processes work properly directly determines whether Oracle runs normally. If the Oracle background process is stopped, the Oracle instance will crash. (There should be at least several major processes such as dbwr, lgwr, smon, pmon, and ckpt)
Oracle listener Detection
The Oracle listening process listens to connection requests sent to the database from the client (such as the application server), and then establishes a connection for the request. If the listening process is disabled, the connection between the application server and the database server cannot be established. (At least one SID must be in READY status)
Oracle Deadlock Detection
A deadlock occurs when two sessions intersect each other. Oracle automatically detects a deadlock and rolls back one of the transactions. The deadlock is generally caused by the application logic. When a deadlock occurs, the SQL statements that cause the deadlock should be fed back to the developers for further solution. (You should also check the alert logs frequently to see if there are serious or frequent ORA-errors and solve them)
Oracle Detection
Check the Oracle instance status
Under normal circumstances, the Oracle instance is in the OPEN state. By checking this item, you can determine whether the Oracle instance is normal.
Check the Oracle database status
You can check the database name, archive mode, and open mode to check whether the database is in normal state. (Archive is not enabled in the test database, which is normal)
Check the Oracle session Status