Brian Smith's AIX / UNIX / Linux / Open Source blog
From archive: April 2013 X
|Modified on by brian_s|
SMIT is one of the nicest features of AIX. It provides an extremely easy to use interface to manage almost every aspect of an AIX system.
One of the only problems with SMIT is that it is so inclusive and complete that the menu system is huge and it can be hard to find things in the menu. There have been times where I was in SMIT and found a really useful menu, but then the next time I went to use that same menu I couldn't find it again!
I started playing around with the idea of writing a script to read the ODM and display a "tree-view" of the entire SMIT menu/sub-menus. When I got it to work, I was shocked at the size of the SMIT menu system and everything it includes. SMIT really is an incredible tool and includes a TON of useful stuff in it.
This script will show every menu/sub-menu in a tree view. It also shows the fast-path to get directly to each menu. The fast-path is a SMIT "shortcut". For example, to get to the SMIT filesystems menu directly from the command line you can use the "fs" fast-path by typing "smit fs" on the command line.
Here is a screenshot of the first few lines of the output of the script. On my system the total output of the script showing the complete SMIT menu is 4,805 lines!
The text in the brackets "[ ]" is the fast-path to get directly to that menu.
You can either "grep" the output of the script to search for something in the SMIT menu system, or you could redirect the output to a file, and then open the file with your favorite text editor and search through it to find parts of SMIT you are looking for.
It is also very educational to just look through the output. Just by glancing through it I've found several things SMIT can do that I wasn't aware of.
Here is the script. It can be run as a regular user and the only external command it runs is "ODMDIR=/usr/lib/objrepos; odmget sm_menu_opt"
Here is a short script to show a "tree" view of Etherchannel devices on AIX. It shows the devices that make up the etherchannel, including the backup device if there is one:
Here is the script:
If you like this script, you might also like these posts: Show tree view of AIX device classes and subclasses and also Show AIX device dependency tree