mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2021-10-25, 21:17   #1
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

33×131 Posts
Default How to run mprime on remote machine in background

Help requested for *nix-ignorant me:
I normally run mprime on a few idle cores of my server (CentOS 8). Thus far been running mprime -d in a SSH window and it all works nicely. Until my home internet connection gets disrupted (and it's been unreliable recently) in which case the SSH session gets disconnected and mprime stops running (at least after a few minutes).

Is there a way to start mprime and let it run in the background without needing to maintain a constant connection to the server, but be able to bring up the current status when I want to see what it's doing?
James Heinrich is offline   Reply With Quote
Old 2021-10-25, 21:37   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

1111011011012 Posts
Default

A couple of options might be:

Add this to your remote crontab @reboot /path/to/mprime/mprime &. You might like to investigate the screen command.

Or prepend nohup to your mprime command.

Last fiddled with by paulunderwood on 2021-10-25 at 21:46
paulunderwood is offline   Reply With Quote
Old 2021-10-25, 22:28   #3
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

507610 Posts
Default

Using screen is dead simple:

screen ./mprime -d

If session is disconnected (by accident, or on purpose with ctrl-a ctrl-d), it continues to run. Any other terminal window can reconnect to the session with "screen -r" to resume the session display.
VBCurtis is offline   Reply With Quote
Old 2021-10-26, 02:00   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

2·29·71 Posts
Default

I second the use of screen or tmux, with which will run the same as VBCurtis with screen.

For tmux, the invocation and keys are a little different, but it works the same. I only use tmux rather than screen because that's what I started out with prior to learning about screen.
EdH is offline   Reply With Quote
Old 2021-10-26, 02:07   #5
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

100110010101002 Posts
Default

anydesk does wonders...
LaurV is offline   Reply With Quote
Old 2021-10-26, 13:09   #6
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

67218 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Using screen is dead simple:
screen ./mprime -d
...reconnect to the session with "screen -r" to resume the session display.
James Heinrich is offline   Reply With Quote
Old 2021-10-26, 13:10   #7
Xyzzy
 
Xyzzy's Avatar
 
Aug 2002

22×3×17×41 Posts
Default

https://access.redhat.com/solutions/4136481
https://www.redhat.com/sysadmin/tips-using-tmux

Xyzzy is offline   Reply With Quote
Old 2021-10-26, 14:57   #8
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

2·29·71 Posts
Default

Quote:
Originally Posted by Xyzzy View Post
Thanks! I must Boolmark this. . .
EdH is offline   Reply With Quote
Old 2021-10-26, 15:39   #9
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

22×7×359 Posts
Default

Minimalist solution...

./mprime -d </dev/null >>mprime.log 2>/dev/null &
exit
chalsall is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
access to windows machine files from ubuntu machine wildrabbitt Hardware 1 2019-02-24 18:34
run mprime in background guest Software 9 2015-01-22 04:22
Your favourite desktop background. Flatlander Lounge 8 2007-07-16 16:55
Whats going on in the background ltd Prime Sierpinski Project 2 2006-12-26 09:40
What is your primary educational background? eepiccolo Lounge 8 2002-12-28 21:25

All times are UTC. The time now is 11:24.


Thu Dec 9 11:24:49 UTC 2021 up 139 days, 5:53, 0 users, load averages: 0.95, 1.08, 1.19

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.