Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Probably an easy AIX-SMIT question with mkroute Post 302170101 by bakunin on Sunday 24th of February 2008 11:17:20 AM
Old 02-24-2008
How to derive procedures from SMIT

Actually the "complex script" is relatively easy to decipher. Hitting <F6> makes SMIT show what it would execute. This is the case since the first AIX version i used (3.2.3) and will perhaps only change when hell freezes over. ;-))

An easy way to find out what SMIT exactly does is: fill the mask with easily distinguishable values, press <F6> and in the last line you see the real call with your values. In the script above (which is called by this line) you can now find out where and how these values go and near the end of the "cmd_to_exec" you find the real OS-level command: "chdev -l ...."

Specifically for your problem i have done it for you. How to change routes according to SMIT:

Code:
chdev -l inet0 -a route=<destination>,-hopcount,<hopcount>,-netmask,<netmask>,-if,<interface>,,,,<destination>,<gateway>

If you do not need a specific peace of information or want to use defaults you can leave that part out. For instance if you do not want to specify a hopcount replace "-hopcount,<hopcount>" with "".

By the way: if all your values are always the same you can also do the following: use SMIT do do it once on a machine. Then have a look in the file "smit.script" in your home directory. From there you can copy the function declaration along with the command to execute the function with certain values, to a separate file, name it "mychange.sh", give it execute rights and use it over and over again.

I hope this helps.

bakunin

PS: wouldn't that thread have been better placed in the AIX forum? SMIT is a very specific AIX tool, which does not exist outside AIX boxes. Just a thought.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

easy question

I know the Sun Solaries versions are ( 2.3 , 2.4 , 2.5 ... 7 , 8 ) . But some times I see sun os v5.x what does it mean ?? also what is the last new machine for sun and what are its details specifications . Thanks (3 Replies)
Discussion started by: tamemi
3 Replies

2. UNIX for Dummies Questions & Answers

Another easy question

Hello Again, Ok guys. Thanks again for your help last time but I am in need of your experience again. I wrote this script: #!/bin/sh # List either files or directories in individual accounts # using 1, 2 or 3 with invalid case $1 in echo select 1 to see the FILES in your... (3 Replies)
Discussion started by: catbad
3 Replies

3. What is on Your Mind?

AIX Smit menu designer. WinSmit

Hi, Please excuse me for posting an "ad" message here. Over the last few months I have created software called WinSmit, with this tool you can create your own AIX smit menus and corresponding message files. We all know the smit or smitty menus that IBM provides to maintain the system, the... (6 Replies)
Discussion started by: mimyrtek
6 Replies

4. Shell Programming and Scripting

Hopefully an Easy Question

I have a file name in this format ABC_WIRE_TRANS_YYYYMMDD_00.DAT I need to cut out the _00 out of the file name everytime. It could be _00, _01,_02, etc .... How do I cut it out to look as follows? ABC_WIRE_TRANS_YYYYMMDD.DAT (6 Replies)
Discussion started by: lesstjm
6 Replies

5. UNIX for Dummies Questions & Answers

easy question

Hi everybody: Could anybody tell me if I have several files which each one it has this pattern name: name1.dat name2.dat name3.dat name4.dat name10.dat name11.dat name30.dat If I would like create one like: name_total.dat If I do: paste name*.dat > name_total.dat (15 Replies)
Discussion started by: tonet
15 Replies

6. AIX

Probably an easy SMIT question- "Unable to open temp file"

Hi All, Can't find any documentation on the web for this anywhere, except about three web pages that are in Chinese. When I enter SMIT on this box, I get ERROR MESSAGE: Unable to open temp file I suspected smit.log, but it is universal readable, writeable by root, and I am root.... (6 Replies)
Discussion started by: jeffpas
6 Replies

7. Solaris

SMIT i AIX Sun Solaris ?

i now when i want use the smit in AIX is possible but a ask if you has in sun same job in sun tel me please awating supports (3 Replies)
Discussion started by: Yalmalki
3 Replies

8. Shell Programming and Scripting

Using expect script with AIX's SMIT in cron

My searches turned up nothing relevant, so I apologize if this has already been looked at. I am trying to run an expect script from a Solaris machine, that ssh's into an AIX machine, and interacts with a SMIT created menu system that runs a few backups for me. The expect script runs fine when... (0 Replies)
Discussion started by: Mariognarly
0 Replies

9. AIX

How do I killed ideal users from AIX 5.3 smit?

Hi, I'm newbee to AIX and would like to setup a process which kills 1 Hr. ideal users from smit. Please advise for making it work. :) Thanks, Sumit (2 Replies)
Discussion started by: sumit30
2 Replies

10. AIX

AIX 5.3 Using sudo to control smit

Does anyone have any experience using sudo to control smit on AIX 5.3? These are the smit commands that I want certain users to execute: # Cmnd alias specification Cmnd_Alias SMIT = /bin/smit hacmp, \ /bin/smit pxdam, \ /bin/smit cl_lsuser, \ /bin/smit cl_users, \ /bin/smit cl_passwd ... (5 Replies)
Discussion started by: tharrieswk
5 Replies
STRUCT 
RIO_SWITCH(9) Internals STRUCT RIO_SWITCH(9) NAME
struct_rio_switch - RIO switch info SYNOPSIS
struct rio_switch { struct list_head node; u16 switchid; u8 * route_table; u32 port_ok; int (* add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 route_port); int (* get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 *route_port); int (* clr_table) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table); int (* set_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,u8 sw_domain); int (* get_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,u8 *sw_domain); int (* em_init) (struct rio_dev *dev); int (* em_handle) (struct rio_dev *dev, u8 swport); int (* sw_sysfs) (struct rio_dev *dev, int create); struct rio_dev * nextdev[0]; }; MEMBERS
node Node in global list of switches switchid Switch ID that is unique across a network route_table Copy of switch routing table port_ok Status of each port (one bit per port) - OK=1 or UNINIT=0 add_entry Callback for switch-specific route add function get_entry Callback for switch-specific route get function clr_table Callback for switch-specific clear route table function set_domain Callback for switch-specific domain setting function get_domain Callback for switch-specific domain get function em_init Callback for switch-specific error management init function em_handle Callback for switch-specific error management handler function sw_sysfs Callback that initializes switch-specific sysfs attributes nextdev[0] Array of per-port pointers to the next attached device AUTHOR
Matt Porter <mporter@kernel.crashing.org>, <mporter@mvista.com> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT RIO_SWITCH(9)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy