How to auto-kill orphaned processes if there is still a live one?

Page 1 of 2 12 LastLast

  1. Posts : 5
    Windows 7 Professional 64 bit
       #1

    How to auto-kill orphaned processes if there is still a live one?


    I just started my first IT job last month for a company that makes/markets foodservice items (mostly bakeware/servingware), and we have a Lenovo M79 tower and a monitor set up just outside out CEO's office for the purpose of displaying the security cameras at our new warehouse. (very impressive....blah blah blah) We had to run the security camera IP addresses in firefox, but i can't remember exactly why.
    We were hoping to make this run self-sufficient without anyone having to babysit it. I used a small app called caffeine to keep the computer from ever going to sleep, the firefox add-on "ReloadEvery" to refresh the page every 5 minutes so the stream doesn’t freeze up, and "Wise Memory Optimizer" which is SUPPOSED to clean the memory if it drops below a certain level (5GB), but here’s the problem:

    Every time the page refreshes, it starts a new "jp2launcher" process for java. It doesn’t shut down the old ones, it just starts a new one. So the last time I checked in task manager, it had almost 80 "jp2launcher" processes sitting there doing nothing but taking up memory and just one that was actually running. I could barely get it to respond enough to restart it. I know I can shut them down one by one, but then i'm the babysitter stopping by several times a day to wipe it's butt. is there a program that could shut them down automatically as soon as they are orphaned even though there is one instance still running?

    This computer has literally been used by no one else for anything else, so i wouldn't suspect malware.

    Thanks in advance :)

    MrWoody
      My Computer


  2. Posts : 2,497
    Windows 7 Pro 64 bit
       #2

    You would do well avoiding "Wise Memory Optimizer" and all programs of it's kind. Windows 7 has very good memory management, does not need, and will not benefit from such programs. The only dubious benefit of these programs is to make the Task Manager numbers more attractive to people who do not understand what they mean.

    I actually tried this program, just to see what it did mind you, and was thoroughly unimpressed. For a program claiming to optimize memory it did everything wrong.

    At free this program is overpriced.
      My Computer


  3. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #3

    MrWoody said:
    Every time the page refreshes, it starts a new "jp2launcher" process for java. It doesn’t shut down the old ones, it just starts a new one. So the last time I checked in task manager, it had almost 80 "jp2launcher" processes sitting there doing nothing but taking up memory and just one that was actually running. I could barely get it to respond enough to restart it. I know I can shut them down one by one, but then i'm the babysitter stopping by several times a day to wipe it's butt. is there a program that could shut them down automatically as soon as they are orphaned even though there is one instance still running?
    You can try using the taskkill command to kill the orphaned tasks.
    Open a Command Prompt (CMD) and enter this command to read the help for taskkill:
    taskkill /?

    Here is a GUESS at a command that might be what you are looking for.
    Hopefully this would kill all jp2launcher processes that have a status not equal RUNNING:
    taskkill /IM jp2launcher /FI "STATUS ne RUNNING"

    If you get the command to do what you want, save the command as a BAT file.
    You could then set up a Scheduled Task to run the BAT file as often as you want.

    hth,
    David
      My Computer


  4. Posts : 10,485
    W7 Pro SP1 64bit
       #4

    I agree with LMiller7. Uninstall anything from WISE.

    You should not need any app just to prevent the computer from going to sleep. Just set the power settings as desired.

    DavidE has given a good solution to killing old jp2launcher processes, but you really should not have to do that. Reloading a website that uses Java should start a second instance of jp2launcher, but that second instance should exit when it sees the first instance is running.

    What version of Firefox are you using?
    What version of Java?
    Both will need attention to update...
    ...but if people won't be surfing elsewhere
    ...then maybe not updating is okay.

    Before you settled in on using Firefox, did you look into using VLC? You can show multiple cameras at once.
      My Computer


  5. Posts : 5
    Windows 7 Professional 64 bit
    Thread Starter
       #5

    ok, so point well taken on the wise deal. it's now deleted. So, being brand new to all this, i couldn't tell you what the reasoning was behind running it in firefox, but i do have the IP address, and i suppose i could try running it in something else. As far as the use of the caffeine program, the power settings for "never sleep" did not work. i would walk by several time a day and it would be asleep with the screen off and i would have to log back in. The caffeine app emulates the "F15" keystroke every 59 seconds to keep it awake and seems to work wonderfully. I did try the command line DavidE suggested, but it did not work. I restarted the computer earlier, and set the refresh to every 10s just to make them pile up to try the command and get a good screenshot. It should be attached.

    As far as Firefox, i am running v39.0
    Java: Version 8 update 51

    I'll keep working on this, thanks for the input and help to a noob
    Attached Thumbnails Attached Thumbnails How to auto-kill orphaned processes if there is still a live one?-camera-issues.jpg  
      My Computer


  6. Posts : 5
    Windows 7 Professional 64 bit
    Thread Starter
       #6

    OK, so i just decided to try killing all of them just for the fun of it. Again....i'm new to this, so bear with my ignorance.

    The attached screenshot shows where it killed them, but i tried refreshing and re-starting the task manager, and they are all still there.....thoughts?
    Attached Thumbnails Attached Thumbnails How to auto-kill orphaned processes if there is still a live one?-cam-iss-2.jpg  
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    Have you asked Salient Systems (Contact Us | Salient Systems) why this happens when refreshing the browser?

    Having 16 VLC windows might not look as nice, but they could be (automatically?*) arranged so that all of the screen's real estate is used.


    *I would script the opening, size and loation of each VLC window using AutoIt... which I might be able to help you with.
      My Computer


  8. Posts : 5
    Windows 7 Professional 64 bit
    Thread Starter
       #8

    i've emailed Salient and am currently looking into Java Runtime Environment. I just thought i was "good with computers" till i took this job lol
      My Computer


  9. Posts : 10,485
    W7 Pro SP1 64bit
       #9

    There are tons of things that you will encounter at work that just never come up for the home user.

    Maybe as a test, you could stream one of the cameras to VLC and just minimize that window. It would be interesting to see if VLC solves the freeze that you mentioned: "ReloadEvery" to refresh the page every 5 minutes so the stream doesn’t freeze up.


    But back to working on your current setup:
    While we wait to hear back from Salient, what happens if you kill all instances of jp2launcher? Does the Salient app still work within firefox? My thinking is: jp2launcher might just launch the Java apps. It might not be needed after that. If it turns out that you do not need any instances of jp2launcher running after the Java apps load, then maybe a script could kill each instance of jp2launcher after a period of time (e.g. kill jp2launcher two minutes after jp2launcher first appears).

    To test this, restart the computer so that you one have one or two instances of jp2launcher to manually kill via Task Manager. I know that you failed to kill jp2launcher in post #6... but give it a try via Task Manager.


    If Salient cannot solve the issue with their software and we must stick with the Firefox/Salient combo, then we can stop using ReloadEvery and use a script to exit and then restart Firefox. Not pretty, but functional.
      My Computer


  10. Posts : 5
    Windows 7 Professional 64 bit
    Thread Starter
       #10

    Thanks so much for the help.
    So, interesting thing just happened. This morning i set the parameters in Java so that it could use no more than 512mb of memory, but apparently that didn't work. I walked by the aforementioned computer and all the "cameras" had gone white. I already had task manager pulled up, and took the attached screenshot. When i tried to paste it into paint, the computer informed me that memory was low and suggested i terminate.........firefox. Before i could even decide on the matter, it did it for me.

    I then watched in the task manager as one-by-one the "jp2launcher" processes closed by themselves. This, of course, leads me to believe that i could do as USERNAMEISSUES mentioned and do a script to re-start firefox. The problem with that is that there is a username/password for the camera's webaddress. it auto-populates when the site is opened, but someone has to click "ok", correct? or is there a script for that as well? (again....never done a script).
    Also, i will keep looking into using VLC. i've just been busy today.
    Attached Thumbnails Attached Thumbnails How to auto-kill orphaned processes if there is still a live one?-ci.jpg  
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:00.
Find Us