Process Control for Java processes

I am on a unix platform and suspect that one of my java programs (that is supposed to run all the time) may be dropping, thus requiring me to check up on it occationally to ensure it is still running, and if it isnt, I have to start it up. Does anyone know of a quick and dirty way for me to build a process control routine using crontab that will make sure it stays up.
What i first tried was to write a small perl script that looked for the process and if it wasnt there, it would try to start up the java program. The perl works great when I run it manually (thus starting up the process when it is down), but when I crontab the perl script, it doesnt seem to work. anyone know of a better way? or possibly a way that perl can start up the java process. I tried to embed the java command within a system statement within perl. I am lost right now and running out of ideas.
Thanks,
Kevin

I've a similar situation and attached are files that are working in an AIX box:
WfmScheduler and Forecaster are two java programs that are supposed to be running all the time. scheduler and forecaster are two script files that will start WfmScheduler and Forecaster. Each takes up to two parameters and writes their output to a corresponding log file. The cron task will check the ids every two minutes and if it does not see one of them, it will start them. I feel you are familiar with UNIX so it should be easy for you to understand the little script.
Good luck.
PC
file 1
#newcron.txt
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /home/wfm/autostart.sh WFM 5
file2
# autostart.sh
# get WfmScheduler process ids
cmd_path1=WfmScheduler
cmd_path2=Forecaster
pid1=`ps -ef | eval grep [0-9]./.*$cmd_path1.$1 | nawk '{print $2}'`
if [ "$pid1" ]
then
else
rm ./scheduler.log
nohup ./scheduler $1 $2 > ./scheduler.log &
fi
# get Forecaster process ids
pid2=`ps -ef | eval grep [0-9]./.*$cmd_path2.$1 | nawk '{print $2}'`
if [ "$pid2" ]
then
else
rm ./forecaster.log
nohup ./forecaster $1 $2 > ./forecaster.log &
fi

Similar Messages

  • How to check actual allocated and used memory for java process in solaris?

    Hi,
    I'm testing performance for java application on solaris 10. And I would like to know how to measure actual memory allocated and used for java process.
    I'm setting -Xms512m -Xmx512m for my java process and I use prstat command to monitor it's memory. But I found that when I run prstat to check, in SIZE column is more than I setting (found 644).
    So I'm don't know the actual memory that java process used. (In this case,is it mean the process use memory (644) more than setting (512)?)
    Thank you.

    With Xms/Xmx you specify the Java heap size. On top of that comes the permanent generation (default max size 64m) and the C part of the process (the JVM itself with all its libraries and data).
    With "ps -e -o pid,vsz,rss,args" you get the virtual and set resident size of your processes.
    Nick.

  • RFC execution process terminates the Java Process

    Hi All,
      we have a RFC which returns large data with export parameter. While executing JCO.client.execute(), java process is getting terminated. I tried to set the more heap size but of no use. It didn't give any OutOfMemory either.
    The JCO trace file at level 10 shows as below which clearly indicates that something is going wrong at JNI layer of JCO.
    The problem seems to be with allocation of heap size in 'C' layer of JCO.<b>The trace file has below last entries</b>
    <i>JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.Tables_C2Java()                                          enter, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.reallocRecordBuffers()                                   enter, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.reallocRecordBuffers("ZWNVPAIR"(4AB2BB8C),54D1A740) enter [SUCCESS]</i>
    It seems to suggest that reallocRecordBuffers was never completed and it is this call which could be responsible for java process getting killed.
    I think a successfull call will be recorded as below in JCO trace file:
    Completion of RFC call will be recorded as below in JCO trace file:
    <i>JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.Tables_C2Java()                                          enter, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.reallocRecordBuffers()                                   enter, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.reallocRecordBuffers("ZWNVPAIR"(4AB2BB8C),54D1A740) enter [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.reallocRecordBuffers()               with rc = RFC_OK   leave, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JNI-LAYER] RFC.Tables_C2Java()                      with rc = RFC_OK   leave, [SUCCESS]
    JMS Async S21514 [14:34:47:386]: [JAV-LAYER] JCO.Client.execute (Z_DB_READER) on handle [X] returns after XXXX ms
    </i>
    Can anyone please help me here in understanding the above behavior?

    Thanks for reply. Where can i see the timeOut ineterval for Connection or Client object? I am not able to figure out any API which can be used to set the timeout behavior.

  • Implementing a custom process type for a process chain

    I have created a custom process type for a process chain that allows a user to send back a failure or error status when calling an ABAP program.  I copied the class that is used from the existing ABAP process type as a template. 
    The process type works fine, I just cannot find out how to recreate the documentation for my custom type using free text. When you maintain the process type there is a field for the documentation object, but I can't find where in SAP to implement this.
    I have tried looking at the document maintenance using SE61 and looking into the class documentation from SE24 with no success.  The only detail that is provided in the SAP help portal is:
    "If necessary, assign a documentation type and a docu. object to the process type. The docu object can be called up via F1 in the process chain maintenance overview tree. "
    Does anyone out there have any experience with this that can push me in the right direction?
    Thanks,
    Eddie

    You can create and maintain system documentation from transaction SE61. This is how you would create documentation for a process type or if you wanted to create a book. <a href="http://help.sap.com/saphelp_nw04/helpdata/en/a4/d47df949e111d189730000e8322d00/frameset.htm">more info</a>
    Here are the steps to make your documentation similar to that used for the ABAP process type:
    From transaction SE61:
    -Create a document of type TX (either from scratch or by copying RSPC_ABAP which is used for the SAP-delivered ABAP process type)
    -Make any changes you need. I suggest downloading the document in ITF format and make the changes in a basic text editor and then uploading your changed document. It's a little easier to tell what is going on that way.
    Now on to transaction RSPC.
    Once you save your changes, go to RSPC and select on any chain you have to get into the "plan and check views of process chain maintenance." Then just go to Settings -> Maintain Process Types.
    From here you can select your process type, select TX from the document type dropdown, and then enter the name of your document in the docu. object field.
    Hope that helps.

  • Risk Management & Process controls for non SAP client

    Hi Forum Gurus,
    I need clarity on the following:  Can Risk managment 3.0 and Process controls be implemented for a non-SAP client?
    i.e. Our client does not run SAP, but they are interested in RM and PC, so is this possible to implement?
    Any advice would be highly appreciated.
    Kind regards,
    PREVO.

    Hi Prevo,
    Process control and Risk management 3.0 are delivered within same installation package files so it is same for both the applications .
    Also real time agents for Oracle or peoplesoft are avaialble if you want to leverage the automated control functionality of PC 3.0 in non SAP environment.
    Remember the automated control functionality is the optional feature of PC3.0.If you wish only to use the manual controls features of PC 3.0 you dont need RTAs(real time agent).
    You can find further information about manual controls at http://service.sap.com
    use the quicklink '/rkt' then the following menu path: SAP Business Objects for GRC Solutions -> SAP BO Process Control 3.0 -> Technology Consultant
    Regards
    Debraj

  • Process controlled workflow - SC process schema evaluation

    Hi experts,
    at the moment I'm using the n-step item level approval in SRM 5.0.
    We are implementing SRM 7.0. With the new process controlled workflow I'm not sure how to
    implement the logic of our "old" system.
    Depending on category and item value the SC item has to be approved by 0 - 7 users.
    I've created an event which finds a Z-process schema via FM.
    In the FM I've tried to change the process schema (debugger) for one SC item.
    But the schema has been changed for all items.
    Is it possible to use different process schemas for items?
    When yes how can I set the schema e.g.
    item 10 schema1
    item 20 schema1
    item 30 schema2
    item 40 schema1
    Thanks in advance for your inputs!
    Regards
    Stefan

    Hi,
    Schema Evaluation is document header level.
    There are 2 ways for implementation.
    1. Schema Evaluation returns Schema name. For example, 1 step approval, ... 7 step approval
    2. 1 Fixed Schema and 7 level evaluations. 1 Schema has 7 approval steps and each evaluation returns true or false.
    You have to implement GET_AREA_TO_ITEM_MAP method of Agent BADI to exclude/include items.
    BTW. If you set workflow framework as Application-Controlled Workflow, your old workflow logic works without any change.
    Regards,
    Masa

  • Email Alert for Process Chain for ABAP Process Type

    Hi BW Experts,
                             I created a process chain based on ABAP Process Type ( for Broadcasting rsrd_broadcast_starter). I want to add alert message for each ABAP process if it is failed. But I cant see any option showing Successfull or Error or Always when I select create message option on the process type. How ever I can see for other process chain which is loading data (Process Type is Info Package ) from SAP into BW.
                             Please some one tell me why it is not showing alert message for ABAP Process Type.
    Thanks
    Ganesh Reddy.
    Edited by: Ganesh Reddy on Jul 13, 2009 10:16 PM

    I dont have the exact answer for your question, But as a work around i can suggest you that.
    If these ABAP programs are included in a chain and this local chain is a part of meta chain then you can create a message on the local chain.By right clicking on the local chain >Create Message>Success
                                                                                    --->Failure
    >Always
    Hope this resolves the problem tempervorly.I will get back to you once i have
    Or the permanent solution is
    Its big and also easy method to perform, by this you will be able to get all the options for a ABAP Program also.If you have any questions please let me know.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/creating%20an%20abap%20process%20type%20for%20process%20chains%20in%20bi.pdf

  • Process instructions for particular process order.

    Hi SAP gurus,
    How can I find table level data of process instructions (Like READ 1 , READ2 , INSTR ) maintain  for particular process order.
    If should not with respect to recipe but it should be respect to process order.
    Can any Plz buddy explain me the chain of  tables starting  from order number?
    Best Regards,
    Parag Save

    Hi...
    i could not find the table for the relationship u r looking for... but i would suggest the following...
    Go to SE16.. press F4 in the table list...go to the application help... their you will find tables for each module... even for PP you will find table specific to process industry... this you can search ur own what can be relevant for ur requirement... finally u can use SAP query to join some table to the get the information u want....
    Try this...hopw it should work for u...
    Neeraj

  • GRC Process Control MDUG Central Process import error

    Hello to this forum.
    I have a problem with GRC Process Control MDUG import template:
    I have many processes structured on 4 levels.
    In CENTRAL PROCESS folder of template I would like to use same secondary process in 2 different main processes.
    At import check GRC answer that the object is duplicated !
    It seems I can't use again the same object in another process.
    is it possible ? How can I resolve ?
    thanks
    GR

    Can you give an example to be more elaborate

  • Will there be Mission Control for Java 7?

    Will there be a release of Mission Control that works with Java 7? If so, when?
    I understand from this page, http://blogs.oracle.com/henrik/entry/java_7_questions_answers , that there will be no JRockit for Java 7 since it is being merged with HotSpot but I see no indication when Mission Control will support the new merged JDK.

    We're working on merging JRockit features into HotSpot, and supporting these with a new version of Mission Control.
    Flight Recorder will come in a JDK 7 update.
    JavaOne 2011 pres regarding this:
    https://oracleus.wingateweb.com/scheduler/eventcatalog/eventCatalogJavaOne.do , search for "HotRockit"
    Klara, Mission Control QA

  • Killing a Java process from another Java process

    Hi
    Is there a possible way of sending a SIGINT, SIGKILL, or any other signal from a Java process running in one JVM, to a java process running in a different JVM on the same machine.
    I've the signal handlers written in my process and they do respond to singals (e.g. on pressing Ctrl-C) on the console, but i want to write a separate program that sends this signal to the first process.
    Any ideas?
    Thanks in advance and regards
    Kashif

    The answer, as always, is that Java can't do operating-system-specific things like that, but you can use JNI to do it. However, if your code created the Java process you want to kill, via Process p = Runtime.getRuntime().exec(...), then you can use p.destroy() to kill it.

  • Source Code Control for Java development in 6.20

    I am new to Java development. How do you control source code (versioning/transport) for Java development with the base R/3 is 6.20. I believe Java Development Infrastructure (JDI) is only available in 6.40. Is this the correct statement? Anyone that has work on 6.40 with Java can explain?
    Let say we have this setup:
    Applications are in 6.20
    Portal will be EP 6.0
    Do we need Web AS 6.40 to develop Java for Portal with base R/3 of 6.20. Or we can use Developer Studio to create Java accessing R/3 6.20 and display in Portal 6.0. If this is the case, how do you manage transport is you are not using JDI in 6.40.

    Hi Nablan,
    I believe you are development J2EE applications. JDI only runs with WebAS 6.40 which supports J2EE spec. 1.3. The developed J2EE archive will not be able to deploy to WebAS 6.20 which only supports J2EE 1.2 spec. So if you want to deploy the created software build from JDI and deploy it to WebAS 6.20, then the answer is unfortunately no.
    But, if you just want the Portal be able to display your application in an iView inside, then maybe you can just develop and deploy your application to the WebAS 6.40 system. Then create an iView in your EP to point to the app in the 6.40 system. That way your app will not need to deploy to WebAS 6.20.
    Regards,
    Marc

  • Error: MSS inbox execute process configuration for FPM processes

    Hi,
    I got struck up with the error  'Specify a valid Person.' when executing work item from manager inbox for FPM (Webdynpro) forms.
    I am using Launchpad handler for POWL mss inbox  to execute approvals of process.
    I created LPD_CUST config for my process, when executed from approving manager inbox I am getting this error.
    Anybody please suggest, I will give full points..
    Thanks,
    Hareesh K

    The pernr should be picked from the workitem in the case of approval.
    Ensure you do the POWL inbox configuration as has been done for in standard delivery of HR Admin role.
    APPL ID           ASR_HRADMIN_INBOX
    TASK ID           TS17900101
    for the MANAGER_MSS_INBOX*.
    For HR Admin role WI is passed as a parameter in the view IBO_C_WF_APS:
    APPL ID       ASR_HRADMIN_INBOX
    ACTION ID     EXECUTETASK
    PROP NAME     OBJECTVALUE
    PROP VALUE    WI_ID=${ITEM.EXTERNALID}
    Regards.

  • Tab index for htmlB controls for java

    Hi,
    How can we set the tab index for HtmlB Conrols for java.
    Thanks,
    Padmaja

    Hi Padmaja,
    I'd suggest you use the following:
    TabStrip myTabStrip = new TabStrip("myTabStrip");
    TabStripItem myItem = myTabStrip.addTab(1); <=== Tab index specified as 1
    Index position can be specified using the addTab(<index>) method.
    Regards,
    Divya

  • Copy control for Return Process

    HI every one,
    I am Doing the Return Cycle Process but i am not sure how to maintain the Copy Control because i am new to return process
    Billing Type : ZF2, Item category :ZTAN,Return Order : ZRE, Item category : ZREN, Billing Type  : ZG2 (Credit Note)
    give me how to maintain the Copy Control in VTFA,VTLA,VTFL
    Guideme
    Regards,
    Anu
    Edited by: Anuradha_SD on Sep 14, 2011 12:50 PM

    HI
    Let us talk about the Copy control VTAF
    I maintained the Copy Control Order Type ZRE,
    Target SalesDocTyp ZRE                    Source Bill. Type ZF2
                       Sales Return - JICPL                     Invoice - JICPL
    DataT 052 Billing doc.header        Copying requirements 021 Billing header
    DataT 103 Bill.bus.header data            Copy item number (TICK)
    DataT 003 Bill.header partner
    Target SalesDocTyp ZRE                    Source Bill. Type  ZF2
                       Sales Return - JICPL                      Invoice - JICPL
    ItemCat Proposal   G2N                    Item Category      ZREN
                       Request                                   Return Items -JICPL
                                        Copying requirements 303 Always an item
    DataT 153 Item from bill.doc.
                                                               Pos./neg. quantity
    DataT 104 Bill.bus.item data                               Pricing type         D
    DataT 004 Bill.item partner         X Update document flow
    bl.pl 0                                                    Campaign Deter.
    Target SalesDocTyp ZRE                   Source Bill. Type  ZF2
                       Sales Return - JICPL                     Invoice - JICPL
    SchdLneCatProposal DN                    Sched.Line Cat.    CP
                       Return - JICPL                           MRP -JICPL
                                        Copying requirements 303 Always an item
    DataT 002 Partner item
    Like that i maintained but at the time of Return order with reference to Billing Document its not working means
    if i take Second time Same billing Document Number system is showing same qty because i have already refered previously
    why system is showing same qty why it is not reduced
    guide me
    Regards
    Anu

Maybe you are looking for

  • Color LaserJet 3800 Printing Issues

    I am in the process of upgrading our desktop computers to Windows 7 Pro (x64). In preparation for this we setup a new print server running Windows Server 2008 R2 and created new print queues for each of the printers on our old Windows 2003 server, in

  • Pavilion dv5 2035dx - reinstalling after replacing hard drive

    My hard drive in my Pavilion dv5 2035dx failed -every test imaginable and I could not get Windos 7 to load.  I purchased a replacement drive that is an exact dupilcate of the original Toshoba 500 and installed in my laptop.  I was not too concerned s

  • How to create an email link in UIX page

    I am trying to create a simple email link in my UIX page in order to get feedback from users. I don't seem to find out how to do it. Can someone please help me ASAP. Many Thanks, Qian Dong

  • Alerts for distribution logs (SCUL)

    Hi, I wanted to know how can we setup CUA alerts i.e. alerts for the errors found in SCUL trx If the distribution logs in SCUL trx can be emailed if in error. Please let me know is there any way to do this? Regards, Chintan

  • EAX Problem. Please help

    This has happened a few times in the past and?restarting the computer usually worked this out. When opening the eax console no acti've presets will load. I can not use in enviromental settings or anything like that at all... they don't even appear. I