Page 3 of 3
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 3:24 pm
by steve
hills wrote:steve wrote:I'd be interested to know if the 'interact with desktop' setting works with XP and current Cumulus.
Hey it does!!
Thanks - that confirms that I didn't do anything to stop that working and it's down to the OS.
I selected "interact with desktop" and restarted the service and the console appeared straight away. I then exited the console and updates to the web page stopped and I couldn't see the process in task manager but the service still showed as started. Is that expected behavior?
I'm afraid I don't know enough about how any of this works to answer that.
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 3:32 pm
by steve
hills wrote:One thing I have noticed stopping and starting cumulus as a service is any calibrations made seem to be reset back to defaults. I had to stop and restart cumulus the normal way to make them stick.
That sounds like it's unable to read the cumulus.ini file. But if that were the case you would expect it to lose other settings too.
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 4:01 pm
by peter_dtm
Well there I was doing it the hard way - forgot to check the Forum
I run XP SP3 on a (currently)memory starved PC and Cumulus 1.8.8 build 881
When I checked srvrany I was reminded by MS that it is NOT intended for XP (I know; it does however work)
So I found this little SourceForge utility :
http://sourceforge.net/projects/uws/
This will call anything as a service - but (needless to say) not quite so simple :
The interact option ALWAYS opens a window - even if using the 'hidden' switch
So I run it as a straight headless service using this as the cumulus.config file :
Code: Select all
<log4net>
<appender name="File" type="log4net.Appender.FileAppender">
<file value="uws.log"/>
<appendToFile value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
</layout>
</appender>
<logger name="uws">
<level value="ALL"/>
<appender-ref ref="File"/>
</logger>
<logger name="Cumulus">
<level value="ALL"/>
<appender-ref ref="File"/>
</logger>
</log4net>
<!-- configuration of the universal windows service by itself -->
<application name="Cumulus" enabled="true">
<executable>
<path value="D:\Program Files\Cumulus\cumulus.exe"/>
<workingdir value="D:\Program Files\Cumulus"/>
<windowstyle value="minimized"/>
</executable>
<triggers>
<trigger type="uws.Triggers.OnServiceStartTrigger"/>
</triggers>
</application>
</uws>
Interestingly I seem to be able to open EasyWeather; Cumulus; Cumulus2 even with the Cumulus service running - however it is fairly easy to turn off the Cumulus service; I'll probably end up writing a bat file to turn the service off- run Cumulus - service on when I get round to it..
I hit anther problem - my Wireless network wasn't establishing until after log-on - so the wireless wizard is also now a service ... sigh ! but now an unattended re-start at least get Cumulus back on-line; now slowly de-bugging the ISS on the server...
Ideally I need to find out why EasyWeather; Cumulus; Cumulus2 are NOT loading on to my W2K Server ... and then I can run Cumulus on the same box as my web server...
Hope this is of interest
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 4:19 pm
by steve
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 4:30 pm
by peter_dtm
ah ! of course - USB is not native to W2K - I keep meeting this at work; may be I'll just have to upgrade to 2003 - another long suffering sigh; I've just put SQL on the 2k box so I can play with the Met Office data sets; I want to show the Oxford stats against my current record... so I didn't really want to have to rebuild the server....
thanks for the quick response ....
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 7:46 pm
by peter_dtm
well - that is quite interesting - starting & stopping the service
may result is some strange behaviour if you do it too many time (too quickly ?)
anyway here is a bat file that does the job; note the time delays - this
should give enough time for XP to release files & clean up ...
Code: Select all
echo off
Rem Stop Cumulus service before loading Cumulus program ; then restart Cumulus service.
Rem time delays using ping command mean no special programs needed - but note that the ping must address a non-existant address !
rem the ping timer runs in milisecs
rem Pete Marrable Jan 2010 - free to copy
rem version 1.0
REM Cumulus is running as a service using uws from http://sourceforge.net/projects/uws/
rem start local Cumulus instance
rem turn off service 1st and wait a bit
net stop cumulus
echo Now Wait 30 seconds
ping -w 30000 -t -n 1 10.0.0.1 >nul
echo Now call Cumulus
D:
cd "D:\Program Files\Cumulus\"
cumulus.exe
echo and wait 10 secs before restarting the service
ping -w 10000 -t -n 1 10.0.0.1 >nul
echo and restart Cumulus service
Net start cumulus
use at own risk etc etc ..

Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 8:53 pm
by hills
Wow, that's great Peter!
The only other thing I was going to look at putting in was to check the service was running before stopping, although this is probably not important, and also to check the service was set to autmatic before restarting. Therefore if you'd set it to manual for any reason it wouldn't restart.
Unfortunately as I'm a Unix administrator and have only had shell scripting experience I was going to have to find out how to do this in the Wintel envionment from scratch, so thankyou very much for providing this!!

Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 9:02 pm
by hills
I tried to find all the scripts on the net that I was looking at before and found this one, could that get around having to use the ping commands as a sleep command?
<plagiary starts here>
.bat file
--- begin ---
net stop <service> <---- stop desired services
net stop <service>
start /wait net start <service> <--- start desired service /wait cmd to wait until service has started before continuing to next cmd line
net start <service>
--- end ---
<plagiary ends here

>
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 11:22 pm
by peter_dtm
the only reason for using the ping command is to make the bat file agnostic as regards what resource kits have been made available.
it is what I consider to be a very dirty trick ! - it's only saving grace being that it is native to all (at least back to W98) versions of the dreaded Windows - and - until MS redesign the TCP/IP stack looks like staying in -
there is of course another use for it - you can ping your own ip address :
ping -w 1000 -t -n 1 127.0.0.1 >nul
that will return 1 sec AFTER your network service has been loaded & is working (which is why one of my colleagues found this in the first place - 'sleep' just waits; but doing this got us out of a problem where we needed to ensure that the network services had been started BEFORE allowing another service to start...)
Re: Making Cumulus as robust as possible on windows XP
Posted: Fri 01 Jan 2010 11:29 pm
by peter_dtm
hills wrote:Wow, that's great Peter!
The only other thing I was going to look at putting in was to check the service was running before stopping, although this is probably not important, and also to check the service was set to autmatic before restarting. Therefore if you'd set it to manual for any reason it wouldn't restart.
Unfortunately as I'm a Unix administrator and have only had shell scripting experience I was going to have to find out how to do this in the Wintel envionment from scratch, so thankyou very much for providing this!!

stop making me jealous ! Working OS - what a nice environment
if the service is already running then it will return a 'service already running' message
- no harm done
you could code the whole lot in VB and do al sorts of checks - though your services should not be changed from auto except by you ... so I was kind of assuming you would only do this if you knew it was in auto ...
but there again I left the brick wall with the shiny patch on at work; so I am afraid no VB code from me until I have the brick wall back to bang my head against..
Re: Making Cumulus as robust as possible on windows XP
Posted: Sat 02 Jan 2010 1:07 am
by hills
Haha, sorry!!
That all makes perfect sense, I'll borrow that script if I may!

Re: Making Cumulus as robust as possible on windows XP
Posted: Sat 02 Jan 2010 1:16 am
by peter_dtm
be my guest - that's why I posted it all...
just glad some one else can use it ..
Pete