Results 1 to 6 of 6
I run several tests on Linux machines that often cause them to crash. I need a way to reboot them from a Windows machine, preferably using a command line call ...
- 04-22-2008 #1
Need to reboot Linux from Windows using Command Line
I run several tests on Linux machines that often cause them to crash. I need a way to reboot them from a Windows machine, preferably using a command line call that can be automated through integration into an existing results system (C++ console app) that just sits and waits for the test machines to finish.
I have the latest cygwin installed on the Windows machine and Samba on all the Linux test machines.
- 04-22-2008 #2
Use an automatic call of
from cygwin on the windows machine via ssh.Code:shutdown -r now
This call could be dependent on a value returned from your test code.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 04-22-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
As long as you use a stable kernel, then even if you application hangs and lock the input on console, your system should be alive. So, you can log in via ssh and do whatever. Just make sure that sshd is running in the test machine and correctly set up.
You can -in fact- log in via ssh and restart your box. But, since you will be logged in already, it would be easier to just kill the offending process. No need to reboot. In linux, no process can take your system down, unless it hits a critical bug on the kernel or on a critical section of a critical module. Sooo critical
- 04-22-2008 #4
Actually I do have a kernel module that I would not consider entirely stable. And I test it with some of the other tests sometimes. The crashes, or hangs I guess I should call them, cause the system to become entirely unresponsive, no input devices work, remote access is terminated and can't loggin through WinSCP. I'm guessing that eleminates the possibility of using ssh.
I know that's not a pretty picture but it's common and not unexpected or preventable. The only option I've come up with so far is buying a power cycler I can trigger over the network. I was just hoping maybe someone knew of a way to get the computer to trigger a reboot, restart, or power cycle remotely using only the computer itself. I guess you can call me a dreamer but I'm not all that versed in network hardware or how it could be used to trigger a restart if the computer is hung.
- 04-22-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Hehe, well, then the scenario is not that simple as I thought. It depends on exactly what this module kills. The system might not even be able to respond to sysrq locally, in which case, there's litthe chance that you can do anything remotely either.
A power source that can be controlled remotely would be a solution, though that could definitely screw up your filesystems, requiring you to fix them by booting on an alternate way (which means that you will still need to have physical access to the box).
Personally, I would invest all that time and effort into stabilizing the kernel module. Though it all depends on what are you exactly doing and what your purpose is...
- 04-22-2008 #6
Stabilizing the kernel module is a high priority but getting new features in a driver is pretty high too. With new features come instability and that's what testing is for. Guess we'll be buying some new equipment.

Thanks for the help guys.


Reply With Quote
