Home Database Mysql Tutorial Oracle OS Watcher 安装与错误处理

Oracle OS Watcher 安装与错误处理

Jun 07, 2016 pm 05:20 PM
o

使用oracle的osw工具,可以对系统的CPU和内存,磁盘等进行图形化的展示,对于把握和了解整体的资源使用情况,具有直观的效果。OS

1. 概述
--------------
使用Oracle的osw工具,可以对系统的CPU和内存,磁盘等进行图形化的展示,对于把握和了解整体的资源使用情况,具有直观的效果。
OSW工具由一系列shell脚本构成,
OSWatcher.sh是主调程序,派生出许多单个的shell进程,使用unix的操作系统诊断工具,来收集特定类型的数据
OSW调用特定的操作系统工具,每个工具作为一个特定的后台进程,进行数据收集。
一般而言支持下述工具:
ps
top
mpstat
iostat
netstat
traceroute
vmstat
输出结果可以进行图形化的展示,当然,也可以使用shell脚本对收集的archive信息进行处理。
--------------
2. 支持平台
--------------
OSW可以运行于下述平台之上:
AIX
Tru64
Solaris
HP-UX

Linux

这个工具要去METLINKE上下载 不过可以到LinuxIDC.COM的ftp资源上下载

下载在Linux公社的1号FTP服务器里,,下载地址:

FTP地址:ftp://www.linuxidc.com

用户名:

密码:

在 2012年LinuxIDC.com\9月\Oracle OS Watcher 安装与错误处理

下载方法见

这个工具可以在Oracle用户下安装,不必要在root下

Oracle] tar -xvf  osw301.tar

>cd osw

4. 启动与停止
--------------
./startOSW.sh 60 10
./stopOSW.sh
nohup ./startOSW.sh 60 10 &


60:数据收集的间隔,以秒为单位
10: 数据收集多长时间,以小时为单位

5. 图形化输出展示

[oracle@node1 osw]$ java -jar oswg.jar -i archive/
Warning: -jar not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: oswg.jar
  at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
  at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
  at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
  at __gcj_personality_v0 (/opt/oracle/database/admin/dbsrcipt/osw/java.version=1.4.2)
  at __libc_start_main (/lib/tls/libc-2.3.4.so)
  at _Jv_RegisterClasses (/opt/oracle/database/admin/dbsrcipt/osw/java.version=1.4.2)

先要检查JAVA版本

# java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build ca142-20050609 (JIT enabled: jitc))


[oracle@node11g ~]$ which java
/usr/bin/java

----10g运行前执行:
[oracle@node10g ~]$ export PATH=$ORACLE_HOME/jre/1.4.2/bin:$PATH
----11g运行前执行:
[oracle@node11g ~]$ export PATH=$ORACLE_HOME/jdk/jre/bin:$PATH

[oracle@node1 osw]$ java -jar oswg.jar -iarchive/

Starting OSWg V3.0.1

OSWatcher Graph Written by Oracle Centerof Expertise

Copyright (c)  2008 by Oracle Corporation

 

Parsing Data. Please Wait...

 

 

Parsing file node1_vmstat_12.09.28.1100.dat...

Invalid data found on line 8

Parsing file node1_vmstat_12.09.28.1700.dat...

 

Parsing Completed.

 

Enter 1 to Display CPU Process Queue Graphs

Enter 2 to Display CPU Utilization Graphs

Enter 3 to Display CPU Other Graphs

Enter 4 to Display Memory Graphs

 

Enter 6 to Generate All CPU Gif Files

Enter 7 to Generate All Memory Gif Files

 

Enter L to Specify Alternate Location ofGif Directory

Enter T to Specify Different Time Scale

Enter D to Return to Default Time Scale

Enter R to Remove Currently DisplayedGraphs

Enter P to Generate A Profile

Enter Q to Quit Program

 

Please Select an Option:6

Xlib: connection to ":0.0"refused by server

Xlib: No protocol specified

 

