Install and use oswatch

Source: Internet
Author: User

Author: skate

Time: 2011/08/06

 

 

 

Install and use oswatch

 

1. Download and install

Oswatch is easy to install and use. Like nmon, it can be directly decompressed after download.

Oswatch collects information by calling system commands, such as PS, top, mpstat, iostat, netstat, and traceroute vmstat. Supported operating systems are Aix, Tru64, Solaris, HP-UX, Linux; of course there are also Windows Version
 
You can download OS watcher User Guide [ID 301137.1] At metlink.

Download the tar package and decompress it directly to check whether the execution permission is available. If not, grant the execution permission.

1.
[Root @ dhdb software] # pwd
/Tmp/software
[Root @ dhdb software] # ls
Osw302.tar

[Root @ dhdb software] # tar xvf osw302.tar
OSW/
OSW/exampleprivate.net
OSW/oswatcher. Sh
OSW/oswatcherfm. Sh
OSW/oswgreadme.txt
OSW/iosub. Sh
OSW/mpsub. Sh
OSW/oswg. Jar
OSW/oswib. Sh
OSW/oswlnxio. Sh
OSW/oswlnxtop. Sh
OSW/oswnet. Sh
OSW/oswrds. Sh
OSW/oswsub. Sh
OSW/pssub. Sh
OSW/startosw. Sh
OSW/stoposw. Sh
OSW/tarupfiles. Sh
OSW/topaix. Sh
OSW/topsub. Sh
OSW/vmsub. Sh
OSW/tmp/
OSW/src/
OSW/src/coe_logo.gif
OSW/src/missing_graphic.gif
OSW/src/oswg_input.txt
OSW/src/osw_profile.htm
OSW/src/thumbs. DB
OSW/src/tombody.gif
OSW/src/watch.gif
OSW/readme.txt

[Root @ dhdb software] # ls
OSW osw302.tar

[Root @ dhdb software] # ls OSW
Exampleprivate.net oswatcher. Sh oswlnxio. Sh oswsub. Sh startosw. Sh topaix. Sh
Iosub. Sh oswg. Jar oswlnxtop. Sh pssub. Sh stoposw. Sh topsub. Sh
Mpsub. Sh oswgreadme.txt oswnet. Sh readme.txt tarupfiles. Sh vmsub. Sh
Oswatcherfm. Sh oswib. Sh oswrds. Sh SRC TMP

[Root @ dhdb software] # ls-l OSW
Total 1336
-Rwxr-XR-x 1 1003 DBA 1730 Aug 20 2009 exampleprivate.net
-Rwxr-XR-x 1 1003 DBA 549 Aug 20 2009 iosub. Sh
-Rwxr-XR-x 1 1003 DBA 549 Aug 20 2009 mpsub. Sh
-Rwxr-XR-x 1 1003 DBA 4451 Aug 20 2009 oswatcherfm. Sh
-Rwxr-XR-x 1 1003 DBA 22511 May 4 oswatcher. Sh
-RW-r -- 1 1003 DBA 1226302 Feb 11 oswg. Jar
-RW-r -- 1 1003 DBA 14781 May 4 oswgreadme.txt
-Rwxr-XR-x 1 1003 DBA 415 Aug 20 2009 oswib. Sh
-Rwxr-XR-x 1 1003 DBA 659 Aug 20 2009 oswlnxio. Sh
-Rwxr-XR-x 1 1003 DBA 829 Aug 20 2009 oswlnxtop. Sh
-Rwxr-XR-x 1 1003 DBA 357 Aug 20 2009 oswnet. Sh
-Rwxr-XR-x 1 1003 DBA 826 Aug 20 2009 oswrds. Sh
-Rwxr-XR-x 1 1003 DBA 529 Aug 20 2009 oswsub. Sh
-Rwxr-XR-x 1 1003 DBA 549 Aug 20 2009 pssub. Sh
-RW-r -- 1 1003 DBA 8513 May 4 readme.txt
Drwxr-XR-x 2 1003 DBA 4096 Aug 31 2009 SRC
-Rwxr-XR-x 1 1003 DBA 1638 Feb 11 startosw. Sh
-Rwxr-XR-x 1 1003 DBA 560 Aug 20 2009 stoposw. Sh
-Rwxr-XR-x 1 1003 DBA 127 Aug 20 2009 tarupfiles. Sh
Drwxr-XR-x 2 1003 DBA 4096 Aug 20 2009 TMP
-Rwxr-XR-x 1 1003 DBA 431 Aug 20 2009 topaix. Sh
-Rwxr-XR-x 1 1003 DBA 550 Aug 20 2009 topsub. Sh
-Rwxr-XR-x 1 1003 DBA 549 Aug 20 2009 vmsub. Sh
[Root @ dhdb software] #

