Kill -9 FND process

Hi,
I shutdown my Concurrent Manager (CM) process
using:
./PROD/inst/apps/PROD_chrono/admin/scripts/adcmctl.sh stop apps/apps
running it many times but when I run:
ps -ef|grep FNDLIBR there is still process remaining
How do I know If its already down?
Is it ok to issue "kill -9 " with the FNDLIBR process?
Thanks

ps -ef|grep FNDLIBR there is still process remainingGive it sometime and check then.
How do I know If its already down? When the above command returns no rows, or from the CM administer screen (actual and target columns are all zeros).
Is it ok to issue "kill -9 " with the FNDLIBR process?Yes, but not always and in this case you may need to run cmclean.sql before starting up the CM. If the CM refuse to shutdown and clean its processes, then we need to find out why.

Similar Messages

  • How to kill Forms Runaway Process using 95% CPU and running for 2 hours.

    We had a situation at E-Business Suite customer (using Oracle VM server) where some of Form processes were not being cleared by form timeout settings automatically.
    Also when user exits the form session from front end, the linux form process (PID) and DB session did not exit properly, so they got hung.
    They were spiking CPU and memory usage and causing e-business suite to perform slowely and ultimately causing VM host to reboot the production VM guest (running on Linux).
    We could see the form processes (PIDs) using almost 100% cpu with "top" command and running for a long time.
    Also we verified those Form Sessions did not exist in the application itself.
    ie. Using from Grid Control -> OAM-> Site Map -> Monitoring (tab) -> "Form Sessions".
    It means that we could safely kill that form process from Linux using "kill -9 <PID>" command.
    But that required a continuous monitoring and manual DBA intervention as customer is 24x7 customer.
    So, I wrote a shell script to do the following;
    •     Cron job runs every half an hour 7 days a week which calls this shell script.
    •     Shell script runs and tries to find "top two" f60webmx processes (form sessions) using over 95% cpu with 2 minutes interval.
    •     If no process is found or CPU% is less than 95%, it exits and does nothing.
    •     If top process is found, it searches for its DB session using apps login (with hidden apps password file - /home/applmgr/.pwd).
    a.     If DB session is NOT found (which means form process is hung), it kills the process from unix and emails results to <[email protected]>
    b.     If DB session is found, it waits for 2 hours so that form process times automatically via form session timeout setting.
    It also emails the SQL to check the DB session for that form process.
    c.     If DB session is found and it does not timeout after 2 hours,
    it kills the process from unix (which in turn kills the DB session). Output is emailed.
    This are the files required for this;
    1. Cron job which calls the shell script looks like this;
    # Kill form runaway process, using over 95% cpu having no DB session or DB session for > 2hrs
    00,30 * * * * /home/applmgr/forms_runaway.sh 2>&1
    2. SQL that this script calls is /home/applmgr/frm_runaway.sql and looks like;
    set head off
    set verify off
    set feedback off
    set pagesize 0
    define form_client_PID = &1
    select count(*) from v$session s , v$process p, FND_FORM_SESSIONS_V f where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='&form_client_PID';
    3. Actual shell script is /home/applmgr/forms_runaway.sh and looks like;
    # Author : Amandeep Singh
    # Description : Kills runaway form processes using more than 95% cpu
    # and Form Session with no DB session or DB session > 2hrs
    # Dated : 11-April-2012
    #!/bin/bash
    . /home/applmgr/.bash_profile
    PWD=`cat ~/.pwd`
    export PWD
    echo "`date`">/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR1=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID1=`echo $VAR1|awk '{print $1}'`
    CPU1=`echo $VAR1|awk '{print $2}'`
    TIME1=`echo $VAR1|awk '{print $3}'`
    PROG1=`echo $VAR1|awk '{print $4}'`
    PID_1=`echo $VAR1|awk '{print $5}'`
    CPU_1=`echo $VAR1|awk '{print $6}'`
    TIME_1=`echo $VAR1|awk '{print $7}'`
    PROG_1=`echo $VAR1|awk '{print $8}'`
    echo "PID1="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    echo "PID_1="$PID_1", CPU%="$CPU_1", Running Time="$TIME_1", Program="$PROG_1>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    sleep 120
    echo "`date`">>/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR2=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID2=`echo $VAR2|awk '{print $1}'`
    CPU2=`echo $VAR2|awk '{print $2}'`
    TIME2=`echo $VAR2|awk '{print $3}'`
    PROG2=`echo $VAR2|awk '{print $4}'`
    PID_2=`echo $VAR2|awk '{print $5}'`
    CPU_2=`echo $VAR2|awk '{print $6}'`
    TIME_2=`echo $VAR2|awk '{print $7}'`
    PROG_2=`echo $VAR2|awk '{print $8}'`
    HRS=`echo $TIME1|cut -d: -f1`
    exprHRS=`expr "$HRS"`
    echo "PID2="$PID2", CPU%="$CPU2", Running Time="$TIME2", Program="$PROG2>>/tmp/runaway_forms.log
    echo "PID_2="$PID_2", CPU%="$CPU_2", Running Time="$TIME_2", Program="$PROG_2>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    # If PID1 or PID2 is NULL
    if [ -z ${PID1} ] || [ -z ${PID2} ]
    then
    echo "no top processes found. Either PID is NULL OR CPU% is less than 95%. Exiting...">>/tmp/runaway_forms.log
    elif
    # If PID1 is equal to PID2 or PID1=PID_2 or PID_1=PID2 or PID_1=PID_2
    [ ${PID1} -eq ${PID2} ] || [ ${PID1} -eq ${PID_2} ] || [ ${PID_1} -eq ${PID2} ] || [ ${PID_1} -eq ${PID_2} ];
    then
    DB_SESSION=`$ORACLE_HOME/bin/sqlplus -S apps/$PWD @/home/applmgr/frm_runaway.sql $PID1 << EOF
    EOF`
    echo " ">>/tmp/runaway_forms.log
    echo "DB_SESSION ="$DB_SESSION >>/tmp/runaway_forms.log
    # if no DB session found for PID
    if [ $DB_SESSION -eq 0 ] then
    echo " ">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "Killed: `hostname -a` Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    # If DB session exists for PID
    if [ ${exprHRS} -gt 120 ]; then
    echo $DB_SESSION "of Database sessions exist for this forms process-PID="$PID1". But its running for more than 2 hours. ">>/tmp/runaway_forms.log
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo $DB_SESSION "of Database sessions exist for PID="$PID1" and is less than 2 hours old. Not killing...">>/tmp/runaway_forms.log
    echo "For more details on this PID, run following SQL query;">>/tmp/runaway_forms.log
    echo "-----------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "set pages 9999 lines 150">>/tmp/runaway_forms.log
    echo "select f.user_form_name, f.user_name, p.spid DB_OS_ID , s.process client_os_id,, s.audsid, f.PROCESS_SPID Forms_SPID,">>/tmp/runaway_forms.log
    echo "to_char(s.logon_time,'DD-Mon-YY hh:mi:ss'), s.seconds_in_wait">>/tmp/runaway_forms.log
    echo "from v\$session s , v\$process p, FND_FORM_SESSIONS_V f">>/tmp/runaway_forms.log
    echo "where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='"$PID1"' order by p.spid;">>/tmp/runaway_forms.log
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    fi
    else
    #if PID1 and PID2 are not equal or CPU% is less than 95%.
    echo "No unique CPU hogging form processes found. Exiting...">>/tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    If you have the same problem with some other unix and DB processes, the script can be easily modified and used.
    But use this with thorough testing first (by commenting out <kill -9 $PID1> lines.
    Good luck.
    Edited by: R12_AppsDBA on 19/04/2012 13:10

    Thanks for sharing the script!
    Hussein

  • How to kill an instance process in BPM studio 6.0

    Hi i'm Fabio.
    I'm working on BPM Studio 6.0 and i need to complete a task.
    I have an instance id process, and i need to create a new process in order to kill this istance id.
    I read how to create a PAPI client (http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/papi/index.html?t=modules/papi/c_Writing_Your_First_Java_PAPI_Program.html) but it doesn't work for my purpose.
    First of all, i understood that i have to follow these step:
    * Import the required libraries.
    * Create a process service.
    * Create a process service session.
    * Perform operations with PAPI.
    * Close the process service.
    Now, i'm working on my xpdl file and i'm using the Standard Module "Fuego" and my plan is to create a process servcie, a process service session and then operate with PAPI.
    But using the PAPI module include in the BPM studio 6.0 i'm no able to load the library for the session import fuego.papi.ProcessServiceSession;
    so i'm worng something. Could you tell me how can menage this problem? Really do i need a session? Is possible to abort an istance process in BPM studio or i need to load my ear project in Enterprise environment and then kill my instance process? Thanks, regards Fabio.

    Thanks Dan, i read your suggestion but my boss was to implement a different solution:
    package hp.abort.process;
    import fuego.boot.*;
    import fuego.papi.CommunicationException;
    import fuego.papi.InstanceInfo;
    import fuego.papi.InstanceId;
    import fuego.papi.ProcessService;
    import fuego.papi.ProcessServiceSession;
    import fuego.papi.OperationException;
    import java.util.Properties;
    import javax.transaction.*;
    import java.lang.Exception;
    public class AbortProcess {
    public static void main(String[] args) {
    /////////////////// API Initialization ///////////////////
    Properties configuration = new Properties();
    configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
    configuration.setProperty(ProcessService.PROJECT_PATH, "C:/Documents and Settings/Administrator/AlbpmWorkspace/EarOMatic");
    configuration.setProperty(ProcessService.WORKING_FOLDER, "C:/tmp");
    try {
    ProcessService processService = ProcessService.create(configuration);
    /////////////////// Establish a session ///////////////////
    ProcessServiceSession session = processService.createSession("adminEarOMatic", "adminEarOMatic", "localhost");
    /////////////////// Operate with PAPI ///////////////////
    for (String processId : session.processesGetIds()) {
    System.out.println("\n Process: " + processId);
    for (InstanceInfo instance : session.processGetInstances(processId) ) {
    System.out.println(" -> " + instance.getId());
    System.out.println("ActivityName -> " + instance.getActivityName());
    System.out.println("ActivityId -> "+ instance.getActivityId());
    //Problema: nn vuole ActivityId ma Process Id
    session.activityAbort("/CreateEurekaSRService#Default-1.0/eomWait","/CreateEurekaSRService#Default-1.0/1/0@EarOMatic");
    /////////////////// Close the session ///////////////////
    session.close();
    /////////////////// Release API Resources ///////////////////
    processService.close();
    } catch (CommunicationException e) {
    System.out.println("Could not connect to Directory Service");
    e.printStackTrace();
    } catch (OperationException e) {
    System.out.println("Could not perform the requested operation");
    e.printStackTrace();
    Now, i got the following exception:
    Local folder C:/tmp\system\Schema-4154784351820594721\catalogs found.
    Loading catalogs from local folder: C:/tmp\system\Schema-4154784351820594721\catalogs
    0 jars found locally.
    [CatalogMgrCache] =======================
    Registering CatalogMgr [EarOMatic] ...CatalogManagerCache 10390580:
    Managers:
    Counters:
    [CatalogMgrCache] =======================
    CatalogMgr [EarOMatic] REGISTERED!CatalogManagerCache 10390580:
    Managers:
    {EarOMatic=fuego.util.LocalCatalogManager@106df95}
    Counters:
    Process: /AbortInstanceProcessService#Default-1.0
    Unreachable Engine Tolerance (seconds):
    by default: 0
    to be used: 0
    This papi client will not cache exceptions which imply that an engine could not be reached.
    Changing InstanceCache Entry[processId=/AbortInstanceProcessService#Default-1.0, state=0] to 3
    Changing InstanceCache Entry[processId=/AbortInstanceProcessService#Default-1.0, state=3] to 2
    Process: /CreateEurekaSRService#Default-1.0
    Changing InstanceCache Entry[processId=/CreateEurekaSRService#Default-1.0, state=0] to 3
    Changing InstanceCache Entry[processId=/CreateEurekaSRService#Default-1.0, state=3] to 2
    -> /CreateEurekaSRService#Default-1.0/1/0
    ActivityName -> eomWait
    Adding local catalog for project: 1
    ActivityId -> /CreateEurekaSRService#Default-1.0/eomWait
    Exception in thread "main" fuego.server.exception.InvalidIdRuntimeException: Invalid identification.
    Detail:Invalid identification (Identification value: /CreateEurekaSRService#Default-1.0/eomWait)
         at fuego.server.ActiveProcessImpl.getActivity(ActiveProcessImpl.java:632)
         at fuego.server.execution.microactivity.AbstractProcessExecutionHandler.getExecutableActivity(AbstractProcessExecutionHandler.java:58)
         at fuego.server.AbstractProcessBean.abortActivity(AbstractProcessBean.java:3262)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:587)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:778)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:753)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:837)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
         at fuego.component.CustomExecution.next(CustomExecution.java:172)
         at fuego.component.ExecutorClient.invoke(ExecutorClient.java:118)
         at fuego.papi.impl.rmi.ProcessControlProxy.abortActivity(ProcessControlProxy.java:407)
         at fuego.papi.impl.rmi.ProcessControlProxyWrapper.abortActivity(ProcessControlProxyWrapper.java:683)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at fuego.papi.impl.AbstractProcessControlHandler.invokeInternal(AbstractProcessControlHandler.java:72)
         at fuego.papi.impl.rmi.RMIProcessControlHandler.invoke(RMIProcessControlHandler.java:165)
         at $Proxy23.abortActivity(Unknown Source)
         at fuego.papi.impl.ProcessInstanceOperation.abortActivity(ProcessInstanceOperation.java:726)
         at fuego.papi.impl.ProcessServiceSessionImpl.activityAbort(ProcessServiceSessionImpl.java:184)
         at hp.abort.process.AbortProcess.main(AbortProcess.java:45)
    Caused by: fuego.metadata.exception.InvalidIdException: Activity '/CreateEurekaSRService#Default-1.0/eomWait' was not found in process '/CreateEurekaSRService#Default-1.0'.
         at fuego.metadata.Process.getActivity(Process.java:261)
         at fuego.server.ActiveProcessImpl.getActivity(ActiveProcessImpl.java:629)
         at fuego.server.execution.microactivity.AbstractProcessExecutionHandler.getExecutableActivity(AbstractProcessExecutionHandler.java:58)
         at fuego.server.AbstractProcessBean.abortActivity(AbstractProcessBean.java:3262)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
         at fuego.lang.JavaObject.invoke(JavaObject.java:227)
         at fuego.component.Message.process(Message.java:587)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:778)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:753)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:837)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    I understood that tha activity id's format is not valid, but i obtained it just using the following function: instance.getActivityId()
    Are you abel to give me some suggestion? Is it good this method to kill instance?
    Thanks a lot, regard Fabio.

  • How to kill a BPM Process

    Hi Guys,
    I want to know how to kill a BPM process.
    any help would be appreciated
    Thanks,
    Srini

    Srini,
    Refer this -Re: How to stop infinite loop?
    raj.

  • Killing a sub process from it's parent process

    does any one know if ther's a way of killing a sub process from it's parent process?

    There are a few ways to do this depending on how the subprocess was invoked and if you are inside the parent work item instance or if you are using PAPI.
    If you are not using PAPI, here's how you could abort the child work item instances spawned by a parent process's work item instance.
    Asynchronously Spawned Children
    If a child process was invoked using an asynchronous Process Creation activity, the work item instance in the parent has a predefined hash table variable called "children". Downstream of the parent's Process Creation activity (called "SpawnChildren" in the PBL logic below), you can get the child's instance id using the children hash table and use this to send a notification to a Message Wait activty in the spawned child process instance using logic like this:
    send Notification
            using instanceId = children["SpawnChildren"],
                  activityName = "TerminateChild",
                  parameters = nullThe Message Wait activity needs to have its "Allows Interrupt" property checked in the child process. As you add this Message Wait activity (called "terminateChild" in the example above) make it an orphan with no transitions in or out initially. Once notified by the parent process, it still needs to be aborted so add a new Automatic activity in the child with this logic:
    action = ABORTFinally, add a transition from the Message Wait activity in the child subprocess to the Automatic activity.
    Synchronously Spawned Children
    If all you know is the parent work item instance's id and the child subprocess was invoked using a synchronous SubFlow activity, you could send a notification to a Message Wait activity that has it's "Allows Interrupt" property checked in the parent. If the Message Wait activity flows to an Automatic activity, you could use logic like this to kill the child subprocess work item instances synchrously spawned by the parent:
    for each ch in ProcessInstance.children do
        send Notification
            using instanceId = ch,
                  activityName = "TerminateChild",
                  parameters = null
    end
    action = SKIPSince the parent's instance was stuck in the Subflow activity, you'd need to send a notification to the parent's Message Wait activity in the parent process.

  • To Kill Parent / Child process

    Hi ,
    I'm facing problem with killing a process. I'm using "kill -9 <ppid>"(ppid - parent process id) command to kill the process, this command kills the parent process but the associated child process is not killed.
    I'm new to this Solaris, and my question is
    Do killing the Parent process internally kills the child process too? if the child process is taking time, how to ensure that the child process is killed before killing the Parent process.
    Thanks in advance for your response.

    Do killing the Parent process internally kills the child process too?Hello.
    If the parent process ends (does not care if regular exit or kill) it sends a signal to all its child processes. This is equal to "kill -xxx <child_pid>" (sorry that I do not know the number "xxx" by now).
    By default this signal will kill the child process but it is a signal that can be caught or ignored. This means the child process can tell the operating system that it does not wish to be killed when the parent is killed, the parent exits or an explicit "kill -xxx" is sent. (Only two signals cannot be caught or ignored: SIGKILL and one that pauses the process.)
    Martin

  • Killing an excel process

    Hi!
    That's my first message here, sorry if I left something... I'm having some problems deleting an excel process one I have make some processing previously.
    After calling collect and WaitForPendingFinalizers methods and release all the excel objects created (worksheet, workbook and excelapp in that order) the excel process is still there.
    I have tried to kill the excel process and I could kill it but then I got a system message telling me that the outlook integration addon has failed so my guess is that the outlook integration addon is messing with some dll related to excel also.
    Have you got in this situation and solved it ?
    Thanks a lot !!!

    I have released the ComObjects (using the ReleaseComObject marshal method) and closed the excel connections before and after releasing all the objects opened, but to no avail, the excel process is still there...
    The problem is that each time it opens a new excel instance so it could be a great resources problem if the process is executed a few times.
    Right now I could not put the code used but I would try later.
    Here's the code...
    Finally
                'If Not xlApp Is Nothing Then xlApp.Quit()
                Dim processId As IntPtr
                GetWindowThreadProcessId(New IntPtr(xlApp.Hwnd), processId)
                'AccCommon.Functions.ReleaseComObject(xlSheet)
                'AccCommon.Functions.ReleaseComObject(xlWB)
                'AccCommon.Functions.ReleaseComObject(xlApp)
                GC.Collect()
                GC.WaitForPendingFinalizers()
                GC.Collect()
                GC.WaitForPendingFinalizers()
                RelasseExcelObject(chartRange)
                RelasseExcelObject(xlSheet)
                xlWB.Close(False, Type.Missing, Type.Missing)
                xlApp.Workbooks.Close()
                RelasseExcelObject(xlWB)
                xlApp.Application.Quit()
                xlApp.Quit()
                RelasseExcelObject(xlApp)
                chartRange = Nothing
                xlSheet = Nothing
                xlWB = Nothing
                xlApp = Nothing
                If (processId <> 0) Then
                    Dim excelProcess As Process = Process.GetProcessById(processId)
                    excelProcess.CloseMainWindow()
                    excelProcess.Refresh()
                    excelProcess.Kill()
                End If
            End Try

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • How to kill the apps process?

    Is my Yoga tab 2 1050F In this few weaks, after turn on the tab 2-3 hours, RAM has 500m onlyand cannot kill the apps process at all... WHY? Standby under than 24hours ... few weaks before that is 1 week standby times. I was turn on ALL power save function. WHY? I need help pls   Look at picture, Aweak has never stop.  Thx

    Hi
    If the process chain is running in background,
    goto <b>SM37</b>
    Give * in the jobname
    Give the username who scheduled the process chain
    Job status - check the check boxes - SCHED, relased, ready, active
    click <b>execute</b>.
    It displays all the process chains that, scheduled & running.
    You can select the process chain that need to be stopped & click STOP active job or ctrl+F1.
    Hope this helps!
    Kindly award points for all useful answers.
    If you post the BW related queries in the <b>BI general</b> forum, you will get more answers.
    Best regards,
    Thangesh

  • Kill a suspended process

    According to process explorer a 32 bit process is in suspended state. Its parent is "non-existent". When I try to forcefully kill it I get a message that it currently is not executed. How do I kill this process?
    C:\WINDOWS\system32>taskkill -pid 8152
    ERROR: The process with PID 8152 could not be terminated.
    Reason: This process can only be terminated forcefully (with /F option).
    C:\WINDOWS\system32>taskkill -f -pid 8152
    ERROR: The process with PID 8152 could not be terminated.
    Reason: Deze taak wordt niet uitgevoerd op dit moment.
     

    Hi,
    You should kill child process too if any spawned to kill successfully your process:
    taskkill /pid 8152 /T /F
    /T = kills child process
    /F = forceful termination of your process
    Kate Li
    TechNet Community Support

  • Kill a windows process

    How can i kill a windows process giving the executable name (eg: "acrord32.exe") ?
    Is it possible to kill the process from an applet ?
    thanks
    roberto

    I mean, not with standard Java, maybe with JNI by launching some native command with Runtime.exec()... look on an MS forum maybe...

  • I want to kill a particular process chain from a meta chain..

    Hi All,
    I want to kill a particular process chain from a meta chain as, its having some technical issues.So what is the procedure.to handle this process..
    Thanks..

    follow these steps
    1.Go to the chain which you want to kill .
    2.Go in the log view->top menu bar execution tab.>Remove from schedule.
    you are done
    Another way (bit complex but will work )
    1.Go to the process chain running (which you want to kill) in the log view copy the logid (lef hand side of screen you can get that)
    2.Open a new session ,Go to se37 enter function module RSPC_PROCESS_FINISH -->execute it
    3.Now again go Log view of the process chain right click on the start variant>display messages>Chain tab
    copy the variant ,instance ,date time etc
    4.IN execution screen of RSPC_PROCESS_FINISH enter the variant,instance,data time,logid and Type=TRIGGER
    status = R.
    Actually you will see something like this in input screen
    I_LOGID -
    >from log view in RSPC
    I_CHAIN
    I_TYPE   -
    >TRIGGER for start variant
    I_VARIANT----
    >from log view in RSPC
    I_INSTANCE------>from log view in RSPC
    I_STATE     -
    >R
    I_EVENTNO                       00
    I_HOLD
    I_JOB_COUNT
    I_BATCHDATE   -
    >from log view in RSPC
    I_BATCHTIME                     00:00:00
    I_DUMP_AT_ERROR
    Thats all and your are done.
    But I would suggest Remove from Schedule will surely work....If you have any doubts let me know.
    Regards,
    Rocks

  • Firefox crashes once a day appears to be connected to npviewer. I must kill all npviewer processes after crashing before restarting firefox. What is this?

    I am using linux, CentOS release 5.10, and firefox 24.8. This has been occurring for various release of firefox for the past 2 years. All of firefox crashes replacing the window with many small icons associated with npviewer processes. I cannot restart firefox until the npviewer processes are all killed. As I kill each npviewer process, a npviewer icon also dies. The number of npviewer icons varies.
    I use gkrellrm to monitor the system bottle necks. Gkrellm indicates a sudden jump to 100% activity on eth0 at the time of the crash. The crash does not seem to be linked to a particular website.
    I would appreciate any help?

    * http://brainwreckedtech.wordpress.com/2009/04/27/npviewerbin-process-can-slow-down-linux/
    * https://bugs.launchpad.net/ubuntu/+source/nspluginwrapper/+bug/282323
    Apparently, that file is a resource hog used with Flash. You could use plugins click-to-play to control plugins. The extension Click to Play Per Element can switch the control of plugins back to per item instead of per site.

  • Killing a Java process.Help required.

    Hi,
    I have some java background processes running in a Linux env.
    I tried killing these,but they arent being killed.
    ps -ef | grep java
    fix1     13193 13184  0 09:05 ?        00:00:05
    java -mx256M -classpath :../lib/lServer.jar:../lib/Core.jar:../lib/FilePersistence.jar:../lib/RMIAdapter.jar com..universalserver.UniversalServer -id
    i_APPLICATION -xmlconfig ../config/config..boa.xml -nogui
    I used:
    kill 13193
    but process is not being killed.
    I know this is a Java Forum but please can anyone help?

    kill -9 pidLOL straight in there with the old bludgeon :-)

  • Ps -ef | grep ora   anyother method to check & kill the inactive process?

    ps -ef | grep ora
    kill -9 <87653>
    How i can monitor /check & kill the inactive process?
    because process are going very high in my DB?

    You can create a user profile to limit the idle time of sessions.
    PMON will garbage clean periodically.
    sample profile:
    create profile
    my_profile
    limit
    sessions_per_user 2 --
    cpu_per_session 10000 -- hunderth of seconds
    cpu_per_call 1 -- hunderth of seconds
    connect_time unlimited -- minutes
    idle_time 30 -- minutes
    logical_reads_per_session default -- db blocks
    logical_reads_per_call default -- db blocks
    -- composite_limit default --
    private_sga 20M --
    failed_login_attempts 3 --
    password_life_time 30 -- days
    password_reuse_time 12 --
    password_reuse_max unlimited --
    password_lock_time default -- days
    password_grace_time 2 -- days
    password_verify_function null;

Maybe you are looking for