Exception in thread "main"java.lang.InternalError: Can't connect to X11 window server using ':0.0' as thevalue of the DISPLAY variable.

      at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

      at sun.awt.X11GraphicsEnvironment.(Unknown Source)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Unknown Source)

      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(UnknownSource)

      at java.awt.Window.init(Unknown Source)

      at java.awt.Window.(Unknown Source)

      at java.awt.Frame.(Unknown Source)

      at java.awt.Frame.(Unknown Source)

      at OSWGraph.GraphObject.graphMetric(GraphObject.java:145)

      at OSWGraph.OSWGraph.main(OSWGraph.java:616)

编辑环境变量


[root@node1 ~]# vi /home/oracle/.bash_profile

export DISPLAY=192.168.30.42:0.0  --指客户端IP

[root@node1 ~]# source /home/oracle/.bash_profile

[root@node1 ~]# su - oracle


[oracle@node1 osw]$ java -jar oswg.jar -iarchive/

 

Starting OSWg V3.0.1

OSWatcher Graph Written by Oracle Centerof Expertise

Copyright (c)  2008 by Oracle Corporation

 

Parsing Data. Please Wait...

 

 

Parsing file node1_vmstat_12.09.28.1100.dat...

Invalid data found on line 8

Parsing file node1_vmstat_12.09.28.1700.dat...

 


Parsing Completed.

--输入参数 分别输出不同类型的GIF


Enter 1 to Display CPU Process Queue Graphs

Enter 2 to Display CPU Utilization Graphs

Enter 3 to Display CPU Other Graphs

Enter 4 to Display Memory Graphs

 

Enter 6 to Generate All CPU Gif Files

Enter 7 to Generate All Memory Gif Files

 

Enter L to Specify Alternate Location ofGif Directory

Enter T to Specify Different Time Scale

Enter D to Return to Default Time Scale

Enter R to Remove Currently DisplayedGraphs

Enter P to Generate A Profile

Enter Q to Quit Program

 

Please Select an Option:6

Generating filegif/Sep28171028_1348827319/OSWg_OS_Run_Queue.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Block_Queue.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Cpu_Idle.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Cpu_System.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Cpu_User.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Cpu_Interrupts.gif

Generating filegif/Sep28171028_1348827319/OSWg_OS_Context_Switches.gif

 在GIF目录下生成了GIF图形 要拖到WINDOWS来看


 

Enter 1 to Display CPU Process Queue Graphs

Enter 2 to Display CPU Utilization Graphs

Enter 3 to Display CPU Other Graphs

Enter 4 to Display Memory Graphs

 

Enter 6 to Generate All CPU Gif Files

Enter 7 to Generate All Memory Gif Files

 

Enter L to Specify Alternate Location ofGif Directory

Enter T to Specify Different Time Scale

Enter D to Return to Default Time Scale

Enter R to Remove Currently DisplayedGraphs

Enter P to Generate A Profile

Enter Q to Quit Program

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.

How to start the listening program in oracle How to start the listening program in oracle May 10, 2024 am 03:12 AM

Oracle listeners are used to manage client connection requests. Startup steps include: Log in to the Oracle instance. Find the listener configuration. Use the lsnrctl start command to start the listener. Use the lsnrctl status command to verify startup.

What are the stages of Oracle database startup? What are the stages of Oracle database startup? May 10, 2024 am 03:15 AM

Oracle database startup is divided into 7 stages: 1. Initialization; 2. Instance recovery; 3. Archive log recovery; 4. Crash recovery; 5. Object opening; 6. Server preparation; 7. Server startup. The process involves loading library files, configuring parameters, restoring the database instance, applying archive logs, updating data files and objects, and finally starting the database service to accept queries.

How to install and register the btc trading app? How to install and register the btc trading app? Feb 21, 2025 pm 07:09 PM

This article will provide a detailed introduction to how to install and register a Bitcoin trading application. The Bitcoin trading app allows users to manage and trade cryptocurrencies such as Bitcoin. The article guides users through the installation and registration process step by step, including downloading applications, creating accounts, performing identity verification, and first deposit. The goal of the article is to provide beginners with clear and easy-to-understand guidelines to help them easily enter the world of Bitcoin trading.

See all articles