[Root @ dhdb OSW] # cp startosw. sh/bin/oswstart
[Root @ dhdb OSW] # cp startosw. sh/usr/bin/oswstart
[Root @ dhdb OSW] # cp startosw. sh/usr/local/bin/oswstart

[Root @ dhdb OSW] # oswstart
Info... You did not enter a value for snapshotinterval.
Info... using default value = 30
Info... You did not enter a value for archiveinterval.
Info... using default value = 48

Testing for discovery of OS utilities...

[Root @ dhdb OSW] # cp stoposw. sh/bin/oswstop
[Root @ dhdb OSW] # cp stoposw. sh/usr/bin/oswstop
[Root @ dhdb OSW] # cp stoposw. sh/usr/local/bin/oswstop

Oswatch is easy to use. It requires two parameters.

 

# Oswstart arg1 arg2
Arg1: data collection interval, in seconds
Arg2: how long the data is collected, in hours

 

For example, the following information is collected every 30 seconds.

[Root @ dhdb OSW] # oswstart 30 1
[Root @ dhdb OSW] #

Testing for discovery of OS utilities...

Vmstat found on your system.
Warning... iostat not found on your system. No iostat data will be collected.
Warning... mpstat not found on your system. No mpstat data will be collected.
Netstat found on your system.
Top found on your system.

Discovery completed.

Starting oswatcher v3.0.2 on Sat Aug 6 18:01:31 CST 2011
With snapshotinterval = 30
With archiveinterval = 1

Oswatcher-written by Carl Davis, center of expertise, Oracle Corporation

Starting data collection...

OSW heartbeat: Sat Aug 6 18:01:31 CST 2011

If the collection starts for the first time, an archive sub-directory will be generated under the oswatch installation directory to store the collected information, such

[Root @ dhdb OSW] # ls./archive/
Oswiostat oswmeminfo oswmpstat oswnetstat oswprvtnet oswps oswslabinfo oswtop oswvmstat
[Root @ dhdb OSW] #

You can view the information after it is collected,

[Root @ dhdb OSW] # Java-jar oswg. jar-I./archive

Starting oswg v3.0.1
Oswatcher graph written by Oracle center of expertise
Copyright (c) 2008 by Oracle Corporation

Parsing data. Please wait...

Error. You do not have a legitimate version of Java in your path.
Linux users please download and install Java from java.sun.com or
See the oswgreadme for instructions on how to use the version of Java
That comes shipped with the Oracle database.

[Root @ dhdb OSW] #

That is because the Oracle Java version is not used. Add the Oracle Java version to the root environment variable, as shown below:

Add the jar environment to path:
Export Path = $ ORACLE_HOME/JRE/1.4.2/bin: $ path

 

[Root @ dhdb OSW] # vi/root/. bash_profile

#. Bash_profile

# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
.~ /. Bash_profile111
# User specific environment and startup programs

Path = $ home/bin:/Oracle/product/10.2.0/db_1/JRE/1.4.2/bin: $ path

Export path
Unset Username

~
~
~
~
"~ /. Bash_profile "15l, 262c written
[Root @ dhdb OSW] #

[Root @ dhdb ~] # Java-Jar/tmp/software/OSW/oswg. jar-I/tmp/software/OSW/archive

Starting oswg v3.0.1
Oswatcher graph written by Oracle center of expertise
Copyright (c) 2008 by Oracle Corporation

Parsing data. Please wait...

Parsing file dhdb_vmstat_11.08.06.1700.dat...
Parsing file dhdb_vmstat_11.08.06.1800.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 of GIF directory
Enter t to specify different time scale
Enter d to return to default time scale
Enter R to remove currently displayed Graphs
Enter P to generate a profile
Enter Q to quit Program

Please select an option: 6

So far, the installation and use of oswatch have been completed.

Comparison between oswatch and nmon
1. oswatch monitoring, collection, and viewing can all be completed on the server, while nmon needs to be uploaded to Windows for viewing.
2. According to my use, nmon displays more comprehensive information and looks more comfortable.

 

 

 

 

----- End ---------

 

 

 

 

 

 

 

 

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.