Java code running as background process in Linux causes high CPU util.

I'm running a piece of java code as a background process in Redhat 7.1 . When I specify to run it as a background process (using the '&') at the command line, I get CPU utilization at around 5% and it dips.
When I edit the script that runs the java code to specify running it as a background process withint the script itself (java ..... &) and then go to the command line and run the script, the CPU utilization shoots up to 95% and stays at the low 90's - very high 80's range for the CPU utilization..
I'm hoping someone has any idea for this behavior and a way to fix it.
Thanks in advance,
Sarat..

This is an interesting post and i'm sory i don't have time to
experament before i answer
you could of course run the script as background
*.sh &
but that's probubly not what you want
I think the solution lies in giving the
proccess a job number %n
then setting it %n &
it might even work to
put something like %java &
Anyway when it's running fullout
it is because it is in the
current terminal process group PID.
wish i could help more

Similar Messages

  • Photoshop CS6 still running in Background Processes, won't close

    Lately, I've been having a problem with Photoshop CS6 where, even after I close the program, Photoshop.exe is still running under Background Processes in the task manager. Hitting "end task" on the program doesn't do anything. It takes up quite a big portion of my processing power, and it usually closes on its own if I just wait a good 5-10 minutes. Even weirder, while this "Ghost Photoshop" is running in the background, I can launch a new version of Photoshop, that will run at the same time without any trouble (aside from the expected slowness when a chunk of my processing power is being eaten up by whatever Ghost Photoshop is doing). I'm running Photoshop CS6 on Windows 8, with just one extension installed-- Coolorus 2.0.

    They were using the little red "x", file > quit allowed her to reopen the program etc. I find it weird that it wont close with the "x" but if I right click the icon on the task bar, it wont allow me to reopen or do anything with it so I was under the assumption it was stuck open.

  • How do I run a background process which is under WLE control

    Hello folks:
    How can I run a background process that runs under WLE's control.
    What I am looking for is a way to have a process that runs in an
    infinite loop and polls the database to see if there is any background
    work that needs to be done. But I still want the process to be managed
    by WLE for fault tolerance.
    Thanks,
    Ram Ramesh
    [email protected]

    The easiest way to do this is to write a Tuxedo server (i.e., using only
    ATMI and no CORBA stuff) that does the following:
    1.) In tpsvrinit(), the last thing that it should do is a tpacall to the
    service contained in this server (and nowhere else) with the TPNOREPLY
    flag.
    2.) In the method that implements the service, do your database work, sleep
    for a little while, do another tpacall to itself with the TPNOREPLY flag,
    and return.
    Hope this helps,
    Robert
    Ram Ramesh wrote:
    Hello folks:
    How can I run a background process that runs under WLE's control.
    What I am looking for is a way to have a process that runs in an
    infinite loop and polls the database to see if there is any background
    work that needs to be done. But I still want the process to be managed
    by WLE for fault tolerance.
    Thanks,
    Ram Ramesh
    [email protected]

  • Shutting off java after faulty java code runs in WinXP

    I would like to know how to shut java off after a webpage with faulty java code is loaded. Ever since the version of Java that introduced "jsched" into the mix, I've had problems with Java on every computer and every install of windows I've had and worked with. If a webpage has faulty code in it, instead of crashing Firefox/Mozilla like the older versions did (in which I could simply reload the browser after it crashes), it makes Firefox inoperable (disabling most of the menu items and making the mouse scroller not work), and continues to run even after Firefox is no longer running. To make matters worse, Java was programmed in such a way that makes it a process that cannot be seen in the task manager. Java's ability to hide its running process quite frankly makes me nervous.
    I'm thankful that the latest version fixed a lot of bugs--the version before this would give me a blue screen of death every time I tried to access the control panel.
    I would like to know how to turn off java once it's running. The only documentation I have been able to find was in relation to a shell in Linux which uses commands that don't work in Windows.

    How do I shut off Java once it is loaded when I'm on a page that doens't have any errors? If I go to a page that requires java, and Java gets loaded, it doesn't automatically quit when I go to another page. Why does Java need to continue running when it's no longer being used? Why should I have to quit and reload Firefox in order to quit Java?
    It would be nice if there was something in Java to shut itself off when it encounters an error instead of requiring a windows restart in order to quit Java since it isn't a separate process, and also something that shuts off Java when there is no longer a webpage in memory that requires Java.

  • Java pragram running in Background ?????

    hi ,
    Can i write a java program which runs in the Background ... What i mean to say is
    Eg: Process.java
    I compile it and execute it say java Process .
    But now what happens is the program runs but it occupies one of the Unix shell .And once i close this shell the Process is stopped .
    Is there any way by which the process.class runs in background ?? and i use that unix shell to compile another program with the above Program running in background ..
    I hope iam clear with the Question
    Please help me out ..
    thanks in Advance,

    use javaw command in running java program in background. This command is specially for windows platform.

  • When MRP run through background process in MDBT open PR and PO not comming?

    Hi,
    When MRP run through backgroung process in MDBT open PR and PO not coming in MDBT result.
    Pls advise accordingaly.
    Regards
    rk

    Ram,
    Either I am totally misunderstanding your statements, or your business people are misinformed.  
    The output of MD01 (MRP total run in foreground) and the output of MDBT (MRP total Run in Background) ARE IDENTICAL, provided you have selected the same parameters.  
    Neither output contains a discrete listing of open Purchase orders and Purchase requisitions.
    Standard output of both MD01 and MDBT are:
    1.  List of materials processed, with exception messages
    2.  Statistics
    In addition, both of these programs also write MRP records to the MRP databases, provided that the "Display Material List" parameter is set.  In this case, both of these programs will produce data that can be further reviewed and managed in MD05 and MD06. MD06 is the tool that most planners use to process the MRP database info.
    If you wish to see a listing of the entire MRP results (either MD01 or MDBT), then execute transaction MDLD.  This will produce either a spoolfile or a printed document.
    For the PO or PR listings, review my earlier suggestions.
    Rgds,
    DB49

  • How to Debug a ABAP code running the background in Portal

    How can I debug a ABAP code running in the background while executing a transaction code through portal.
    e.g Presently I have to incorporate some checks in the portal. For that I know the function module where i need to put though checks. Now I want to know, how does the code during runtime. What values do we get in the function module. For this I need to get into the debugging mode while executing the portal.
    So how can we do that???

    Namit,
    it doesnot matter whether it is a standard funtion module or a custom one .check whether you are debugging for proper user(portal user and backend user are same) and check debugging is activated

  • How to run a background process in a J2EE App ?

    Hi guys,
    Here is the requirement which totally stumped me.
    " The web app should have a feature like a background process or something like cron jobs.. which keeps on running in the background and at a particular time each day calls a method". User intervention is not an option.
    Now had this been a stand alone app .. I could have done this using Threads.. but i cant possibly use threads in a J2EE app. Any pointers.. how I can go about realizing this
    Thanks for your replies.
    Cheers!

    You could take the approach that SoulTech mentioned and spawn a new thread from the Servlet's init method. To have the servlet invoke this method with no intervention, you would need to set the following parameter in your servlet definition in your web.xml:
    <servlet>
      <servlet-name>MyStartupServlet</servlet-name>
      <servlet-class>com.my.company.MyStartupServlet</servlet-class>
      *<load-on-startup>1</load-on-startup>*
    </servlet>When you deploy your application, the servlet will be loaded, and its init method will be called.
    If your application is running in a servlet container, I believe you are allowed (by the specification) to spawn your own threads, but you should do so carefully. Since you're writing a scheduler and not some kind of worker threads that are messing with your database, I think you should be okay. Still, just to keep it clean you should add any clean-up logic you may need to your servlet's destroy method. I know that in an EJB container, spawning your own threads can definitely be a problem and the container makes no guarantees that they will function correctly. The J2SE Timer class could be used if you're not using EJB, but the Timer class doesn't have support for J2EE - that's at least part of what led to the introduction of the timer beans in J2EE 1.4. If you're already using EJB, especially EJB 3.0, then the timer service provides a convenient built-in mechanism to do exactly what you want.
    There are always multiple ways to solve any problem...
    Edited by: proflux on May 15, 2008 1:04 PM

  • Java program runs differently on Windows and Linux

    Hi!
    I would like to run a java application (which is written and run on windows platform) on linux platform. I don't know wether it is possible or not, but I tired on the following way:
    I have made a small java application. It worked correctly on windows (I developed it on windows). I copied first only the class file (Start.class) to the linux machine (which has exactly the same JDK as windows machine). When I type the command:
    java Startit gives me the folloving error:
    Exception in thread "main" java.lang.ClassFormatError: Start (unrecognized class file version)
       at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
       at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
       at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
       at java.net.URLClassLoader.findClass(libgcj.so.7rh)
       at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)After that I was trying to compile the source file on linux with the command:
    javac Start.javabut the compiler gave me an error in the source file.
    Is there any way to run the formerly written java application (on windows) on linux machine?
    Thanks

    When I type the command java-version I get the following:
    java version "1.4.2"
    gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-46)
    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.The JDK on linux and windows is the latest (I was download it today).
    How can I upgrade the jdk/jre on linux?
    Here is the compiler error:
    [root@Linux-oracle app]# javac DataMining.java
    1. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
            ^^^^^^^^^
    The type ArrayList is not generic; it cannot be parameterized with arguments <String>
    2. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                      ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    3. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                                         ^^^^^^^^^
    The type ArrayList is not generic; it cannot be parameterized with arguments <String>
    4. ERROR in DataMining.java (at line 77)
            ArrayList<String> temp = new ArrayList<String>();
                                                   ^^^^^^
    Syntax error, parameterized types are only available if source level is 5.0
    5. WARNING in DataMining.java (at line 240)
            String youtube[][] = new String[20][5];
                   ^^^^^^^
    The local variable youtube is never read
    6. WARNING in DataMining.java (at line 267)
            int e;
                ^
    The local variable e is never read
    7. ERROR in DataMining.java (at line 329)
            for(int i=1;i<Video+1;i++)
                          ^^^^^^^
    The operator + is undefined for the argument type(s) Integer, int
    7 problems (5 errors, 2 warnings)

  • ATP Re-Run in background processing for sales order

    Hello All,
    In sales order i need to re run the ATP check for the quantity confirmation in background processing.
    Scenario is :
    I have created orders with order quantity 100.
    while creating the order stock for the same material was only 20 so ultimately it will not confirmed the quantity.
    After the some period i m increasing stock of same material by 120. Now, same order which i created before can be confirmed as i need only 100 quantity in that. but for the same I need to manually run the ATP again and then it will confirm the quantity.
    instead of manually re run the ATP again i want to do this activity in background processing so that it will automatically confirmed the stock once inventory increased.
    Is there any provision in sap to avoid this manual task with the help of background processing or any program?
    Thanks and Regards,
    Rasik

    Hi,
    This can be achieved by rescheduling the orders .
    << Moderator message - Cut and paste response from http://help.sap.com/saphelp_470/helpdata/en/93/744c0c546011d1a7020000e829fd11/content.htm removed and points unassigned. Plagiarism is not allowed in SCN >>
    You reach the Sales screen.
    Select Environment ® Backorders ® Rescheduling ® Execute.
    You can  also simulate the backorders for rescheduling before confirming by selecting the simulateevaluate option.
    Prerequisite for rescheduling the line items of the order is that at schedule line you should not flag the  field fixed date and quantity field. Also for ATP you must have defined the scope of check with checking rule BO(i guess) for that particular plant in combination of checking group .
    Hope this will help you.
    Thanks and Regards,
    Atulkumar Dagade
    Edited by: Rob Burbank on Jan 24, 2012 10:16 AM

  • Process SERVER0 its taking High CPU Time in XI

    Hi,
    We installed XI 3.0 develpoment server ,Process <b>SERVER0</b> its taking more CPU time.
    We are using AS/400 OS & DB2 datbase.Can any one tell me the reason & Solution for this.
    Thanks & Regards,
    Gopinath.

    hi,
    Actually the user XIRWBUSER its an RFC user but its running on many dialog process.I think high CPU time due to this user only.
    using 5 work processes and 3/4 of the available CPU for an extended amount of time.
    Total Total DB
    Job or CPU Sync Async CPU
    Task User Number Thread Pty Util I/O I/O Util
    WP11 D6464 485368 00000010 20 54.0 25 37 27.8
    WP05 X4242 498642 00000098 20 49.6 5 0 36.7
    WP04 X4242 498641 00000014 20 48.8 1 0 39.1
    WP02 X4242 498639 0000025A 20 47.1 2 0 37.8
    WP06 X4242 498643 000001E6 20 43.7 0 0 38.3
    WP00 X4242 498637 00000014 20 11.1 502 194 2.9
    pls can any one help me
    Regards,
    Gopinath.

  • Process Snmp (PDU Dispatcher) causes High CPU value

    Hello,
    I have a Catalyst Switch 6000. Inoticed that after the execution of the job inventory in LMS, and after the snmp queries reached the equipement, the cpu value reached 98-99 % due to the process : PDU DISPATCHER (what’s it ?)
    I have also a script running in the switch to observe the differents logs. For exemple, when high cpu is obtained, the message bellow appear :
    « %SNMP-3-INPUT_QFULL_ERR: Packet dropped due to input
    « %SNMP-3-INPUT_QFULL_ERR: Packet dropped due to input
    « %SNMP-3-INPUT_QFULL_ERR: Packet dropped due to input
    Could you give me any idea or help ?
    Thanks in advance.

    This msg is normally generated when to many snmp request overrun the buffer allocated for such requests. There are a number of things that can cause this as well as a number of known issues that can be worked around using snmp views. Without reviewing show logging and other information available in a show tech, hard to say what the best method to resolve this. Should probably open a TAC SR to troubleshoot the issue further...
    Sent from Cisco Technical Support iPad App

  • VI causes high CPU load after several days of running

    Hello,
    I have a strange problem. I have craeted a test bench control VI and it runs on five PCs, controling five test benches. All PCs have almost the same hardware, same motherboard, same CPU, etc.
    Normaly the CPU load is around 50% when I run the VI, but at one PC the CPU load climbs up to 85% after several days (maybe one week) of continuous running and the PC is almost tied up - the VI execution becomes very slow (10 times slower) and the mouse only moves very slowly.
    First I thought that the PC has a problem but the problem dissapears as soon as I stop and restart the VI!
    I don't even have to terminate LabVIEW - only my VI and then everything is okay again.
    The problem does not seem to occur at the other four PCs, but I can not tell for sure.
    The task manager says only LabVIEW causes the CPU load - swap file utilisation is little.
    Is there a way to analyze what causes the high CPU load?
    I Use LabVIEW 7.1 professional
    Operating System: Win XP (SP 2 or 3 I don't remember)
    P.S. I have no loops without wait-functions.
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Solved!
    Go to Solution.

    Do all PCs have the same amount of RAM?
    What is the memory use over time as seen by the windows taks manager. Does it increase gradually?
    An increase in resource usage if often cause by sloppy programming.
    Do you grow arrays forever or constantly resize arrays in memory? (built array, insert into array, delete from array)
    Do you often create new references and never close them?
    What does the program actually do? In my opinion, a constant 50% CPU load seems too high for my taste. It means it would not even be able to keep up on slightly older hardware.
    LabVIEW Champion . Do more with less code and in less time .

  • Can Web dynpro Java application run as background application

    Hi Experts,
    Is it possible to execute the Web dynpro java application in background without opening the application in a web browser.
    We just want the WD java application deployed on the SAP Web AS server to be invoked and get executed as a background application by some external web application. It should not get open at any point of time in a web browser.
    Can anyone suggest if it is possible?
    Thanks & Regards,
    Anurag

    Hi Anurag,
    Since Web Dynpro is "SAPu2019s standard UI technology based on MVC for developing user interfaces" (see http://www.sdn.sap.com/irj/sdn/nw-wdjava) it is by design not possible to run 'in the background'.
    There are other possibilities to develop server processes per your requirements, such as developing web services or servlet development.
    Web services are the de facto standard for executing business logic on a remote server. However, as I understand your external web application is not capable of sending web service requests, have you tried the servlet approach?
    See http://help.sap.com/saphelp_nwce711core/helpdata/en/3f/f8bc3d8af79633e10000000a11405a/frameset.htm for more info on how to develop a servlet using NWDS.
    Take particular attention to the sub-topic 'Servicing Client Requests' of the above guide
    Hope this helps!
    Best regards,
    Robin van het Hof

  • Running a background process

    Hi,
    I have a retail website, and I am tweaking the final
    processing page to make it run faster. Right now, our customers
    wait up to 10 seconds after they hit the confirm button before they
    see the 'transaction complete' page.
    My idea is to take out some of the less important processing
    and run them after the 'transaction complete' page is displayed to
    customers.
    I am on a shared CF7 hosting with cfschedule disabled. Is
    there an alternative way to tell CF to run a script in the
    background?
    Thanks,
    Min

    One of the things I like about jQuery (I know this library
    the best but imagine others work in a similar fashion) is that when
    you submit a form via a jQuery function, jQuery uses the action
    attribute of the form tag to determine where it submits *unless* a
    submit to url is provided in the options object passed into the
    ajaxForm function.
    I haven't tried it before but you should be able to set the
    form action attribute to one url, which would be used if JS is off,
    and set another action url in options object that gets passed into
    the ajax form function
    Here's a sample of setting up an HTML form to submit via
    jQuery (the HTML form would use an alternate action page).
    $(document).ready
    function()
    var options = {
    target: '#formOutput', // target element(s) to be updated
    with server response
    beforeSubmit: showFormRequest, // pre-submit callback
    success: showFormResponse, // post-submit callback
    resetForm: true,
    // other available options:
    url: 'htp://domain.com/blah/blah/blah.cfm', // override for
    form's 'action' attribute
    type: 'post', // 'get' or 'post', override for form's
    'method' attribute
    dataType: 'json' // 'xml', 'script', or 'json' (expected
    server response type)
    //clearForm: true // clear all form fields after successful
    submit
    //resetForm: true // reset the form after successful submit
    // $.ajax options can be used here too, for example:
    //timeout: 3000
    // bind form using 'ajaxForm'
    $('#myform').ajaxForm(options);
    Might not be worth the effort of fit into your requirements
    but wanted to put it out there for you. I have a jQuery-driven CMS
    I built for a client that I could pull some code samples out for
    you if that might help.
    Cheers,
    Craig

Maybe you are looking for

  • XL reporter is not running in Excel

    SAP B1 8.8 SQL Server 2005 Excel 2010 Hi  Experts, When I try to run XL Reporter, I get a message that says 'Security settings in Microsoft Excel prohibit XL Reporter from running'. I Any ideas? Thanks & Regards Subhradip D

  • Adding a dynamic selection to a logical database query

    Hello, I would like to add a dynamic selection to a SQ02 Infoset using logical database SDF. I need the report to show only documents created at certain dates. I've added a selection field "CR_DATE" for BKPF-CPUDT to the Infoset and added the followi

  • How to bulid a Tuxedo client in VS2010

    hello , I'm a noviciate for tuxedo. I just build the TOUPPER sample in simpapp , and I got the right output,like "Returned string is:ABCD". When I decide to bulid my own client in VS2010(), I add the LIB path of tuxedo in the linker->general->additio

  • Creative Zen Nano P

    Hello there! I have one mp3 player and I tried to connect him to my Panasonic compact audio system SA-DH30 with the "Line In" Cable but it isn't working. What can I do? ThX.

  • Is it really impossible to store a SMS that I have just begun?

    Is it really impossible to store a SMS that I have just begun?