Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need a auto start procedure for CAOPRDMN when it fails

Status
Not open for further replies.

n505mw

Technical User
Dec 10, 2005
7
US
Anyone (Have a valid\verified\working) documented method to check to see if a task mgr process is running and if its not , it will restart it.?

our NSM evt Console craps out when too many msgs flood. We have to then restart the CAOPRDMN process. Looking for a (documented)way to monitor task mgr process CAOPRDMN.exe) and restart it when it takes a dump. Sure I can monitor the process in thoe OS agent, already am, problem is what can you do when the console goes down, theres no console to trigger a msg\action to command re-start.

Likely a script to check the status. Any takers.??
 
This is gonna depend on what other CA components you've got running and what failover you have.
eg: If you've got a failover core and DSM then you can have that monitoring your primary and if a bit goes down restart the services remotely (using sc.exe or something similar).

If you've got workload installed on your server you could have a cyclic job that checks every 5 mins or so for the existence of the opr process and if it aint there it restarts it.
If you havn't got workload then I guess you could use windows task scheduler to run it but I wouldn't rely on that if I were you.
Anyhow, a simple batch file like this should do the trick.
---------------
REM This checks to see if the process is running and sets the result to a varible.
for /F "tokens=1 delims=" %%a in ('tlist -p caoprdmn') do (set OPRRUNNING=%%a)
REM if the variable = -1 then it restarts opr, if not it exits
if %OPRRUNNING% == -1 (goto restart) else (goto myend)
:restart
unicntrl start opr
:myend
exit
----------------

You could probably make it alot better than that. eg - do some cawto's after restarting opr to check that unicenter is running, but i hope this helps for starters.

cheers
 
Tlist will not run on w2k server.
Tried to use PSlist, no good. see below


*******************************************************
REM This checks to see if the process is running and sets the result to a varible.
for /F "tokens=1 delims=" %%a in ('PSlist caoprdmn') do (set OPRRUNNING=%%a)
REM if the variable = -1 then it restarts opr, if not it exits
if %OPRRUNNING% == -1 (goto restart) else (goto myend)
:restart
unicntrl start opr
:myend
exit
*******************************************************
CMD execution\output
*******************************************************
C:\TEMP>restart_caoprdmn

C:\TEMP>REM This checks to see if the process is running and sets the result to a varible.

C:\TEMP>for /F "tokens=1 delims=" %a in ('pslist CAOPRDMN.exe') do (set OPRRUNNING=%a )

C:\TEMP>(set OPRRUNNING=PsList 1.26 - Process Information Lister )

C:\TEMP>(set OPRRUNNING=Copyright (C) 1999-2004 Mark Russinovich )

C:\TEMP>(set OPRRUNNING=Sysinternals - )

C:\TEMP>(set OPRRUNNING=Process information for Server1: )

C:\TEMP>(set OPRRUNNING=process CAOPRDMN.exe was not found on Server1 )

C:\TEMP>REM if the variable = -1 then it restarts opr, if not it exits
CAOPRDMN.exe was unexpected at this time.

C:\TEMP>if process CAOPRDMN.exe was not found on Server1 == -1 (goto restart) else (goto myend)

C:\TEMP>
 
I have found a solution and have it in place that automatically will restat the process within(1 min). It is called NSM "Agent Call Back". Part of Agent Technology.
As soon as the console deamon stops, it is automatically restarted.
 
How do you use this NSM Agent call back and where is this feature located??

I am using NSM 3.1 on windows 2003 Server

Cheers

Mitesh

 

Read NSM "Using Log Agent" guide.
Chp 2 "Using Call-back Mechanisim".
 
Confused here...

how would the LogAgent detect that the CAOPRDMN.exe process is down???

Thanks in advance

 
The Agent Call-back uses the "Log Agent" as part of the auto process to start the caoprdmn.exe. a bat fle is created to start the process

Read file C:\NSM\AGENTS\CONFIG\CBC\EXAMPLE.CBC

Read NSM PDF document "USING THE LOG AGENT" Chp 2, page 5.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top