LinuxQuestions.org
Visit Jeremy's Blog.
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, 01: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, 01:25 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
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, 01: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, 06: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 a process!! vishamr2000 Programming 31 09-09-2005 09:46 PM
how to get more process' info according to its PID? iclinux Programming 1 02-05-2005 06:30 AM
about /proc/$pid/stat 's start time henryluo Programming 2 06-21-2004 10:15 AM
Getting PID of running process in C/C++ laikos Programming 9 03-15-2004 04:33 AM
Get Next PID of Process Tree zer0python Programming 7 11-26-2003 12:56 PM


All times are GMT -5. The time now is 02:58 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration