Hi,
I am new to unix, trying to learn things
I have written unix script to stop Informatica server and re-start them.
In order to stop the servers i need to check the below
1. Check if the infa servers are already running.
2. If the servers are already running then, i need to stop the servers.
3. If the servers are not running then exit.
4. Once the servers are stopped, check if the they stopped successfull.
5. If not forcefull shutdown the servers.
Below is the script for checking the services are running or not.
Defined all the variable
The script is working fine as excepted.
I wanted to know if it can be fine tuned. Is the error handling process is correct.
And also
when i am doing pidof DINFA_DOMAINS_FILE
its returing null.
Please suggest.
Moderator's Comments:
Please use [CODE] tags when posting source listings, console output, ...
HI All,
I have a requirement of execueting a Shell script on serverA, which is going to execute an application script ( Hyperian Planning script ) on serverB. Can any one please help in how to achieve this?
e.g.
script abc.ksh runs on serverA.
internally abc.ksh call a script... (3 Replies)
Hello All,
I have a script which needs to exit once it encounters that all the servers are down. In the below portion of a code the content manager is having values of server for example server A , server B. So I want the script to exit only if all the servers are down and to continue if one... (4 Replies)
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
I am trying to kill a shell script by grepping it, but the machine is being shutdown totally when i kill it
Below is the code
kill `ps -ef |grep test.sh| grep -v grep`
stat=$?
if # check the return code
then
echo " script killed at $(date +%D@%T) "
else
echo " script... (5 Replies)
Hi All,
I am trying to get the process id of informatica Domain
I used the below query :
pidof DINFA_DOMAINS_FILE
its not returing any result,
when i try this
ps -ef | grep DINFA_DOMAINS_FILE
the result is displayed as below with process id
xxxx 912 1 3 Jul24 ? ... (2 Replies)
It feels like I have taken on to of a big task.. but I want to learn but dont know where to start.. Rome wasnt built in one day right..
I have around 30+ servers running linux/unix flavours and need to be able to do this in a script that will be a cronjob.
- ssh to all 30+ servers
- do df -kh... (3 Replies)
Hi All,
We have two servers DSERV1(red hat 8.0) and DSERV2(scounix 3.2) where DSERV1 is the NFS server and DSERV2 is the NFS client. We want to reboot these servers and wanted to know the steps(precautions) we have to follow in order to do this. After reboot should we do anything specific to... (2 Replies)
Hi all,
Can any one help me.......
I just want to run one shell script whenever i am rebooting the server. Is there any easy way to do that????
Thanks,
selva (7 Replies)
I am a newbie in shell scripting and I need to produce a script to work and achieve the following:
1) Look into the file /etc/defaultrouter , and store the value in it
2) If the value is a number, go to LIST and print out the second column corresponding to the value.(eg London)
3) If the... (5 Replies)
system = AIX
How can I explain this.....
Keep in mind I do not want to login to the boxes, persay, and that I am fairly new to scripting and unix.
I want to use SSH.
I have a script on server1, this is where I want it to run from.
I have server2 and server3, where I want the script to... (2 Replies)