Is is possible to copy a running process between machines?
To the best of my understanding, all linux process are actually files, is it possible to copy a running process from one machine to another?
for example - copy a running tomcat server from one machine to another without having to restart the server
migration processes
add a comment |
To the best of my understanding, all linux process are actually files, is it possible to copy a running process from one machine to another?
for example - copy a running tomcat server from one machine to another without having to restart the server
migration processes
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27
add a comment |
To the best of my understanding, all linux process are actually files, is it possible to copy a running process from one machine to another?
for example - copy a running tomcat server from one machine to another without having to restart the server
migration processes
To the best of my understanding, all linux process are actually files, is it possible to copy a running process from one machine to another?
for example - copy a running tomcat server from one machine to another without having to restart the server
migration processes
migration processes
edited Jan 9 '17 at 23:41
Gilles
529k12810601586
529k12810601586
asked Jan 9 '17 at 10:56
aviad m
434
434
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27
add a comment |
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27
add a comment |
3 Answers
3
active
oldest
votes
To the best of my understanding, all linux process are actually files
You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc
file system to a target /proc
file system is doomed.
Is possible to copy a running process between machines?
One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.
Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
add a comment |
No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.
Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.
These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.
This is a feature of the specific service, however, and not of Unix.
You may find more information on the ServerFault forum.
add a comment |
No, as of now its not possible.
when process comes under a service. Then service to service process transfer can be possible.
But this required OS level changes.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f335946%2fis-is-possible-to-copy-a-running-process-between-machines%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To the best of my understanding, all linux process are actually files
You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc
file system to a target /proc
file system is doomed.
Is possible to copy a running process between machines?
One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.
Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
add a comment |
To the best of my understanding, all linux process are actually files
You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc
file system to a target /proc
file system is doomed.
Is possible to copy a running process between machines?
One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.
Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
add a comment |
To the best of my understanding, all linux process are actually files
You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc
file system to a target /proc
file system is doomed.
Is possible to copy a running process between machines?
One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.
Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.
To the best of my understanding, all linux process are actually files
You shouldn't take the metaphor too literally. Linux processes can indeed be accessed through a pseudo file system for debugging, monitoring and analysis purpose but processes are more than just these files and "copying" them from a source host /proc
file system to a target /proc
file system is doomed.
Is possible to copy a running process between machines?
One of the serious issues moving a running process between hosts is how to handle the open file descriptors this process is using. If a process is reading or writing a file, this very file (or an exact clone) must be available on the target host. File descriptors related to sockets would be tricky to process as the IP address they are bound to will likely change from one host to the other. Processes sharing memory segments with other ones would cease to do it after a migration. PID clashes might also happen, if a running process has the same pid that the incoming one, one of them will need to be changed. Parent child relationship will be lost, and I have just scratched the potential problems.
Despite these issues, there are technical solutions providing that functionality called "Application checkpointing" like DMTCP and CRIU. This is similar to what is used with hypervisors like VMWare, VirtualBox, Oracle VM and others when they do virtual machines live migration / teleportation. With virtual machines, the job is actually "simpler" as the whole OS is moved, including the files descriptors, the file systems, the memory, the network and other devices, etc.
edited Dec 25 '18 at 0:09
answered Jan 10 '17 at 0:31
jlliagre
46.5k783132
46.5k783132
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
add a comment |
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
I actually asked this question more as an exercise than as something to be tried on a real system. Looking into process "files" I found that a process has too many dependencies to just copy a file and make it work on another machine but it never hurts to ask and possibly get another view into things. thanks for your answer.
– aviad m
Jan 10 '17 at 7:17
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
what about docker? . edit found this criu.org/Docker
– Blauhirn
Dec 5 '17 at 23:50
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
@Blauhirn Indeed. I mentioned CRIU with a link where integration with OpenVZ, LXC/LXD, and Docker are mentioned.
– jlliagre
Dec 6 '17 at 0:24
add a comment |
No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.
Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.
These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.
This is a feature of the specific service, however, and not of Unix.
You may find more information on the ServerFault forum.
add a comment |
No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.
Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.
These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.
This is a feature of the specific service, however, and not of Unix.
You may find more information on the ServerFault forum.
add a comment |
No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.
Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.
These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.
This is a feature of the specific service, however, and not of Unix.
You may find more information on the ServerFault forum.
No, it's not possible to move a process (i.e., a running program) from one Unix machine to another.
Some services, such as web services, database services or routers, provide redundancy options, such as failover and/or load-balancing. This means that you have several copies of the service running on several machines, and if one goes down another takes over, or they share the load of providing the service, possibly replicating databases/state between each other to keep up to date.
These kinds of services would "move" from one machine to another, while the processes that are providing the service are not moving.
This is a feature of the specific service, however, and not of Unix.
You may find more information on the ServerFault forum.
edited Apr 13 '17 at 12:13
Community♦
1
1
answered Jan 9 '17 at 11:11
Kusalananda
122k16230375
122k16230375
add a comment |
add a comment |
No, as of now its not possible.
when process comes under a service. Then service to service process transfer can be possible.
But this required OS level changes.
add a comment |
No, as of now its not possible.
when process comes under a service. Then service to service process transfer can be possible.
But this required OS level changes.
add a comment |
No, as of now its not possible.
when process comes under a service. Then service to service process transfer can be possible.
But this required OS level changes.
No, as of now its not possible.
when process comes under a service. Then service to service process transfer can be possible.
But this required OS level changes.
answered Sep 29 '17 at 6:20
user253394
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f335946%2fis-is-possible-to-copy-a-running-process-between-machines%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You would need clustering software. I am not knowledge able about names, or what each one does, but am aware that there is one for teleporting processes to other machines.
– ctrl-alt-delor
Jan 9 '17 at 14:27