Autosys job shows success but failed - autosys

I've some weird situation. My autosys job status shows that it ran successfully but when I checked the logs it showed it was failed.
Is that possible ? Has anyone encountered this kind of issue ?

Use the -b option in the SQLCMD. This post gives a good explanation, and the solution worked for me... https://dba.stackexchange.com/questions/77298/how-to-make-sqlcmd-return-an-errorlevel-other-than-0-when-the-sql-script-fails
Taken from the above link...
You should use the option -b in sqlcmd.
-b Specifies that sqlcmd exits and returns a DOS ERRORLEVEL value when an error occurs. The value that is returned to the DOS ERRORLEVEL variable is 1 when the SQL Server error message has a severity level greater than 10; otherwise, the value returned is 0.
http://msdn.microsoft.com/en-us/library/ms162773.aspx

Related

How to change session's status from running to succeeded when a condition is met in Informatica?

I'm having a problem in changing status of a session from running to succeeded when a condition is met..
For example, I have a workflow as below:
start ---------> workA
| |---> workB
|--------> timer_20mins
From the diagram above, the process of workA and workB is running concurrently as well as the timer. So if the session's process succeeded before the configured 20 mins in the timer, the status of the timer should change from running to succeeded......I tried with post session success command, but it's still not working. How should I rectify the code?
Have you reviewed my previous answer available here?
This problem here is very similar, you just need the decision to fire in case both your sessions are done, so it should have one more decision task with Treat the input links as set to AND this time.
Briefly, the flow should look like this:
Start--->s_sessionA---\
\ > Decision [AND]
\--->s_sessionB--/ \
\ > Decision [OR] ---(False)---> Control Task [Fail parent]
\-------------->timer-----------/

Weird delay when using "tail -f" command

To monitor a log file I have to connect to an ssh connection and redirect the output of the log file(let's call it RemoteLog.txt) out to a local machine so it can be read by a java program and put on a GUI.
Right now I have the output redirected out of the ssh connection and onto the local machine with the command:
ssh remote#ip.address tail logs/RemoteLog.txt -f > ~/Log/LocalLog.txt
and everything works fine technically with one exception: for some reason LocalLog.txt only gets updated with the changes to RemoteLog.txt every 35 seconds to the millisecond.
It doesn't matter the number of changes to RemoteLog, the number of lines specified with the tail command, or using the >> operator vs the > operator; there is always a 35 second delay between updates of LocalLog.txt while RemoteLog is constantly updating.
Does anyone have any clue why this might be?

To suppress the output of snmpwalk command when it gives timeout response

I have written a script to automate the snmpwalk command for a given community string and IP addresses. I am storing the result as "yes" if it is alive, and "no" otherwise.
But the problem is for IP's which are not connected. It is showing timeout response on the console.
How can I suppress this message ?
You can use the redirect to null, to suppress error output.
Example : All about redirection - use 2> /dev/null – tvCa

Monit fails to execute the complete command in start program

I'm using monit 5.4 on Mac 10.7.4 machine. When i tried to execute a example configuration
check process syslogd with pidfile /var/run/syslogd.pid
start program = "/etc/init.d/sysklogd start"
stop program = "/etc/init.d/sysklogd stop"
if 5 restarts within 5 cycles then timeout
from monit wiki page, I get the following error.
'syslogd' process is not running
'syslogd' trying to restart
'syslogd' start: /etc/init.d/sysklogd
'syslogd' failed to start
Monit does not take the complete command given in the "start program" of the monitrc file. It just takes the first word in the command and tries to execute it and fails. Is this a known issue? If yes, does it have a workaround? If not, what am i missing here and how to get it working?
Thanks in advance.
Try this (from http://mmonit.com/wiki/Monit/FAQ#execution)
start program = "/bin/bash -c '/etc/init.d/blah start'"
Does /etc/init.d/sysklogd actually exist?
On 10.8 I have /etc/init.d/syslog and manually running /etc/init.d/syslog restart works fine.

Monit failing to start process

I have a simple script that I'm trying to get Monit to monitor. After some digging around I found this little nugget: start program = "su - myuser -c '/home/user/myscript.rb start' " which I believe should work but looking at the log files it says:
[PDT Oct 30 02:47:17] info : 'simple_script' start: su
[PDT Oct 30 02:47:17] error : Error: Could not execute su
Likewise earlier attempts only seem to read the part preceding a space so:
start program = "/home/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /home/user/simple_script_daemon.rb stop"
results in…
[PDT Oct 30 03:09:49] info : 'simple_script' start: /home/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
Which doesn't fail like the first example but still seems to only execute the part preceding the space.
This is my full statement:
check process simple_script
with pidfile /home/user/simple_script.rb.pid
start program = "su - user -c '/home/user/simple_script_daemon.rb start' "
stop program = "su - user -c '/home/user/simple_script_daemon.rb stop' "
group simple_script
If you've got an idea what might be going on I'd love to hear from you!
I guess you could try something like:
check process simple_script
with pidfile /home/user/simple_script.rb.pid
start program = "/home/user/simple_script_daemon.rb start" as uid user and gid user
stop program = "/home/user/simple_script_daemon.rb stop" as uid user and gid user
group simple_script
as stated in monit doc.
You may need to provide full path to su, i.e. /bin/su

Resources