Question: R: Kill Process On Ssh Server
2
gravatar for Lisanne
8.2 years ago by
Lisanne20
Lisanne20 wrote:

Dear All,

I'm working with ssh, and in this ssh server galaxy is running. My question is, how can i stop this galaxy server, make an update en restart this server.

I thought is was something like paster..

Thanks,

Lisanne

server galaxy • 5.0k views
ADD COMMENTlink written 8.2 years ago by Lisanne20

isn't it Ctrl-c ? I think you would get faster responses if you drop this pure technical question in http://stackoverflow.com/

ADD REPLYlink written 8.2 years ago by User 1933340

CTRL-C does not work in Galaxy's case.

ADD REPLYlink written 8.2 years ago by Farhat2.9k
9
gravatar for Alastair Kerr
8.2 years ago by
Alastair Kerr5.2k
The University of Edinburgh, UK
Alastair Kerr5.2k wrote:

The galaxy process is:

python ./scripts/paster.py serve universe_wsgi.ini

You can find the process by

ps -ef| grep universe

then kill the process via kill (process number) or if that fails use the -9 flag for kill (try without -9 first as the -9 flag will not allow any child processes to finish cleanly)

However it is much better to use the galaxy daemon to avoid all this:

When you run galaxy, cd to the directory and type

./run.sh --daemon

To stop it, again cd into the directory and, as the same user who ran the previous command, type

./run.sh --stop-daemon

ADD COMMENTlink modified 8.2 years ago • written 8.2 years ago by Alastair Kerr5.2k

Glad to know about this daemon mode. I used to kill the process and it always felt a bit dirty doing that.

ADD REPLYlink written 8.2 years ago by Farhat2.9k

Thanks, alastair Kerr, Thank works for me!

ADD REPLYlink written 8.2 years ago by Lisanne20
1
gravatar for Niallhaslam
8.2 years ago by
Niallhaslam2.2k
Dublin
Niallhaslam2.2k wrote:

If you find the galaxy process - by typing ps aux | grep galaxy. Then you can kill that process by typing kill processID.

e.g.

$ps aux | grep galaxy $username 85997 0.9 0.0 2435116 532 s001 R+ 10:26am 0:00.01 galaxy

The second column is the process ID. So type: $kill -9 85997 to kill that process.

Updates are usually managed by programs like apt, yum etc, and don't usually require a reboot unless the kernel is being updated.

ADD COMMENTlink written 8.2 years ago by Niallhaslam2.2k
1
gravatar for 2184687-1231-83-
8.2 years ago by
2184687-1231-83-5.0k wrote:

In one line:

pkill -f 'python ./scripts/paster.py serve universe_wsgi.ini'

pgrep is the same but for grepping instead of killing processes...

ADD COMMENTlink written 8.2 years ago by 2184687-1231-83-5.0k
0
gravatar for Geparada
8.2 years ago by
Geparada1.4k
Cambridge
Geparada1.4k wrote:

I use "top" command to see the ruining process, then you can press the letter "K" and write the PID of the process that yo want to kill.

To kill galaxy, you can kill python. For example:

geparada@bio-linux$ top

top - 16:06:13 up  3:28,  3 users,  load average: 1.05, 0.93, 0.90
Tasks: 198 total,   1 running, 197 sleeping,   0 stopped,   0 zombie
Cpu(s):  5.7%us,  0.7%sy,  0.0%ni, 93.4%id,  0.1%wa,  0.1%hi,  0.0%si,  0.0%st
Mem:   1980968k total,  1935844k used,    45124k free,   191828k buffers
Swap:  1750280k total,        0k used,  1750280k free,   553892k cached
PID to kill: 8976
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                    
 3295 geparada  20   0  323m 224m  25m S   19 11.6  43:23.59 npviewer.bin                                                                                               
 3265 geparada  20   0  774m 274m  33m S    4 14.2  19:28.94 firefox-bin                                                                                                
 1769 root      20   0  411m 120m  80m S    2  6.2  17:09.97 Xorg                                                                                                       
 4943 geparada  20   0  339m  32m  17m S    1  1.7   0:47.23 filezilla                                                                                                  
   85 root      20   0     0    0    0 S    0  0.0   0:03.66 kondemand/1                                                                                                
 2876 geparada  20   0  239m  31m 7764 S    0  1.6   1:32.06 compiz                                                                                                     
 3676 geparada  20   0  223m  24m  11m S    0  1.2   0:12.21 gnome-terminal                                                                                             
 8851 geparada  20   0 19224 1496 1072 R    0  0.1   0:00.32 top                                                                                                        
 8976 geparada  20   0  395m  83m 5844 S    0  4.3   0:12.72 python                                                                                                     
    1 root      20   0 23828 2128 1300 S    0  0.1   0:01.02 init                                                                                                       
    2 root      20   0     0    0    0 S    0  0.0   0:00.01 kthreadd                                                                                                   
    3 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/0                                                                                                
    4 root      20   0     0    0    0 S    0  0.0   0:01.23 ksoftirqd/0                                                                                                
    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0                                                                                                 
    6 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/1                                                                                                
    7 root      20   0     0    0    0 S    0  0.0   0:00.98 ksoftirqd/1                                                                                                
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1                                                                                                 
    9 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/2                                                                                                
   10 root      20   0     0    0    0 S    0  0.0   0:05.00 ksoftirqd/2                                                                                                
   11 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/2                                                                                                 
   12 root      RT   0     0    0    0 S    0  0.0   0:00.02 migration/3                                                                                                
   13 root      20   0     0    0    0 S    0  0.0   0:01.06 ksoftirqd/3                                                                                                
   14 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/3                                                                                                 
   15 root      20   0     0    0    0 S    0  0.0   0:00.14 events/0                                                                                                   
   16 root      20   0     0    0    0 S    0  0.0   0:00.11 events/1                                                                                                   
   17 root      20   0     0    0    0 S    0  0.0   0:00.16 events/2                                                                                                   
   18 root      20   0     0    0    0 S    0  0.0   0:00.15 events/3                                                                                                   
   19 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset                                                                                                     
   20 root      20   0     0    0    0 S    0  0.0   0:00.00 khelper                                                                                                    
   21 root      20   0     0    0    0 S    0  0.0   0:00.00 async/mgr                                                                                                  
   22 root      20   0     0    0    0 S    0  0.0   0:00.00 pm                                                                                                         
   24 root      20   0     0    0    0 S    0  0.0   0:00.01 sync_supers

It's a very visual and simple way to kill a process.

ADD COMMENTlink written 8.2 years ago by Geparada1.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 702 users visited in the last hour