??? Generally, the oracle database is slower. First, you need to find the process with the largest memory and CPU occupied by the AIX operating system, and then find the corresponding oraclesession and program by the process ID, to optimize .??? Do the following :???? AIX operating system operation: Memory sorting :??? Ps-ealf | head-1; p
? ? ? Generally, when the oracle database is slow, the system first looks for the process with the largest memory and CPU occupied by the AIX operating system, and then finds the corresponding oracle session and program by the process ID, to optimize. ? ? ? Do the following :? ?? ? AIX operating system operation: Memory sorting :? ? ? Ps-ealf | head-1; p
? ? ? Generally, when the oracle database is slow, the system first looks for the process with the largest memory and CPU occupied by the AIX operating system, and then finds the corresponding oracle session and program by the process ID, to optimize.
? ? ? Do the following:
? ??? Operating System of AIX:
- Memory sorting :? ? ? Ps-ealf | head-1; ps-ealf | sort-rn + 9 | head-50
- CPU sorting :? ? ?? Ps aux | head-1; ps aux | sort-rn + 2 | head-20
- Find the maximum resource: ps aux | sort-rn + 2 | head-20
? ? ?
Two Dynamic views of Oracle:
- Gv $ process: the process here is at the operating system level and the portal for debugging the oracle database;
- Gv $ session: Enter the oracle session, view the corresponding program, and so on.
? ? ? ? ? Note: g in front of v indicates the cluster. If multiple instances exist, you can use the gv $ view to conveniently view the instances where the program runs.
??
? ? Procedure:
? ?? ? ?? First, find the address of the Process corresponding to the largest resource PID: select addr from gv $ process where spid in (6423194)
? ? ?? ? ?? Select? Addr? From? Gv $ process? Where? Spid? In? (1880090 ?)
? ??? ? ? Search for the session corresponding to the process and view the corresponding username, machine, program, and so on.
? ??? ? ?? Select? *? From? Gv $ session ?? Where? Paddr? In? (Select? Addr? From? Gv $ process? Where? Spid? In? (? 1880090 ))
Author: yichangzyh posted on 20:19:35 Original article link
Read: 83 comments: 0 view comments
Original article address: Find the program corresponding to the oracle session based on memory usage. Thank you for sharing it with the original author.