mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > No Prime Left Behind

Reply
 
Thread Tools
Old 2008-02-17, 22:45   #1
em99010pepe
 
em99010pepe's Avatar
 
Sep 2004

2×5×283 Posts
Default batch file

Hey gurus,

If I reboot the server the internet connection only establishes past 2-3 mins so I have a batch file with the following content to start up the llrnet servers:

Code:
ping -n 300 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Riesel\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Sierpinski\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\NPLB\llrserver.exe
ping -n 10 127.0.0.1 > NUL
C:\dc\llrnet-windows\NPLB-port_80\llrserver.exe
The first server (Riesel one) will go online after 300 seconds of the startup of the machine, the second one 310 seconds, the third 320 and so on. My problem here is that the batch opens a DOS windows and never closes because it stays open with details of the console of the last server. By closing that DOS window all servers will go down. How do I avoid this?

For now I only have shortcuts of the exe in the startup folder but I prefer to see them on 5 mins past the startup of the machine...

Last fiddled with by em99010pepe on 2008-02-17 at 22:50
em99010pepe is offline   Reply With Quote
Old 2008-02-17, 23:10   #2
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

792 Posts
Default

Quote:
Originally Posted by em99010pepe View Post
Hey gurus,

If I reboot the server the internet connection only establishes past 2-3 mins so I have a batch file with the following content to start up the llrnet servers:

Code:
ping -n 300 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Riesel\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Sierpinski\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\NPLB\llrserver.exe
ping -n 10 127.0.0.1 > NUL
C:\dc\llrnet-windows\NPLB-port_80\llrserver.exe
The first server (Riesel one) will go online after 300 seconds of the startup of the machine, the second one 310 seconds, the third 320 and so on. My problem here is that the batch opens a DOS windows and never closes because it stays open with details of the console of the last server. By closing that DOS window all servers will go down. How do I avoid this?

For now I only have shortcuts of the exe in the startup folder but I prefer to see them on 5 mins past the startup of the machine...
A while back on these forums I posted a copy of a nice little program that runs in the system tray, and lets you easily hide and unhide windows on demand. It might be just what you're looking for--you can start the servers, then hide them with the program until you want to look at them again, at which point you can easily unhide them.
mdettweiler is offline   Reply With Quote
Old 2008-02-24, 18:06   #3
IronBits
I ♥ BOINC!
 
IronBits's Avatar
 
Oct 2002
Glendale, AZ. (USA)

45916 Posts
Default

Try this Carlos

@echo off
ping -n 300 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\Riesel /I "cmd /cSTART /min llrserver.exe"
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\Sierpinski /I "cmd /cSTART /min llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\NPLB /I "cmd /cSTART /min llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\NPLB-port_80 /I "cmd /cSTART /min llrserver.exe

echo done! &echo.
echo Sleeping for 5 seconds
ping -n 5 127.0.0.1 >NUL
IronBits is offline   Reply With Quote
Old 2008-02-24, 21:18   #4
em99010pepe
 
em99010pepe's Avatar
 
Sep 2004

2·5·283 Posts
Default

Quote:
Originally Posted by IronBits View Post
Try this Carlos

@echo off
ping -n 300 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\Riesel /I "cmd /cSTART /min llrserver.exe"
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\Sierpinski /I "cmd /cSTART /min llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\NPLB /I "cmd /cSTART /min llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\NPLB-port_80 /I "cmd /cSTART /min llrserver.exe

echo done! &echo.
echo Sleeping for 5 seconds
ping -n 5 127.0.0.1 >NUL
I'll try this when I reboot the server, I'll let you know when. Thank you DJ.

Carlos
em99010pepe is offline   Reply With Quote
Old 2008-02-24, 21:21   #5
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

10110111101102 Posts
Default

Quote:
Originally Posted by em99010pepe View Post
Hey gurus,

If I reboot the server the internet connection only establishes past 2-3 mins so I have a batch file with the following content to start up the llrnet servers:

Code:
ping -n 300 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Riesel\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\Sierpinski\llrserver.exe
ping -n 10 127.0.0.1 > NUL
Start /min C:\dc\llrnet-windows\NPLB\llrserver.exe
ping -n 10 127.0.0.1 > NUL
C:\dc\llrnet-windows\NPLB-port_80\llrserver.exe
The first server (Riesel one) will go online after 300 seconds of the startup of the machine, the second one 310 seconds, the third 320 and so on. My problem here is that the batch opens a DOS windows and never closes because it stays open with details of the console of the last server. By closing that DOS window all servers will go down. How do I avoid this?

For now I only have shortcuts of the exe in the startup folder but I prefer to see them on 5 mins past the startup of the machine...
The last command does not have the "Start /min" as a prefix so the CMD box will wait for it to finish.
retina is online now   Reply With Quote
Old 2008-02-24, 21:23   #6
em99010pepe
 
em99010pepe's Avatar
 
Sep 2004

1011000011102 Posts
Default

Quote:
Originally Posted by retina View Post
The last command does not have the "Start /min" as a prefix so the CMD box will wait for it to finish.
Thanks!
em99010pepe is offline   Reply With Quote
Old 2008-02-26, 07:09   #7
IronBits
I ♥ BOINC!
 
IronBits's Avatar
 
Oct 2002
Glendale, AZ. (USA)

3×7×53 Posts
Default Primes.bat for windows

Don't laugh, it works. This will show you all the primes in results.txt.
I can change it so that it takes a filename.ext from the command line if you would rather have that.

sample output:
user=Free-DC_Beyond
[02/25/08 19:48:38]
861*2^316774-1 is prime!

Done!

@echo off
cls

for /f "tokens=1-5* delims=^= " %%a in ('type results.txt') do CALL :PARSE "%%a" "%%b" "%%c" "%%d"
goto :END

:PARSE
if "%~1"=="user" set USER=%~2
if not "%~4"=="prime!" set DATETIME=%~1 %~2
if "%~4"=="prime!" echo user=%USER% & echo %DATETIME% & echo %~1 %~2 %~3 %~4 & set USER=& set DATETIME=&echo.

goto :EOF

:END

echo Done!

:EOF

IronBits is offline   Reply With Quote
Old 2008-03-15, 10:53   #8
em99010pepe
 
em99010pepe's Avatar
 
Sep 2004

2×5×283 Posts
Default

Code:
@echo off
ping -n 300 127.0.0.1 > NUL
Start /DC:\dc\llrnet-windows\NPLB /I cmd /cSTART /min llrserver.exe

echo done! &echo.
echo Sleeping for 5 seconds
ping -n 5 127.0.0.1 >NUL
This works! Thanks IronBits.
em99010pepe is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch File Issue, Perhaps storm5510 Programming 3 2018-01-18 04:44
Batch jobs using AWS Batch GP2 Cloud Computing 1 2016-12-07 11:31
14e batch of WU's pinhodecarlos NFS@Home 25 2015-07-25 17:50
Got first batch of TF to 75 Chuck GPU to 72 23 2015-05-10 20:34
Windows batch file for NFS - any help? f1pokerspeed Programming 9 2013-12-24 18:21

All times are UTC. The time now is 14:56.

Wed Nov 25 14:56:17 UTC 2020 up 76 days, 12:07, 3 users, load averages: 1.62, 1.65, 1.53

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.