Install and configure GNU watch (gwatch) on AIX

GNU’s Linux have an interesting command ‘GNU watch’ http://linux.die.net/man/1/watch which its main function is not to watch your wife while you’re at work (Just kidding), its function is to  execute a program periodically, showing output fullscreen.

Interesting? Yes!

How many times we want to see output for any command at a regular intervals or repeatedly?

Watch is found on any Linux distros, but it’s not part of AIX OS. So, we can download it from http://www.perzl.org/aix/index.php?n=Main.Watch

Like ‘multitail’ (http://wp.me/p5bweg-1X), watch command for AIX has ncurses as packages dependencies.

Oooppppsssss wait, I see AIX’s OS has already a ‘watch’ command.. is the same command as ‘GNU watch’

No, ‘watch’ command from AIX OS is:

(lpar):[root] /tmp -> apropos watch
watch(1)        - Observes a programthat might be untrustworthy.

But in order to avoid conflict, ‘GNU watch’ will be renamed to ‘gwatch’instead of ‘watch’

Once you have download it:

(lpar):[root] /tmp -> ls *.rpm
watch-3.2.8-1.aix5.1.ppc.rpm

Let’s install it (Remember ncurses dependencies)

(lpar):[root] /tmp -> rpm -Uvh watch-3.2.8-1.aix5.1.ppc.rpm
watch                       ##################################################

Verify gwatch is installed:

(lpar):[root] /tmp -> rpm -qa|grep watch
watch-3.2.8-1

List files in package:

(lpar):[root] /tmp -> rpm -ql watch-3.2.8-1
/opt/freeware/bin/gwatch
/opt/freeware/doc/watch-3.2.8
/opt/freeware/doc/watch-3.2.8/AUTHORS
/opt/freeware/doc/watch-3.2.8/COPYING
/opt/freeware/doc/watch-3.2.8/NEWS
/opt/freeware/doc/watch-3.2.8/README
/opt/freeware/doc/watch-3.2.8/README.top
/opt/freeware/man/man1/watch.1
/usr/linux/bin/gwatch

To run the command on AIX, unlike on Linux, you should execute ‘gwatch’ instead ‘watch’:

(lpar):[root] /tmp -> gwatch
Usage: gwatch [-dhntv] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] <command></command>
So, let's play with gwatch </article></div></span>
													</div><div class=
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
LVM: Display basic information about Physical Volumes, Volume Groups and Logical Volumes
Viewed 3064 times since Sun, Jun 3, 2018
AIX perf how to
Viewed 19169 times since Tue, Aug 14, 2018
Troubleshooting Starts With Understanding Your Physical Disks’ Attributes
Viewed 4000 times since Sat, May 19, 2018
O’Reilly’s CD bookshelf
Viewed 12971 times since Wed, Jun 27, 2018
https://www.ibm.com/developerworks/learn/aix/index.html
Viewed 11399 times since Wed, May 30, 2018
Mount CD/DVD & ISO image in AIX 6.1
Viewed 4186 times since Tue, Jul 17, 2018
AIX Resolving "missing" or "removed" disks in AIX LVM
Viewed 4832 times since Tue, Aug 6, 2019
How to check dual path in AIX
Viewed 14254 times since Fri, Jun 8, 2018
Configuration of AIX Fast Connect and SMBFS
Viewed 8702 times since Mon, Jun 18, 2018
Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 2526 times since Thu, Sep 20, 2018