Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Variable persistence for suspend-and-resume programs

by Tanktalus (Canon)
on Jul 24, 2005 at 04:22 UTC ( [id://477545]=note: print w/replies, xml ) Need Help??


in reply to Variable persistence for suspend-and-resume programs

I don't want to take away from your solution at all - I'm sure I could find some uses for this idea at some point. But your two reasons wouldn't be among them.

Going home from work: generally, I leave stuff running. In fact, I generally kick stuff off before I go home to let the computer keep doing my work for me. So maybe I'm missing a key component of why this is important. Perhaps it's because you need to watch it do its work, and if you're telnetted into a box, and then pack up your laptop, the connection is broken, sending a SIGHUP to your program. That's where VNC comes in - I run that in a VNC server window, and I can reconnect to it when I get back in in the morning.

Suspending to get some CPU time back: that's what ctrl-z is for. And then "fg" to return it to the foreground.

Unix isn't just an environment for running perl, y'know. ;-)

Unix's motto is: Solve one problem, and solve it well. I just string a bunch of these together as needed. I can move about pretty much at will, connecting to servers with stuff running, and monitor, suspend, kill, disconnect, etc., with pretty much impunity. No special code required.

  • Comment on Re: Variable persistence for suspend-and-resume programs

Replies are listed 'Best First'.
Re^2: Variable persistence for suspend-and-resume programs
by polettix (Vicar) on Jul 24, 2005 at 14:08 UTC
    I'm not in love with my solution, I consider it like a stone to "thump" on the door of the monastery of wisdom. Once I find what could solve the problem in the best and easy way, I'd probably throw it away :) This just to say that I feel quite positively prepared to criticism, and to thank you (and tlm) for the feedback.

    I have complete control over the CPU of my laptop. Moreover, most of the time I'm behind a proxy in an enterprise I work for as a consultant, so I wouldn't have occasion to control servers remotely in a comfortable way. This is why I do most of these calculations on my laptop - and why I'd like to arrive home and restart the process during the night :)

    Moreover, my current setup does not allow me to suspend and resume the laptop easily. This led me to try to code something: just because the particular issue could pop up in non-Unix world, or in situations where your suggestions could not be followed easily. In one word: when portability could be an issue (which I agree that is not something that happens every time :).

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.
Re^2: Variable persistence for suspend-and-resume programs
by Anonymous Monk on Jul 25, 2005 at 17:24 UTC
    ++Tanktalus. Use unix job control here; that's what it's for. Instead of VNC, I recommend using screen -- you can set up a multi-window, multiprocess environment, but text-only, and detach/reattach from any ssh or telnet session. Within it, ctrl-z, bg/fg/jobs will be your friend. Good luck.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://477545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found