08-05-2010
SAS Process Getting Killed in UNIX
HI all,
I am very new to AIX (matter of fact Unix). We are currently automating out manual process using Unix Shell Scripting.
My wrote a shell script which will accept the name of the sas job as parameter, checks the existense of the sas file in the specified folder.
If it is not present, the shell script will exit with 1, otherwise it will continue to execute the sas code. If the sas code fails, the script will check the return code
if [ $? -ne 0 ]; then mailx -s "job failed"
xxxxx@xx.com
else mailx -s "Job Complete"
xxxxx@xx.com
The problem we found is that, if I kill the shell script forcibly, then there is no warning or message of any kind. I would like to handle such a situation by triggering an email. How can i capture the return code for such a thing and use it to email saying the user terminated the Script or sas job?
Any suggestions!!!!!!
Last edited by anubhav2020; 08-08-2010 at 11:54 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a process that is in the sleeping state "S" and I have tried to stop it with a run control script that I use to stop/start it - but it does not stop.
I have tried kill -9 <PID of process> with no change. I imagine that this process is sleeping with the kernel.
It does not respond to... (5 Replies)
Discussion started by: finster
5 Replies
2. UNIX for Dummies Questions & Answers
Suppose we have the following process tree:
init-> ProcessA->processB->processC
then I kill processB
Who is the parent of the processC?
init or the processA (6 Replies)
Discussion started by: Puntino
6 Replies
3. Programming
We are forking a process B from process A and the process B should display the details it reads from process C(daemon process) continuously.
Let us say that the process C sents 100 packets.The process B receives all the 100 packets from the process C before it prints all details of 31... (1 Reply)
Discussion started by: cijkmysj
1 Replies
4. Solaris
hi,
i am creating a daemon process for updating the file at regular interval.one problem with this is if anybody kills the daemon it wont update the file.anybody have idea how to rerun the daemon if it killed.the code is written in c++ in solaries environment.
thnaks & regards
suresh (8 Replies)
Discussion started by: suresh_rtp
8 Replies
5. Shell Programming and Scripting
I have this shell script and in case the sybase process is been killed how can identify whether the process was killed or not, as the error code always returns 0.
#!/bin/sh
isql -S SERVER -U user -P pass<<TOP
select * from tableName
go
TOP
echo $? (2 Replies)
Discussion started by: dinjo_jo
2 Replies
6. Solaris
Hi all,
Currently I am using LDAP to store some network related data, When I run following script
./ns-slapd ldif2db
Execution of above script terminates displaying "Killed" on the console.
As far as I know, a process can be killed by two ways-
1. manually running " kill -9 <PID of LDAP... (1 Reply)
Discussion started by: akash_mahakode
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a process which takes 13-15 mins for execution and its getting killed in the meantime.So can you please helpme out how to protect the process from getting killed.
Thanks in advance.
Regards,
Harika (9 Replies)
Discussion started by: harikagrp
9 Replies
8. UNIX for Dummies Questions & Answers
Hi reader,
I'm making a tool out of korn shell script that is running on a HP-UX server. But everytime i invoke the tool, it gets killed after a while (mid-process). I have tried re-running it a couple of times but each invocation ending up the same way ..
following is a snippet of the o/p... (8 Replies)
Discussion started by: clakkad
8 Replies
9. Shell Programming and Scripting
Hi,all.Well,I know someone has already asked this question before,however,It's too long before.So i post a new thread here.
Here is the issue.I have a shell script that use awk to calculate something and the script takes about 15 mins,it will use 100% CPU,and the system automatically killed the... (2 Replies)
Discussion started by: homeboy
2 Replies
10. Shell Programming and Scripting
I have two set of questions.
1) To skip killing some process automatically.
2) To kill other process and capture their log.
I have set of process, some needs to be killed gracefully and others should be skipped.
Listed are the process.
adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies
MFI(4) BSD Kernel Interfaces Manual MFI(4)
NAME
mfi -- LSI Logic & Dell MegaRAID SAS RAID controller
SYNOPSIS
mfi* at pci? dev ? function ?
DESCRIPTION
The mfi driver provides support for the MegaRAID SAS family of RAID controllers, including:
- Dell PERC 5/e, PERC 5/i, PERC 6/e, PERC 6/i
- Intel RAID Controller SRCSAS18E, SRCSAS144E
- LSI Logic MegaRAID SAS 8208ELP, MegaRAID SAS 8208XLP, MegaRAID SAS 8300XLP, MegaRAID SAS 8308ELP, MegaRAID SAS 8344ELP, MegaRAID
SAS 8408E, MegaRAID SAS 8480E, MegaRAID SAS 8708ELP, MegaRAID SAS 8888ELP, MegaRAID SAS 8880EM2, MegaRAID SAS 9260-8i
- IBM ServeRAID M1015, ServeRAID M5014
These controllers support RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, RAID 50 and RAID 60 using either SAS or SATA II drives.
Although the controllers are actual RAID controllers, the driver makes them look just like SCSI controllers. All RAID configuration is done
through the controllers' BIOSes.
mfi supports monitoring of the logical disks in the controller through the bioctl(8) and envstat(8) commands.
EVENTS
The mfi driver is able to send events to powerd(8) if a logical drive in the controller is not online. The state-changed event will be sent
to the /etc/powerd/scripts/sensor_drive script when such condition happens.
SEE ALSO
intro(4), pci(4), scsi(4), sd(4), bioctl(8), envstat(8), powerd(8)
HISTORY
The mfi driver first appeared in NetBSD 4.0.
BSD
March 22, 2012 BSD