Hi,
I have a unix script which runs a process (informatica workflow). To trigger this workflow an entry is made into the crontab and it is scheduled to run.
Issue:
The crontab entry is commented out. But the process is running in the unix box and it was scheduled immediately. There is someone who is running the script manually and it is aborted immediately. The users in a particular group only will have access to do that. There is no change made to the cron tab entries, so there has to be some user who is triggering this process. Problem is ..if someone is triggering the process we cannot have another user doing it. How do i get the user account which triggers this process from the unix log. Is there any log file i could research to find the user id.
you do not need crontab entries to run scripts unless you just want them ... the user in question may be running the script directly on the command line or using at so there is no need to modify crontab ... also, the issue may be that it is running in a user's crontab so you may want to check the user crontab files for the entry ... i think your suspect is very likely running the script manually based on your description ...
if you need to restrict the script to one process only while it is running, modify your shell script to use a marker file or at least check for an existing PID of the process prior to continuing the script ... a search of the forums or google should show you how to do so ...
There are two different aspects here: finding out who had run the script and making sure no two instances of the script run simultaneously.
The first is probably impossible. I don't know of any Informatica log file which would tell you this and you probably have not system auditing turned on and configured appropriately to find it in the systems audit logs. You might consider configuring system auditing in the future if you are interested in such information.
Regarding the second problem: this is relatively easy. Change the script so that when it starts it writes a "PID-file". Classically these PID-files are stored in /var/run, are named like the command/process they belong to and contain the PID of the running job. The first thing this script should do is to check if such a PID-file exists. If it does, it aborts with some error, otherwise it creates the PID-file, does whatever it is supposed to do and deletes the PID-file upon exit. Here is a sketch for this:
just thinking about it further, if mailx works in your server, just have the script send you email as soon as it runs ... (mixing everybody's code) ...
Good Afternoon,
Are most NASs compatible with Solaris/RedHat? Specifically, I'm looking at Western Digital ones but none of them say they are - I like My Cloud Pro Series PR4100
My Cloud Pro Series PR4100 – Network Attached Storage | Western Digital (WD) (3 Replies)
Hi there, please could you assist me. I have no knowledge at all about Unix and I have applied for a job and they have given me a test and said that I can obtain the answers in any kind of way. There are 3 questions that I need answers for. I have tried researching the answers to these questions... (12 Replies)
hi friends i have just completed my graduation and applied for Post graduation
i have to submit a research proposal of OS in the interview
i m a beginner & only read galvin & silbershcatz book on operating systems
can anyone help me in that ...
thanks in advance (3 Replies)
menu should look at least like the following:-
RESEARCH PAPER LIBRARY - Main Menu
0 : EXIT this program
1 : EDIT menu
2 : REPORTS Menu
Enter your choice>
program should check for invalid choice and display error message and re-display the main-menu. If EDIT is... (1 Reply)
I am researching the reasons why Unix / Linux is the chosen operating system versus Windows. I have had difficutly narrowing down resources. I am wondering if anyone has any favorite sources that they would care to share.
Thanks
Dan (2 Replies)
I am doing a "research" paper for school and i'm having a hard time finding accurate information. I am supposed to choose three differant versions of unix, give a brief explination of each, tell why there each differant from each other. I have found a ton of web sites but the information is so vast... (1 Reply)
Discussion started by: pantsusan
1 Replies
8. Forum Support Area for Unregistered Users & Account Problems
Hi,
I need you help with my research project that attempts to determine the
link between users and manufacturers of IT Products such as Unix.
This is part of an MBA program that I'm currently pursuing. My challenge is that I cannot possibly find out how I can send my research... (1 Reply)