OS Watcher is a utility provided on MetaLink (Note 301137.1) primarily for support issues in a RAC environment. I must admit I was captivated by the name and wondered if I could use this tool instead of expensive 3rd party products for monitoring key operating system metrics. The verdict is "no" and I was less than impressed.
OS Watcher is a series of shell scripts that run on AIX, Solaris, HP-UX and Linux. Simple commands such as ps, top, vmstat, netstat and others are executed at regular intervals and their output is appended to a file in a directory specific to that command.
For instance, here is the directory structure under osw/archive:
oracle@kenichi:/u1/oracle/OSW/osw/archive--> ls
oswiostat oswnetstat oswps oswvmstat
oswmpstat oswprvtnet oswtop
If we look at the contents of the vmstat directory, we'll see a series of files with the output from the command.
oracle@kenichi:/u1/oracle/OSW/osw/archive/oswvmstat--> ls
kenichi_vmstat_09.12.06.2300.dat kenichi_vmstat_09.13.06.0500.dat
kenichi_vmstat_09.13.06.0000.dat kenichi_vmstat_09.13.06.0600.dat
kenichi_vmstat_09.13.06.0100.dat kenichi_vmstat_09.13.06.0700.dat
kenichi_vmstat_09.13.06.0200.dat kenichi_vmstat_09.13.06.0800.dat
kenichi_vmstat_09.13.06.0300.dat kenichi_vmstat_09.13.06.0900.dat
kenichi_vmstat_09.13.06.0400.dat
And if we look into one of those files, we'll see this:
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 1952064 818992 1 5 1 0 0 0 0 0 5 0 0 434 130 140 3 1 96
5 0 0 1683504 550176 161 1299 0 0 0 0 0 0 27 0 0 778 3143 618 60 40 0
1 0 0 1683584 550248 2 10 0 0 0 0 0 0 5 0 0 466 1502 503 81 19 0
zzz ***Wed Sep 13 09:39:20 CDT 2006
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 1952064 818992 1 5 1 0 0 0 0 0 5 0 0 434 130 140 3 1 96
4 0 0 1683528 550304 157 1174 0 0 0 0 0 0 40 0 0 863 3761 800 61 39 0
1 0 0 1683608 550248 0 10 0 0 0 0 0 0 0 0 0 436 860 358 86 14 0
zzz ***Wed Sep 13 09:40:21 CDT 2006
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 1952056 818984 1 5 1 0 0 0 0 0 5 0 0 434 130 140 3 1 96
0 0 0 1683696 550104 153 1174 0 0 0 0 0 0 7 0 0 558 3028 622 60 40 0
0 0 0 1683608 550016 0 11 0 0 0 0 0 0 4 0 0 443 835 314 69 31 0
zzz ***Wed Sep 13 09:41:21 CDT 2006
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 s0 s2 s6 in sy cs us sy id
0 0 0 1952056 818984 1 5 1 0 0 0 0 0 5 0 0 434 130 140 3 1 96
3 0 0 1683928 550344 160 1198 0 0 0 0 0 0 18 0 0 631 3372 699 52 48 0
0 0 0 1682536 548880 0 12 0 0 0 0 0 0 0 0 0 423 860 332 68 32 0
That's pretty much it. The utility comes with a README file that describes the various parameters to start and stop the utility. It simply submits the OS commands at an interval that you specify and puts the results in directories and files of their own for later review.