Process Id in Unix

How can i get process id of the java program being executed in the unix environment programatically .

Another suggestion was to exec an program which outputs its parent's PID. Something like this:
#include <unistd.h>
#include <stdio.h>
int main() {
        printf("%d\n",getppid());
}This works only if exec goes directly, that is, if there is no intermediate process.

Similar Messages

  • Trigger process chains from UNIX

    Hi,
    I just wanted to know how can we trigger Process chains from UNIX Server.
    Any pointers will be appreciated.
    Thanks

    I suggest to use the sapevt.exe.
    With it you can trigger an event in the SAP system with the execution of a simple command file (.bat for ex.)
    So the event will start the chain as you require.
    You can find more info for sapevt in:
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    Regards,
    Sregio
    Did you try that?
    Message was edited by: Sergio Locatelli

  • Discoverer 4i Processes Die on Unix

    Does anyone have this problem in the version of Discoverer that comes with 9iAS 1.0.2.2?
    I am starting my Discoverer processes using the three script files startall.sh, applypreferences.sh and registerall.sh. But when I log off the machine, all the Discoverer processes die and no Discoverer connections can be made. The only way I can keep Discoverer connectivity up is by remaining logged in as the user on the unix box who started the shells indefinitely. During this time all Discoverer connectivity is fine.
    I'm on Solaris 2.6 and my oracle user's $SHELL variable is /bin/sh. I have tried putting the jobs in the background and cron -- nothing works.
    Any ideas? Thanks..
    Kate

    I'm assuming because you're using 9iAS 1.0.2.2 that you are using Discoverer 4.1. I haven't had any problems with 4.1. I remember that Discoverer 3i did die when I logged out. I didn't bother to get it to work because we had so many other problems.

  • To see the rman process running on UNIX

    Hi
    What is command on AIX / UNIX to see if we have any rman processes still running?
    Thanks.
    I tried ps -ef | grep oraprod (user) but see no rman processes.
    Many thanks

    There are 2 things what should be checked:
    1. from unix side as already pavan mentioned
    ps -ef | grep rman
    2. from oracle side to look for rman sessions:
    select * from v$session where program like 'rman%';
    If both requests return nothing - rman had finished his job and already from logfiles or with help of rman commands (list, report) You can understand īs the job done or not.

  • Finding C/Mgr Process Name on Unix

    Gurus,
    We have three environments on one HPUX box (PROD, TEST, DEV). Two of them are on 11i. One of them is now on 12. In the past, to determine the concurrent manager process, I grep for fndcpmbr, and also grep on the mountpoint. The reason why I grep on the mountpoint is because that shows the concurrent manager logfile location, so I can differentiate between PROD, TEST and DEV. (Each environment is on it's own mountpoint or filesystem, eg /u10, /u11 and /u12)
    In release 12, the fndcpmbr unix process does not show the logfile. So once all environments on this box are on release 12, how can I determine through ps-ef on unix, which concurrent manager belongs to which environment?
    So 11i looks like this:
    FNDLIBR FND CPMGR FNDCPMBR sysmgr="" diag=N logfile=/u10/or
    And 12 looks like this:
    FNDLIBR FND CPMGR FNDCPMBR sysmgr="" sleep=30 pmon=4 quesize=1 d (there is no logfile showing)
    Thanks ...colin

    Hi Srini,
    Because we have PROD, TEST and DEV on the same unix box. If I'm applying a patch to TEST, I need to shutdown the TEST application processes. AFter calling the script to shut it down, I always check for the unix process to ensure it is down (it's just easier than logging into the applications to the c/mgrs screen). The other reason: say if we need to shutdown the Test database - I always like to ensure that the TEST applications processes are completely shutdown, before I shutdown the TEST db - again, it's always been easier to run my ps -ef script on unix, that it is to log into the application and check the concurrent mgr screen.
    ..colin

  • Process locking while running the current process running in Unix

    Hi Guys,
    I am sorry to ask you the question here . I have a situtation like I am running one process using crontab which kicks of every 30 mins but due to database slow my another batch is overlapping the process . Could you please give me some suggetions in unix
    Process A is running at 10:30 but this process did not complete
    The same process is started 11:00 -- Both process are overlapping each other .
    Please suggest me any thing .
    Clark

    No Oracle version number
    No description of the process or the SQL or PL/SQL being run
    No explain plans
    No traces
    No timings
    Here are your choices in no particular order.
    1. Buy faster hardware
    2. Load less data into your tables
    3. Modify all SQL statements to contain "AND ROWNUM = 1"
    4. Improve the performance of the first job
    5. Start the second job later than 11:00
    6. Provide those trying to help you with sufficient information for them to do so
    Well you did ask for "anything." <g>
    Seriously ... I'd suggest you choose #6.

  • *"Wrong process return code"* Unix Command

    Hi,
    I have created Package with Procedure having Unix command.Unix command is only to cp data file from one folder to another archive folder.
    we are defining variable FilePath and FileName.
    cp #FILE_PATH/#FILE_NAME.tag #FILE_PATH/archive/;
    But while running this we are getting following erorr.
    *"Wrong process return code"*
    Plz suggest.
    Thanks
    Ashwini

    Hi Aswini-
    You should not use # symbol for your variable pointers, it will take as a comment line. Please use the below syntax:
    FILE_PATH=c:\temp
    FILE_NAME=test.txt
    cp $FILE_PATH/$FILE_NAME.tag $FILE_PATH/archive/
    And also you can check the exact error by executing the script file in your unix command prompt like this:
    /home/test/test.sh
    Hope this will work for you.
    Thanks,
    Saravanan Rajavel

  • Abnormal increment in background processes on AIX unix (oracle8i)

    Hi
    We have a problem running oracle8i on AIX unix. Our system is having two
    parallel IBM RS6000 servers. Both running in HACMP env. We are using oracle8i with almost 350 clients.
    For the last few days we observed that total no of oracle background processes abnormally increasing and touches 400 on each server. We got this information from following command
    ps -ef |grep ora |wc -l
    The moment it reaches 400 no more sessions are able to connect to the database.
    One more thing we have observed that about 150 processes are defunct, which we get from using following commands
    ps -ef |grep defunct | wc -l
    On killing these processes using
    kill -9 <pid>
    system is unable to kill it.
    When we query from v$session connecting to each servers we hardly found total number of sessions more than 225 on each server.
    If anybody has any idea why so many processes are spawned and how to control them please mail me the solution. Or if u require some more information about the system and oracle parameters please let me know. My email_id is
    [email protected]
    Thanks
    SHAKEEL AHMAD

    You compare v$process with v$session.
    If you have any defunc process, they wont appear in the v$session. But, they resides in the v$process. You need to kill them from the os prompt.
    SELECT spid
    FROM v$process
    WHERE NOT EXISTS ( SELECT 1
    FROM v$session
    WHERE paddr = addr)
    This query gives the osid of all the defunc process and kill them using kill -9 on os.
    Are your connection coming from jdbc? Also, you can make use of DCD Dead Connection Detector.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:8284822833477458404::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1784142376742
    Jaffar
    Message was edited by:
    The Human Fly

  • Passing paramater from process flow to unix script in owb

    Hi,
    I need help in calling a function the return value must be passed as a paramater to user defined activity operator in owb which would in turn run a unix script on the server which would use the paramater passed.
    Thanks,
    Ashvin.

    hi let me give you some more infor about my proble.
    i have a unix script named caproc. The script would be passed a paramater. the script would be called from simple owb process flow and i need to pass the paramater to it.
    i have tested running other unix scripts and the are running fine.
    as you said to create a variable 'x' i did that and under paramater_list of the user activity operator under binding i selected the variable 'X'
    the process flow was valiadated fine and deployed but when i run it it gives me this error.
    COPY_OF_UX_SCP_CALL
    Error
    RPE-01003: An infrastructure condition prevented the request from completing.
    COPY_OF_UX_SCP_CALL
    Error
    RPE-01038: Failed to evaluate expression declare "$LOOP_DETECT$" NUMBER := 0;function "COPY_OF_UX_SCP_CALL" return VARCHAR2 is "WARNING" NUMBER := 2;"RETURN_RESULT_NUMBER" NUMBER := NULL;"NUMBER_OF_ERRORS" NUMBER := 0;"SUCCESS" NUMBER := 1;"ITEM_TYPE" VARCHAR2(4000) := (owbsys.wb_rt_task_variable.get_value(305587));"ERROR" NUMBER := 3;"EVAL_LOCATION" VARCHAR2(4000) := (owbsys.wb_rt_task_variable.get_value(305590));"OK" NUMBER := 1;"FAILURE" NUMBER := 3;"AUDIT_ID" NUMBER := 305586;"RETURN_CODE" NUMBER := NULL;"NUMBER_OF_WARNINGS" NUMBER := 0;"ITEM_KEY" VARCHAR2(4000) := (owbsys.wb_rt_task_variable.get_value(305589));"RETURN_RESULT" VARCHAR(64) := NULL;"PARENT_AUDIT_ID" NUMBER := NULL;"OK_WITH_WARNINGS" NUMBER := 2;begin "$LOOP_DETECT$" := "$LOOP_DETECT$" + 1;if "$LOOP_DETECT$" > 2 then raise_application_error(-20001, 'Loop detected calling "COPY_OF_UX_SCP_CALL"');end if;return to_char(?'acac');end;begin :result := "COPY_OF_UX_SCP_CALL";end;. Please modify the expression, redeploy and retry again.
    COPY_OF_UX_SCP_CALL
    Error
    Missing IN or OUT parameter at index:: 2
    i am pasting the xml script owb generates which might help someone to point me the problem
    <?xml version = '1.0'?>
    <!DOCTYPE Package SYSTEM "jar:file:/C:/product/11.1.0/db_1/owb/lib/int/rtpcommon.jar!/Package_dtd.txt">
    <Package Id="SPT_TRY" Name="SPT_TRY">
    <PackageHeader>
    <XPDLVersion/>
    <Vendor/>
    <Created/>
    <Description></Description>
    </PackageHeader>
    <TypeDeclarations/>
    <Applications>
    <Application Id="A805FAF687910739AE04011AC69063028" Name="UX_SCRIPT">
    <FormalParameters>
    <FormalParameter Id="EXIT_CODE" Mode="OUT">
    <DataType>
    <DeclaredType Id="EXIT_STATUS"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:COMMAND">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:PARAMETER_LIST">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:SUCCESS_THRESHOLD">
    <DataType>
    <BasicType Type="INTEGER"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:SCRIPT">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:RESULT_CODE" Mode="OUT">
    <DataType>
    <BasicType Type="INTEGER"/>
    </DataType>
    </FormalParameter>
    </FormalParameters>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:Function" Value="SHELL"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:TaskName"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Application>
    <Application Id="A81117E4A8F6699DAE04011AC680650B6" Name="UX_SCRIPT">
    <FormalParameters>
    <FormalParameter Id="EXIT_CODE" Mode="OUT">
    <DataType>
    <DeclaredType Id="EXIT_STATUS"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:COMMAND">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:PARAMETER_LIST">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:SUCCESS_THRESHOLD">
    <DataType>
    <BasicType Type="INTEGER"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:SCRIPT">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    </FormalParameter>
    <FormalParameter Id="CFG:RESULT_CODE" Mode="OUT">
    <DataType>
    <BasicType Type="INTEGER"/>
    </DataType>
    </FormalParameter>
    </FormalParameters>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:Function" Value="SHELL"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:TaskName"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Application>
    </Applications>
    <WorkflowProcesses>
    <WorkflowProcess Id="UX_SCP_CALL" Name="UX_SCP_CALL">
    <ProcessHeader>
    <Description></Description>
    </ProcessHeader>
    <FormalParameters>
    <FormalParameter Id="EXIT_CODE" Mode="OUT">
    <DataType>
    <DeclaredType Id="EXIT_STATUS"/>
    </DataType>
    </FormalParameter>
    </FormalParameters>
    <DataFields/>
    <Activities>
    <Activity Id="UX_SCRIPT" Name="UX_SCRIPT">
    <Description></Description>
    <Implementation>
    <Tool Id="A805FAF687910739AE04011AC69063028" Type="APPLICATION">
    <ActualParameters>
    <ActualParameter/>
    <ActualParameter>"/bin/bash"</ActualParameter>
    <ActualParameter/>
    <ActualParameter>"0"</ActualParameter>
    <ActualParameter/>
    <ActualParameter/>
    </ActualParameters>
    <Description></Description>
    </Tool>
    </Implementation>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Split Type="XOR"/>
    </TransitionRestriction>
    </TransitionRestrictions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="805FAF687910739AE04011AC69063028"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:TaskName" Value="&quot;UX_SCP_CALL:UX_SCRIPT&quot;"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID" Value="&quot;{0}&quot;"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="262.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-219.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    <Activity Id="END_SUCCESS" Name="END_SUCCESS">
    <Description></Description>
    <Implementation>
    <Tool Id="END" Type="APPLICATION">
    <ActualParameters>
    <ActualParameter>OK</ActualParameter>
    </ActualParameters>
    <Description></Description>
    </Tool>
    </Implementation>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="805FAF68790F739AE04011AC69063028"/>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="450.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-40.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    <Activity Id="START1" Name="START1">
    <Description></Description>
    <Implementation>
    <Tool Id="START" Type="APPLICATION">
    <Description></Description>
    </Tool>
    </Implementation>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Split Type="XOR"/>
    </TransitionRestriction>
    </TransitionRestrictions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="805FAF68790E739AE04011AC69063028"/>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="-321.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-211.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    </Activities>
    <Transitions>
    <Transition Id="TRANSITION_1" From="UX_SCRIPT" To="END_SUCCESS">
    <Condition Type="OTHERWISE"/>
    </Transition>
    <Transition Id="TRANSITION" From="START1" To="UX_SCRIPT"/>
    </Transitions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="805FAF687909739AE04011AC69063028"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:RootUOID" Value="&quot;805FAF687909739AE04011AC69063028&quot;"/>
    <ExtendedAttribute Name="OWB:TaskName" Value="&quot;UX_SCP_CALL&quot;"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID" Value="&quot;{0}&quot;"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </WorkflowProcess>
    <WorkflowProcess Id="COPY_OF_UX_SCP_CALL" Name="COPY_OF_UX_SCP_CALL">
    <ProcessHeader>
    <Description></Description>
    </ProcessHeader>
    <FormalParameters>
    <FormalParameter Id="EXIT_CODE" Mode="OUT">
    <DataType>
    <DeclaredType Id="EXIT_STATUS"/>
    </DataType>
    </FormalParameter>
    </FormalParameters>
    <DataFields>
    <DataField Id="X">
    <DataType>
    <BasicType Type="STRING"/>
    </DataType>
    <InitialValue>`?'acac'`</InitialValue>
    </DataField>
    </DataFields>
    <Activities>
    <Activity Id="END_SUCCESS" Name="END_SUCCESS">
    <Description></Description>
    <Implementation>
    <Tool Id="END" Type="APPLICATION">
    <ActualParameters>
    <ActualParameter>OK</ActualParameter>
    </ActualParameters>
    <Description></Description>
    </Tool>
    </Implementation>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="81117E4A8F6999DAE04011AC680650B6"/>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="450.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-40.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    <Activity Id="UX_SCRIPT" Name="UX_SCRIPT">
    <Description></Description>
    <Implementation>
    <Tool Id="A81117E4A8F6699DAE04011AC680650B6" Type="APPLICATION">
    <ActualParameters>
    <ActualParameter/>
    <ActualParameter>"/bin/bash"</ActualParameter>
    <ActualParameter>X</ActualParameter>
    <ActualParameter>"0"</ActualParameter>
    <ActualParameter/>
    <ActualParameter/>
    </ActualParameters>
    <Description></Description>
    </Tool>
    </Implementation>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Split Type="XOR"/>
    </TransitionRestriction>
    </TransitionRestrictions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="81117E4A8F6699DAE04011AC680650B6"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:TaskName" Value="&quot;COPY_OF_UX_SCP_CALL:UX_SCRIPT&quot;"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID" Value="&quot;{0}&quot;"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="262.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-219.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    <Activity Id="START1" Name="START1">
    <Description></Description>
    <Implementation>
    <Tool Id="START" Type="APPLICATION">
    <Description></Description>
    </Tool>
    </Implementation>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Split Type="XOR"/>
    </TransitionRestriction>
    </TransitionRestrictions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="81117E4A8F6499DAE04011AC680650B6"/>
    <ExtendedAttribute Name="OWB:Position">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:XPos" Value="-321.0"/>
    <ExtendedAttribute Name="OWB:YPos" Value="-211.0"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </Activity>
    </Activities>
    <Transitions>
    <Transition Id="TRANSITION_1" From="UX_SCRIPT" To="END_SUCCESS">
    <Condition Type="OTHERWISE"/>
    </Transition>
    <Transition Id="TRANSITION" From="START1" To="UX_SCRIPT"/>
    </Transitions>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="81117E4A8F6199DAE04011AC680650B6"/>
    <ExtendedAttribute Name="OWB:ExtendedAttributes" Value="TASK_ID">
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:RootUOID" Value="&quot;81117E4A8F6199DAE04011AC680650B6&quot;"/>
    <ExtendedAttribute Name="OWB:TaskName" Value="&quot;COPY_OF_UX_SCP_CALL&quot;"/>
    <ExtendedAttribute Name="OWB:ExecStoreUOID" Value="&quot;{0}&quot;"/>
    </ExtendedAttributes>
    </ExtendedAttribute>
    </ExtendedAttributes>
    </WorkflowProcess>
    </WorkflowProcesses>
    <ExtendedAttributes>
    <ExtendedAttribute Name="OWB:UOID" Value="805FAF687904739AE04011AC69063028"/>
    </ExtendedAttributes>
    </Package>

  • Processes/Install Path Unix

    Hi,
    I need to find a list of processes that run when Oracle is running on a Unix box. I also need to track down the default install path (or, alternatively, find where the install path might be stored on a system). Does anyone have this information or know where I can view it?
    --Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    There is no default install path on UNIX since there is no standard naming convention for mount points on a UNIX system. Typically, the UNIX processes you will see if an instance is running (using ps -ef | grep ora) are:
    ora_pmon_sid
    ora_smon_sid
    ora_lgwr_sid
    ora_dbwr_sid - or may see multiple writers like ora_dbwr#_sid
    ora_ckpt_sid
    ora_reco_sid
    ora_arch_sid - if database is running in archive log mode
    where sid is the SID of the running instance
    if the listener is running then using
    ps -ef |grep lsnr
    you should see something like
    /home/oracle/product/9.0.1/bin/tnslsnr LISTENER -inheritThe part in bold is the ORACLE_HOME directory. All of Oracle's files are installed in this directory. There may be some additional "helper" stuff installed in grandparent directory (cd ../..).
    If there is nothing currently running, you can try logging into UNIX as the Oracle owner account (typically oracle) or as a member of the database administration group (typically dba) then issue
    echo $ORACLE_HOME
    to find where Oracle is installed. There may also be a file /etc/oratab or /var/opt/oratab depending on your flavour that will list the SID's and the ORACLE_HOME for each. Be aware that this file is not maintained by Oracle, so it may not be correct, or even present.
    HTH
    John

  • Sqlplus process count in Unix

    I need to process 50 sqlplus scripts. At any point of time, the number of scripts running shouldn't exceed 6. If any one of the scripts completes successfully then another one needs to kick off, till all scripts are processed.
    How do I do this?
    I tried these, but it didn't work:
    if [[ `ps -ef|grep "sqlplus -s scott"|grep -v "grep"|wc -l` -eq 6 ]] ; then
    wait
    fi

    "Wait" waits for the job completion while "sleep" is basically a pause.
    I guess there needs to be 2 loops. One looping through the sql list and another one checking the number sql sessions opened at any time.
    Say, the first loop kicks off the first 6 sqls. Now the sqls read and running are the same : 6. After some time, 2 sqls get done. Now the sqls read is 6 but the sqls running is 4. So the first loop should read the next two sqls, 7 & 8, and execute them.
    This is what I need to do.

  • EP 60 install process correct? UNIX Oracle

    I have followed SAPINST by installing oracle DB and successfully installing oracle.
    At this point I can install portal or portal, CM collaboration....
    I have selected to install all three so there should not be an issue correct?
    And how long should this take?
    Also during the install, there should be no reason to start the dispatcher or server correct? is it safe to assume that SAPINST handles the starting and stopping of the j2eeadm, correct?
    Thanks
    John Ryan
    SO

    Hello John,
    Yes you can install all three of them at the same time but I usually don't. That is because if one part fails, let's say the last, you will have to restart all over again. Try installing Portal, then KM + Coll.
    For the time it takes, it depends mostly on your hardware. Anyway, we are not talking minutes but hours. The less I saw was a little more than an hour but the longest was ranging between 4 and 6 hours on a very old Unix box.
    SAPInst will start and stop the Dispatcher and Server itself. There is no need for you to do that unless a big problem occur.
    Marc.

  • Top resource intensive processes on AIX/Unix/Linux

    top is good to find this out, topas on aix, any other tips to find out memory/IO resource intensive processes, here i have for cpu....
    oracle:tulpfsd01$ ps -e -o pcpu -o pid -o user -o args | sort -k 1 | tail -5r
    %CPU PID USER COMMAND
    1.1 1230914 oracle oraclepwpd (LOCAL=NO)
    0.9 1248744 oracle oraclepwpd (LOCAL=NO)
    0.9 1099146 oracle oraclepwpd (LOCAL=NO)
    0.6 503688 oracle oraclepwpd (LOCAL=NO)
    0.5 1239486 oracle oraclepwpd (LOCAL=NO)

    Generally, memory shouldn't be a concern. The total amount of SGA is set (fixed) with SGA_MAX_SIZE and occupies shared memory (to be seen with 'ipcs')
    The PGA is set by PGA_AGGREGATE_TARGET, but is only a rough pointer for oracle. Additional information about memory is seeable with pmap (alt least on linux and solaris)
    You'll see the loaded shared libraries (which are used by the process in a shared matter, so not any process which uses libraries copy their own versions, and you should be able to identify the shared memory (identified with shmid=0xsomething) etc. On linux /proc/<pid>/maps shows the same in a little different way.
    Now we've established that the shared libraries are used shared to preserve memory, and the shared memory is used shared (quite obviously), and 'put' into the process' address space, you should understand why listing VSS (virtual set size) and other memory stuff isn't very helpful: if you just add all listed used memory, there are much components which are not really used by that process.
    Top and topas are helpful for finding CPU intensive processes. That is what both are designed for, to be able to identify the processes which are using the most slices of processor time. Of course, it's only helpful if you truly want to identify top CPU intensive processes. This is also quite easy to find inside the database.
    IO: there's no way to identify processes which are the most intensive writers. Simple because linux doesn't keep statistics about it. Inside the database, it's easy to find (guess you should need an example of that?) please mind you should be aware how the database works: a user process does no writing, it's the logwriter, checkpointer and database writer who does that. The user process only reads.
    I will see if I can find some nmon examples tomorrow, when I've got access to AIX systems.
    If you still want examples, could you be specific?

  • Preference process stops on Unix

    Folks,
    We are running Discoverer (from 9iAS R2) on Solaris
    5.8
    We have been experiencing this for sometime.
    We start all the components of discoverer and everything is fine.
    Then after some time the preference process running on Oracle side, just dies (or stops)
    So all are preference are no longer valid.
    Have to again start the preferences etc.
    Have log a tar.
    Oracle Support said this might be a bug.
    Has anybody seen the same behavior.
    Thanks
    Ashish

    Hi!
    I have the same problem. Since you posted this problem long ago... did you solve this problem?
    I have
    Oracle Application Server Discoverer 10g (9.0.4.00.00)
    Oracle Application Server Discoverer Plus 10g (9.0.4.45.07)
    on linux.
    And the preference server cannot be started, it is always down. So the users have always default preferences
    I noticed this problem recently, although before it worked OK.
    Any suggestion?
    Tnx
    G.

  • Processes in UNIX

    Hi guys.
    I'm trying to execute a process in Compaq UNIX Tru64, but I can't do it!
    The code I use is the following:
    import java.io.*;
    public class RunProcess {
    public RunProcess(String[] args) {
    if (args.length == 0) {
    System.out.println("You missed command");
    System.exit(0);
    try {
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec(args);
    int i = Integer.MIN_VALUE;
    while ((i = p.waitFor()) != 0) {
    System.out.println("waiting...");
    System.out.println("Finish" + p.exitValue());
    catch (Exception ex) {
    ex.printStackTrace();
    public static void main(String[] args) {
    new RunProcess(args);
    If I run this code in Windows, for instance using:
    java RunProcess WinWord MyDocument.doc
    I've no problem: the MS-Word document appears on my screen and the Java program loop within while until I close the MS-Word document. After that the Java program prints "Finish" and the session in stopped.
    If I trying to execute another program (not java!!!!!!) on a UNIX PC using the same RunProcess class, the Java program always loop within while (it continuously prints "waiting...") and it never stops.
    Anyone of you could explain such different behaviour from Windows to UNIX?
    Thanx.

    You should NOT loop in waitFor! It is sufficient to call it only once!
    public abstract int waitFor() throws InterruptedException
    Waits for the subprocess to complete. This method returns immediately if the subprocess has already terminated. If the subprocess has not yet terminated, the calling thread will be blocked until the subprocess exits.

Maybe you are looking for

  • Bluetooth troublesho​oting for toshiba satellite L305D-S589​2

    i can not get my laptop to sync up with my new cell phone (nokia 7510). i could get it to sync up with my past cell phones with no problem. it is not the cell phone, because i can sync it with my husbands phone. i have tried to install drivers from t

  • I Can No Longer See Files On My External Hardrive

    I'm trying to import some files from my external HD into FCP and here's what's happening: I shot some video on HDV and had to import it onto an old iMac via iMovie HD. I saved those files and the iMovie docs onto an external HD (using 314GB on a 1TB

  • How to unlock my ipod as it is disabled

    how do i unlock my ipod as it is disabled

  • Reg: Find Current stored procedure status in oracle database

    Hi Gurus, How to find the stored procedure status in the current oracle database (ie) whether it is running or not. Is there any view or dbms package to find the status of the stored procedure. And i also want to find the last execution time of the s

  • Unable to refresh cache in SAP PI NW 7.3.1

    Hi All, I am unable to perform full & delta cache refresh. CR content is not updated(it's below 9.5) -- Does this has anything to stop cache refresh? I see SAP_XI_ID_SERV_USER role missing - does this has anything to do with cache refresh? what autho