All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

Linux start screen and run a java program and detach it?

I have the following script that should do the following: Stop screen "server" if exists Start screen "server" Run a java program and detach screen. However, when I firstly run the script, the ...
0
votes
0answers
16 views

Automatically java run if it stopped [duplicate]

Can i check java process using crontab (or other way) and if java process does not exist automatically perfom command: nohup java -jar /home/ec2-user/sringTestBoot-1.0-SNAPSHOT.jar
1
vote
0answers
68 views

Bring Java process to the foreground by its PID [closed]

I am using Ubuntu 16, and I am trying to have multiple Java processes which I can track each process by its PID. They each have an X11 window. Is there any way to bring the Java task's window to the ...
0
votes
1answer
77 views

Piping PID into jstack

I've written a command line that effectively extracts the highest CPU java PID thread process from top -H (example code): top -H -n 1 | grep "java" | head -n 1 | cut -d' ' -f1 I want to inspect the ...
1
vote
3answers
1k views

How to get pid number and folder where it works

How I can get PID number and folder where it works? If I run 2 same programs in different folders: /var/www/public_html/first_folder/test.jar <i>(it runs all the time)</i> /var/www/...
0
votes
0answers
369 views

<pidof> Command not showing all Java processes

I noticed that the command in my case, is not listing all Java processes. If I run pidof java I get one single pid as a response. On the other hand, if I run ps aux | grep [j]ava I get a three ...
0
votes
1answer
259 views

kill a java process after it was running for one hour

I need a script that will murder java processes that have been on for more than one hour. So I am trying this timeout -k 10s nohup cpulimit -l 40 -- java -jar file.jar Any idea why this isn't ...
1
vote
2answers
1k views

How to start the killed java process with its PID?

How to start the killed java process with its PID in Linux?
3
votes
2answers
2k views

foolproof way to detect if java process is running

I have a java process that runs continually that sometimes, for reasons I have yet to fully debug, craps out. So, I also have a cron job that looks for the process every 5 minutes and if it finds the ...
4
votes
1answer
645 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
2
votes
2answers
2k views

How can a normal user trigger a root cron task to execute immediately, without delay?

I have a root cron task that runs every day. But I want to allow normal users to request that it run immediately, if they so wish. It is a harmless process and it can run as often as needed and these ...
15
votes
6answers
124k views

Kill only one Java process

I usually run few Java applications, one for server running locally and other for some IDE like NetBeans. And from time to time, after lots of redeployments, my server get stuck on ...
3
votes
1answer
5k views

Cannot kill a java process

I have a java process that cannot be killed. I have tried every method I know, or that I have found on the internet to no avail. I have tried: killall java kill -9 <pid> kill -11 <pid> ...
4
votes
2answers
1k views

What is meant by stack in connection to a process?

From the book Advanced programming in the Unix environment I read the following line regarding threads in Unix like systems All the threads within a process share the same address space, file ...
4
votes
2answers
6k views

Linux running slow with 0 swap left

Our Linux server is responding very slowly. top doesn't show any excessive CPU usage. I noticed that even though there's about 5GB of free memory, the system is using all of swap with no free swap ...
0
votes
1answer
1k views

Enter process running in background/bring to foreground [duplicate]

Possible Duplicate: How can I disown it a running process and associate it to a new screen shell? I started a java client using nohup to get it to run in the background (needed to log out of ssh)....
1
vote
0answers
304 views

Rogue Java process brings my computer to a halt

In reference to my earlier post: Is there a log of past threads that are now closed? I gave the process a kill -STOP signal and started examining the details. I can't seem to figure out why it is ...
4
votes
4answers
5k views

How to run java process to be seen not as 'java…' in processes list?

Is it possible to run a Java process in Linux in a way that it could be seen in ps as some sort of alias? It would be easier to restart it when it is down.