Friday, July 16, 2010

DataStage UNIX commands

ps -ef | grep

ps -ef | grep dsrpc

ps -ef | grep phantom

ps -ef | grep osh

ps -ef | grep dscs

ps -ef | grep dsapi

kill -9
===========================================================

•Check the permissions
1.Log on to server as dsadm or root
2.cd $DSHOME/bin
3.ls -l | grep rws

The output should be (6) files owned by root with the setuid bit set -- especially the uv file.


•Check to ensure that there was a clean restart of the DataStage Engine.
Here are the instructions for a clean restart of DataStage Engine:


1. Log on to server as dsadm or root
2. cd $DSHOME
3. source the environment:


. ./dsenv --> that's dot space dot slash dsenv

4. Check for DataStage client connections
ps -ef | grep dsapi_slave
ps -ef | grep dscs

If there are any connections found, use kill -9 to remove them.

5. Check for jobs processes:
ps -ef | grep phantom

If there are any connections found, use kill -9 to remove them.

6. Check datastage shared memory segments:
ipcs - mop | grep ade

If there any shared memory segments returned, remove them, use command:
ipcrm -m ID , where ID is the number from the second column of ipcs -mop

7. Check if there is any port hung using:
netstat -a | grep dsrpc

If you get any results and the dsrpc is in WAIT then you need to wait until this it disappears (you can also reboot the machine).

8. At this point you can stop or start the DataStage Engine.
bin/uv -admin -stop
bin/uv -admin -start
====================================================

Wednesday, July 7, 2010

Special shell variables

$1 $9 ----- these variables are the positional parameters.

$0 ----- the name of the command currently being executed.

$# ----- the number of positional arguments given to this
invocation of the shell.

$? ----- the exit status of the last command executed is
given as a decimal string. When a command
completes successfully, it returns the exit status
of 0 (zero), otherwise it returns a non-zero exit
status.

$$ ----- the process number of this shell - useful for
including in filenames, to make them unique.

$! ----- the process id of the last command run in
the background.

$- ----- the current options supplied to this invocation
of the shell.

$* ----- a string containing all the arguments to the
shell, starting at $1.

$@ ----- same as above, except when quoted.