help for aix script


 
Thread Tools Search this Thread
Operating Systems AIX help for aix script
# 1  
Old 01-24-2011
help for aix script

hi all i want help to write the script thatti check rmt drive serial number if the same in two site Production and HA, the recomended like the follwing:

The : AIX script to set up tape devices on OS to be identical on both nodes
- define a rule, according to the renaming of the tape devices on AIX will occur (this is for a case when the library(s) get changed, so that the script can handle that too)
- the comparison of the tape devices should be on one side on the tape library, through tapeutil, on the other side on AIX

Recommended steps
- list smcX devices and divide them according to their serials (you can route data in text files temporary )
- call tapeutil with one smcX device for each library and list the drives (you can route data in text files temporary )
- list the drives on AIX and compare them with the ones from the tapeutil command to see all are present
- define a rule/naming convention to differentiate the drives and robot of the seperate libraries. I'll give one example, you can define your own, if you like.
for example the libraries: smcX_L<library series number (manual setting), or other unique identification based on HW data, like serial number>
this would mean for example: smc0_L1
smc1_L1
smc2_L1
smc3_L1
smc0_L2
smc1_L2
smc2_L2
smc3_L2

for example the drives: L<library series number, as above>_<drive serial's last five (or more) character>_<drive series number>
this would mean for example: L1_12435_01
L1_12435_02
...
...
L1_21342_01
...
L2_32211_01
...
The drives series numbers are to see the different paths to a drive, the library series number is to see the drives association to libraries (example 2), and which robot paths are present for a library (example 1).
- Rename the devices accordingly.
- Check for accuracy.

Because of the device name changes on AIX, on TSM, paths, drives and libraries will have to be redefined after this change, one last time again.
any on ehave an idea about this?
# 2  
Old 01-24-2011
where do you need help? what have you done so far? it is not our work to write a script for you! show us what you've done and where you need help...
# 3  
Old 01-24-2011
hi,
i do two scripts one for rmt device and the other for smc device and list them succfully now i want to compare if the serial number is the same on each sites between aix and tapeutil?
the scripts are:
Code:
for i in 0 1 2 3 4 5 6 7
do
echo "**********lscfg output**************" >> serials2.txt
lscfg -vl smc$i >> serials2.txt
echo "**********itdt output***************" >>serials2.txt
./itdt -f /dev/smc$i inquiry 80 >> serials2.txt
echo "****************************" >> serials2.txt 
done

and the same for rmt
# 4  
Old 01-24-2011
I'd like to help out here...but I can't figure out what you need or why you would do this.

"Because of the device name changes on AIX"...Are you trying to rename the AIX devices? You don't want /dev/rmt0?

Or are you trying to rename the TSM drive names?
# 5  
Old 01-25-2011
hi ,
thx for replay,
about my script is to compare the serials numbers of each rmt and smc devices on aix and from tapeutil, now i want to:
- Rename the devices accordingly.
- Check for accuracy.

any idea please , i am not fluent on aix
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shell script in AIX

Hello Experts My SAP application is running in IBM AIX. Everyday my application generate some files in the below path as below. root@sedcaspm0502: pwd /interfaces/RFTS/B11/archive root@sedcaspm0502: ls -lrt -rw-r r 1 ppgadm sapsys 1039445 May 08 01:20... (1 Reply)
Discussion started by: sundar.c79@gmai
1 Replies

2. Shell Programming and Scripting

Need help in shell script on AIX

Hi All, I am connecting from ServerA(Unix) to ServerB (AIX). Copying a Database dump file from A to B. On B i need to import that dump file. I have used the following code to do this operation but ended up with error Pseudo-terminal will not be allocated because stdin is not a terminal.... (2 Replies)
Discussion started by: maddyd2k
2 Replies

3. UNIX for Dummies Questions & Answers

Shell Script in AIX

Hi , Good Morning every one !!! I am very new to this forum and new to Shell Script as well , hope some script Guru's will help me . I have a requirment to write a shell script . The requirment is like this . There are couple of shell scripts scheduled in the Crontab (some scripts run... (5 Replies)
Discussion started by: dilipd21
5 Replies

4. Shell Programming and Scripting

Aix .ksh for loop script.

Hi, I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below. #!/bin/ksh SSH_USERID=khcuser webservers="server1 server2" ... (2 Replies)
Discussion started by: elmesy
2 Replies

5. Shell Programming and Scripting

AIX script, help I'm just a backup!

Hello, I am trying to get the following Lawson command to work in an AIX script for a developer and I'm stumped, the Admin for this server is on vacation and I have very limited AIX scripting knowledge, I cannot seem to get this to work no matter what I try... lawcmp test900 ap HM500 This is... (1 Reply)
Discussion started by: j_aix
1 Replies

6. Shell Programming and Scripting

shell script on AIX

Hi! I have made a simple script for writing the following line on a file (file.txt): list= 1 2 3 and thr script looks like this: N=3 ll=(1 2 3) echo -n "list= ">> file.txt j=0 while ; do echo -n ${ll}" ">> file.txt let j++ done The code works fine on Linux,... (3 Replies)
Discussion started by: carl.alv
3 Replies

7. AIX

aix script

hi all, do yo know what is double "]" means? Here's an example: ] || echo "$TITLE" thanks, itik (5 Replies)
Discussion started by: itik
5 Replies

8. UNIX for Advanced & Expert Users

script migration from HP-UX to AIX

Dear All, What points should i keep in mind while migrating scripts from HP-UX to AIX. Are there any notes available for this? cheers, vishal (1 Reply)
Discussion started by: vishal_ranjan
1 Replies

9. Shell Programming and Scripting

UNIX AIX 5.3 Script Help

Hello all, I have a few questions regarding a UNIX script I've been asked to write (even though I barely know UNIX!). I would like to write a script, that when run, will copy a file from one directory to another, copy and rename the same file with a datestamp to an archive directory, and them... (10 Replies)
Discussion started by: yall
10 Replies

10. UNIX for Dummies Questions & Answers

[AIX] executing script

Hello! I need to run a script from the root user as the other user. I know that I can issue the following command: su - user_name -c "/path_to_script/script_name.sh" But there is a small problem with the above command. I must export a environment variable before I run the script. In the... (1 Reply)
Discussion started by: piooooter
1 Replies
Login or Register to Ask a Question