LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2006, 12:01 PM   #1
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
Process Resurrection and /proc/pid


Hey all. Trying to save/serialize/freeze a process, much like what http://linas.org/linux/persistance.html describes. As far as I know, nobody has done this successfully.

Here are some of the probing steps I've taken so far, to find the best approach:

1.) Implemented a kernel module to read through the task_struct for a given process

2.) Implemented a system call to do the same (messy ... so messy)

3.) Checked out google's coredumper app

4.) Looked through the /proc/pid files

It seems like reading through /proc is going to yield the most standard and easiest approach. My question is though, where can I find the docs on that? I really don't want to have to wade through the source to find the meaning of each value. For example, what does /proc/<pid>/oom_score mean? I get a value of 903, but that's not helpful. Also:

Quote:
{12:53:19 cedar} /proc/2573 $>cat mem
cat: mem: No such process
Anyone know why I'm getting that? The process is running, but I can't view mem, which I assume lists the allocated virtual memory for the process?

All in all, this project is a lot to take on. Any guidance/pointers in the right direction would be helpful. Thanks.
 
Old 03-20-2006, 12:25 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I'm quite skeptical with this project.

Is the goal to have a process being able to freeze before and resume after a reboot ?
 
Old 03-20-2006, 12:35 PM   #3
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
That would be considered a success, yes. A lesser success would be to simply stop the process, then bring it back up. A greater success would be to stop the process, send it to you, and have you open it up where it left off.
 
Old 03-20-2006, 05:17 PM   #4
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
For those intrested in the solution: http://cryopid.berlios.de/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting PID of running process in C/C++ laikos Programming 16 10-30-2015 06:16 PM
Getting pid of a process!! vishamr2000 Programming 34 03-12-2015 07:12 AM
how to get more process' info according to its PID? iclinux Programming 1 02-05-2005 05:30 AM
about /proc/$pid/stat 's start time henryluo Programming 2 06-21-2004 09:15 AM
Get Next PID of Process Tree zer0python Programming 7 11-26-2003 11:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration