Sections
Blog Control Panel
You must be logged in and have permission to create or edit a blog.
     
spotlight
     
     
Skip Navigation Links.
     
     
     
Blog Posts
Author: Peter Forret Created: 8/28/2006
Scripts for SysAdmins

I just released a new script in the http://winadmin.sourceforge.net series: waXSLT.

I basically needed a fast way of performing a XSL Transform on an XML file:

waXSLT.wsf /xsl:xml2htm.xsl /output=test.htm data.xml
:: convert data.xml to HTML file through xml2htm.xsl XSLT

With waCluster you can create a scheduled task that on regular intervals, or under specific conditions, does a 'soft' reset of an IIS server without violently throwing people of the server:

:: check first to see if the reset is necessary:: e.g. if CPU is continuously > 90% for 10 seconds:: also: make sure that this is NOT the last active node in a clusterwaCluster.wsf RESTART /wlbs:all /svc:iis /wait:600 /nobeep /noconfirm

This will drain the node, take it out of the cluster after 10 minutes, restart the IIS service, and put the node back in the cluster after 10 minutes.

In the new version of waCluster (out soon), I will include the option to call a web page just after the IISRESET, so that e.g. an ASP.NET application can start immediately (a heavy application could take something like 60 seconds to start up) make the /t test option actually work (what a silly bug!).

... Read More »

I've installed MoreGoogle the day I first read about it, and I just love it. It uses the Alexa/Amazon thumbnail and the web statistics to add more information to every Google search you do. It's free and installs like a charm. Google doesn't seem to mind, although it was not developed by them.

If you look for MoreGoogle in StereoSearch (comparing results for Google and Teoma), it also works (so within frames). Teoma does not seem to have noticed MoregGoogle yet. Weird. Almost every one else has (Yahoo/MSN/HotBot/...), except for GigaBlast.

MoreGoogle thumbnail by Alexa

Thanks to Robert Sommerville, I've been able to correct a bug in the moving of subfolders.

The 1.6 version is now available on http://winadmin.sourceforge.net/warmzip.html

 

For MP3's it's referred to as 'bitrate', for network speed it is 'transfer rate', for USB/FireWire one might call it 'throughput'. For a dedicated server, you get a 'monthly data transfer' limit. But however you look at it, it's always datasize per time unit. Kbps, MB/s, GB/mon, ... And you might want to convert between all those units.

Because I regularly have to work those conversions out, I have made a conversion wizard: www.forret.com/projects/hizmo/bandwidth.asp

It allows conversions like: USB 2.0 can move data as fast as 216 GB/h MP3's encoded at 64Kbps take 28,8 MB per hour of music if an Ethernet connection is continously used at an average of 50% (5 Mbps), that equals 1.620 GB per month. I've also listed a lot of theoretical speeds for well-known standards: hard disks (ATA, SCSI), internet connection (modem, ISDN, ADSL), RAM (SDRAM, RDRAM), audio (MP3, GSM) and video (DVD). I intend to make the list more complete... Read More »

I just added the option to waTimer to calculate throughput based on the size of an input  file. Example:

waTimer START zip_logs
7za.exe -r -tzip a output.zip *.log
waTimer STOP  zip_logs /ofile:output.zip 

Which would give you as output something like this:

:: waTimer - zip_logs : 23.65 seconds elapsed
:: waTimer - zip_logs : Throughput = 152 KB/sec

There is also a small waTimeThis.cmd script that allows you to do stuff like:

D:\>waTimeThis tracert www.google.com
____  START @ [Tue 09/14/2004 15:47:31.92] ____
Tracing route to www.google.akadns.net [216.239.39.104]
over a maximum of 30 hops:
  1     2 ms     2 ms     1 ms  10.10.13.254
 ...
 14    98 ms   101 ms   194 ms  216.239.39.104
Trace complete.
:: waTimer - watimethis : 16.94 seconds elapsed
:: waTimer - watimethis : Throughput = 213 #/hr
____ FINISH @ [Tue 09/14/2004 15:47:49.26] ____

Just a small utility to generate file names based upon the date. I basically needed it in a .CMD script that required the IIS log files of the day before, and there was no easy way to explain the concept of 'yesterday' to .CMD scripts. I made this in 30 minutes, not only because it is quite simple, but also because I build upon the waTemplate script templates.

So here is waDate 1.0!

Examples:

:: IIS log file name of yesterday
waDate now /i:-1 /d:exYYMMDD.log

:: detailed string for this exact second
waDate now /t:HHNN.SS

:: using it in a CMD script
for /f "usebackq" %%d in (`waDate now /i:-1m`) do ( set ONEMONTHAGO=%%d )

Imagine a meta-search engine, that uses a Google-like interface, gets its results from Yahoo, Teoma, amongst others, but not from Google. It's slower than a 'real' search engine, but adds thumbnails for most popular sites. Sound kinda plain, right? Would you put money in a company like this? IceRocket.com is such a company and has found a wealthy sponsor!

The service they propose is OK, but not revolutionary, basically a server-side MoreGoogle for the other search engines. So I've added it to my StereoSearch, and I now have all relevant search results in 1 window: StereoSearch on Xampled.

A billionaire's toy or a serious search contender? Difficult to say this early, but they're not entirely on the right track with their marketing: Icerocket... Read More »

I use a lot of (self-written) scripts that run as a Scheduled Task, and have picked up some dos and don'ts on the way: 1. No parameters => usage runtask.cmd should give a usage, not run the script! Usage should indicate what parameters are necessary: runtask [server] [port]or in case of a bogus parameter runtask Y 2. Script should not give output (STDOUT/STDERR) except in case of an error you don't see the output anyway, and this allows you for triggering on existence of output (you can have a /v verbose mode of the script that writes a lot to the STDOUT - this is for testing) 3. Redirect command output into files xcopy nonexistentfile.txt d:\folder will give:as STDERR File not found - test.tststs, and as STDOUT 0 File(s) copied => you can do xcopy [files] [destination] > ignore_stdout.log so only STDERR output 'escapes' You can merge STDOUT and STDERR by using command 2>&1 > output.log 4. Use daily log files to record progress set PROG=RunScriptset LOGFOLDER=D:\logs\dailyset TODAY=%DATE:/=_%     ::... Read More »

     
WWWCoder.com Weblogs
Host your weblog here at WWWCoder.com for free. Just sign up for membership and you'll see a link on the left which will allow you to create your own weblog. We do ask that all blogs have a technical theme and be in English.
     
     

Other family network sites: santry.com - katieandkarleigh.com

Powered by 

 

     
Copyright 20010 - Santry Technology Solutions, Box 172, Girard, PA 16417, (814) 774-0970
Privacy Statement | Terms Of Use