From: Jeff D. <jd...@ka...> - 2002-10-14 00:52:08
|
da...@da... said: > The code isn't really in a sharing state at the moment, as I want to > clean some things up and add in extra capabilities. Neither was UML when I first released it. umld seems to work OK (in fact, from the outside it looks pretty neat), so I don't think you're doing anyone any favors by not releasing it. Jeff |
From: Jeff D. <jd...@ka...> - 2002-10-14 11:42:20
|
da...@da... said: > Is there a nice way to 'pause' a UML while I copy it's filesystem > images somewhere? I was thinking there was a sysrq option which did > it, but I don't seem able to find it. mconsole 'stop'. It doesn't seem to be documented anywhere :-) When you're done, mconsole 'go' will send it on its way. Jeff |
From: David C. <da...@da...> - 2002-10-14 12:02:10
|
Jeff Dike wrote: > mconsole 'stop'. It doesn't seem to be documented anywhere :-) No, it isn't :-) Can I do anything with the UML while it's stopped? Trying to figure out where to sync it via sysrq, although it's probably not going to make a great deal of difference if I sync it before or after I 'stop' it. > When you're done, mconsole 'go' will send it on its way. Nifty. What exactly does stop and go do to make the UML stop and, er, go? David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |
From: Jeff D. <jd...@ka...> - 2002-10-14 13:39:29
|
da...@da... said: > What exactly does stop and go do to make the UML stop and, er, go? It just sits in a loop handling mconsole requests synchronously until it gets a go. This is the code: while(mconsole_get_request(req->originating_fd, req)){ if(req->cmd->handler == mconsole_go) break; (*req->cmd->handler)(req); } Your snapshot could would do something like uml_mconsole umid stop uml_mconsole umid sysrq s <copy the snapshot> uml_mconsole umid go Jeff |
From: Net L. <net...@li...> - 2002-10-14 14:49:08
|
On Mon, 14 Oct 2002, Jeff Dike wrote: > da...@da... said: > > What exactly does stop and go do to make the UML stop and, er, go? > > It just sits in a loop handling mconsole requests synchronously until it gets > a go. > > This is the code: > > while(mconsole_get_request(req->originating_fd, req)){ > if(req->cmd->handler == mconsole_go) break; > (*req->cmd->handler)(req); > } > > Your snapshot could would do something like > uml_mconsole umid stop > uml_mconsole umid sysrq s > <copy the snapshot> > uml_mconsole umid go THis is just what i've been looking for as well. Are there any other undocumented options for uml_mconsole? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lonni J Friedman net...@li... Linux Step-by-step & TyGeMo http://netllama.ipfox.com |
From: William S. <wst...@po...> - 2002-10-14 14:55:30
|
Good day, all, On Mon, 14 Oct 2002, Net Llama! wrote: > On Mon, 14 Oct 2002, Jeff Dike wrote: > > da...@da... said: > > > What exactly does stop and go do to make the UML stop and, er, go? > > > > It just sits in a loop handling mconsole requests synchronously until it gets > > a go. > > > > This is the code: > > > > while(mconsole_get_request(req->originating_fd, req)){ > > if(req->cmd->handler == mconsole_go) break; > > (*req->cmd->handler)(req); > > } > > > > Your snapshot could would do something like > > uml_mconsole umid stop > > uml_mconsole umid sysrq s > > <copy the snapshot> > > uml_mconsole umid go > > THis is just what i've been looking for as well. Are there any other > undocumented options for uml_mconsole? If Jeff tells you, then they'll be documented features. ;-) Cheers, - Bill --------------------------------------------------------------------------- "Put down those Windows disks, Dave..." -- HAL -------------------------------------------------------------------------- William Stearns (wst...@po...). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.stearns.org -------------------------------------------------------------------------- |
From: David C. <da...@da...> - 2002-10-14 15:43:57
|
Jeff Dike wrote: > It just sits in a loop handling mconsole requests synchronously until it gets > a go. Okay. I wasn't sure if the kernel would process a sysrq via mconsole while it was stopped. David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |
From: Net L. <net...@li...> - 2002-10-15 14:23:35
|
Is there a safe time limit on how long a UML can be put into a 'stop' state before weird events start to occur within UML? I'm thinking of things like TCP connections timing out, or cronjobs getting messed up. On Mon, 14 Oct 2002, Jeff Dike wrote: > da...@da... said: > > What exactly does stop and go do to make the UML stop and, er, go? > > It just sits in a loop handling mconsole requests synchronously until it gets > a go. > > This is the code: > > while(mconsole_get_request(req->originating_fd, req)){ > if(req->cmd->handler == mconsole_go) break; > (*req->cmd->handler)(req); > } > > Your snapshot could would do something like > uml_mconsole umid stop > uml_mconsole umid sysrq s > <copy the snapshot> > uml_mconsole umid go > > Jeff > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lonni J Friedman net...@li... Linux Step-by-step & TyGeMo http://netllama.ipfox.com |
From: Jeff D. <jd...@ka...> - 2002-10-14 15:13:21
|
wst...@po... said: > If Jeff tells you, then they'll be documented features. ;-) Yeah. And until then, they're MINE MINE MINE ALL MINE BWAHAHAHAHAHA errr, it's time for my medication.... |
From: Jeff D. <jd...@ka...> - 2002-10-14 15:29:42
|
net...@li... said: > THis is just what i've been looking for as well. Are there any other > undocumented options for uml_mconsole? Umm, to actually answer your question, they are all now documented at least internally. Here are the current mconsole operations vector and help string: static struct mconsole_command commands[] = { { "version", mconsole_version, 1 }, { "halt", mconsole_halt, 0 }, { "reboot", mconsole_reboot, 0 }, { "config", mconsole_config, 0 }, { "remove", mconsole_remove, 0 }, { "sysrq", mconsole_sysrq, 1 }, { "help", mconsole_help, 1 }, { "cad", mconsole_cad, 1 }, { "stop", mconsole_stop, 0 }, { "go", mconsole_go, 1 }, }; #define UML_MCONSOLE_HELPTEXT \ "Commands: version - Get kernel version help - Print this message halt - Halt UML reboot - Reboot UML config <dev>=<config> - Add a new device to UML; same syntax as command line remove <dev> - Remove a device from UML sysrq <letter> - Performs the SysRq action controlled by the letter cad - invoke the Ctl-Alt-Del handler stop - pause the UML; it will do nothing until it receives a 'go' go - continue the UML after a 'stop' " Jeff |
From: Rainer E. <ra...@el...> - 2002-10-14 19:55:25
|
Jeff Dike wrote: > cad - invoke the Ctl-Alt-Del handler I would like to have a "cad-halt" feature. If "cad" is issued, most distributions reboot at the end and the only possibility to stop is, to send a "halt" manually in the right second. With a "cad-halt" a stop could be forced. Another idea in the range of this topic would be a "reboot=on/off" boot-parameter. So between UML reboots one could have additional handling in script controlled environments. With a "reboot=" parameter "cad-halt" migth become redundant. -- ra...@el... |
From: David C. <da...@da...> - 2002-10-14 20:11:03
|
Rainer Ellinger wrote: > If "cad" is issued, most distributions reboot at the end and the only > possibility to stop is, to send a "halt" manually in the right second. > With a "cad-halt" a stop could be forced. How does one work out when the right second is? How does the UML know the difference between a reboot issues via the 'cad' interface and someone going 'shutdown -r 0' on the command line? The 'cad' handler simply performs whatever the 'ca' line in /etc/inittab says - Doesn't have to be a reboot or a shutdown. > Another idea in the range of this topic would be a "reboot=on/off" > boot-parameter. So between UML reboots one could have additional > handling in script controlled environments. With a "reboot=" parameter > "cad-halt" migth become redundant. Isn't it easier just to change '-r' to '-h' in the /etc/inittab file? David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |
From: William S. <wst...@po...> - 2002-10-14 20:24:46
|
On Mon, 14 Oct 2002, Rainer Ellinger wrote: > Jeff Dike wrote: > > cad - invoke the Ctl-Alt-Del handler > > I would like to have a "cad-halt" feature. > > If "cad" is issued, most distributions reboot at the end and the only > possibility to stop is, to send a "halt" manually in the right second. > With a "cad-halt" a stop could be forced. In http://www.stearns.org/slartibartfast/uml_go I cheat. I rename the linux binary to something else, issue the sysrq-s/u/b sequence, then rename the binary back. This has the effect of halt. Search for "#Stop "reboot" from finding a new kernel, changing reboot to halt. :-)" Another approach to shutting down UML's from the host is to use ssh keys, forced commands, sudo and/or fanout to allow root to issue a halt command to all the uml's simultaneously: fanout "root@uml1 root@uml2 root@uml3" 'shutdown -h now' or fanout "uml1 uml2 uml3" 'sudo shutdown -h now' See the following for more details: http://www.stearns.org/doc/ssh-techniques-two.current.html http://www.stearns.org/fanout/ http://www.stearns.org/ssh-keyinstall/ http://www.stearns.org/doc/ssh-intro.current.html http://www.stearns.org/doc/ssh-techniques.current.html http://www.stearns.org/doc/sudo.current.html All of the above require the UML user to allow the host administrator to have some access to their systems - which may or may not be appropriate. Cheers, - Bill --------------------------------------------------------------------------- "Please don't tell my mother I'm a System Administrator. She thinks I play piano in a bordello." (Courtesy of Roderick A. Anderson <raa...@ac...>) -------------------------------------------------------------------------- William Stearns (wst...@po...). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.stearns.org -------------------------------------------------------------------------- |
From: Jeff D. <jd...@ka...> - 2002-10-15 15:08:41
|
net...@li... said: > Is there a safe time limit on how long a UML can be put into a 'stop' > state before weird events start to occur within UML? I'm thinking of > things like TCP connections timing out, or cronjobs getting messed up. There shouldn't be any problems internally. UML stays in a consistent state. The problems would arise from things outside UML interacting with it and expecting it to behave as though it were operating in something resembling real time. That depends on what you're using it for. Other machines will eventually time out TCP connections with keepalives. People sitting in front of a browser waiting for html to arrive will eventually time it out as well. And while we're on the subject, you shouldn't stop an SMP UML and expect that to do what you want. That mconsole driver loop will sit on one processor and keep it from doing anything else, but the other processors will be happily humming along. I need to do a little bit of fancy footwork to get all of the processors sitting around not doing any damage. Jeff |
From: Net L. <net...@li...> - 2002-10-15 15:12:59
|
On Tue, 15 Oct 2002, Jeff Dike wrote: > net...@li... said: > > Is there a safe time limit on how long a UML can be put into a 'stop' > > state before weird events start to occur within UML? I'm thinking of > > things like TCP connections timing out, or cronjobs getting messed up. > > There shouldn't be any problems internally. UML stays in a consistent state. So i could stop it for hours or even days, and when i tell it to 'go' again, it will have the right time internally, and just pick up where it left off? > The problems would arise from things outside UML interacting with it and > expecting it to behave as though it were operating in something resembling > real time. That depends on what you're using it for. Internet services (web, email, ssh etc). > And while we're on the subject, you shouldn't stop an SMP UML and expect > that to do what you want. That mconsole driver loop will sit on one processor > and keep it from doing anything else, but the other processors will be > happily humming along. I need to do a little bit of fancy footwork to get > all of the processors sitting around not doing any damage. I'm not entirely clear on what constitutes anb 'SMP UML'. Is that UML running on a box with more than one CPU, or simulating more than 1 CPU inside the UML? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lonni J Friedman net...@li... Linux Step-by-step & TyGeMo http://netllama.ipfox.com |
From: David C. <da...@da...> - 2002-10-15 15:48:04
|
Net Llama! wrote: > I'm not entirely clear on what constitutes anb 'SMP UML'. Is that UML > running on a box with more than one CPU, or simulating more than 1 CPU > inside the UML? A UML which is executed with 'ncpus' as a value greater than 1. David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |
From: Ian C. <ia...@ic...> - 2002-10-16 15:24:25
|
Hello, > I'm not entirely clear on what constitutes anb 'SMP UML'. Is that UML > running on a box with more than one CPU, or simulating more than 1 CPU > inside the UML? A UML with more than 1 cpu. The host can have one (UP) or more (SMP) cpu's and the uml can have up to 32 (virtual) cpu's. Bye for Now, Ian |
From: David C. <da...@da...> - 2002-10-16 16:16:22
|
Ian Chilton wrote: > The host can have one (UP) or more (SMP) cpu's and the uml can have up to > 32 (virtual) cpu's. I've had some reservations about refering to particular parts of UML as being 'virtual'. It's my understanding that UML simply creates additional timer threads and the scheduler handles them as being comparable to processors on a hardware based architecture. The UML kernel does not actually create a 'CPU' like VMWare does (I think), and when most people think virtual, they think emulation. Since the code executes nativly on the host CPU, even though the syscalls have been fudged with by the UML kernel, it's open to argument if CPUs are a virtual part of the UML kernel. David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |
From: Jeff D. <jd...@ka...> - 2002-10-15 16:52:50
|
net...@li... said: > So i could stop it for hours or even days, and when i tell it to 'go' > again, it will have the right time internally, and just pick up where > it left off? Yes, it should. Timer interrupts are still happening, so userspace will see a big jump in time, which may make cron go wild. Jeff |
From: David C. <da...@da...> - 2002-10-14 09:01:09
|
Jeff Dike wrote: > Neither was UML when I first released it. True. > umld seems to work OK (in fact, from the outside it looks pretty neat), so > I don't think you're doing anyone any favors by not releasing it. I'm trying to handle snapshots and restores at the moment, then I'll throw it out into the world. Is there a nice way to 'pause' a UML while I copy it's filesystem images somewhere? I was thinking there was a sysrq option which did it, but I don't seem able to find it. David -- David Coulson http://davidcoulson.net/ d...@vi... http://journal.davidcoulson.net/ |