Tim

Footprints in the snow of a warped mind

Tag Cloud

AJAX (4) ASP (5) ASP.Net (36) Error Reporting (2) Atlas (2) Business (52) Business Start-up Advice (22) Client (6) Expanding Your Business (11) C# (3) Canoeing (4) Canoe Racing (5) Cheshire Ring Race (5) Racing (2) Training (4) CIMA (1) CSS (3) dasBlog (2) Design (7) Icons (1) General (34) Christmas (6) Fun and Games (10) Internet (15) Random (38) RX-8 (8) Home Cinema (2) Hosting (1) IIS (6) JavaScript (2) Multipack (1) Networking (1) Nintendo (1) OS Commerce (1) PHP (1) Press Release (1) SEO (4) Server Maintenance (2) Server Management (5) Software (7) Office (3) Visual Studio (6) Windows (3) Vista (1) SQL Server (9) The Site Doctor (68) Turnover Challenge (1) Umbraco (5) Web Development (32) WebDD (32) Wii (1)

Atom 1.0 RSS 2.0 CDF 

Search

<May 2008>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Recent Comments

Blog Archive

Various Links

Blogs I Read

 Craig's Blog
Craig Hawker's Blog
 Google Blog
Official Google Webmaster Central Blog
 Matt Cutts
Gadgets, Google, and SEO
 Ol' Deano's Blog
My mate Dean's blog on my space, equally as random as mine but not off on as much of a tangent!
 Sam's Blog
Sam is one of my younger brothers studying Product Design and Manufacture at Loughborough, this is his blog :) Enjoy!

Recent Tracks

last.fm - The Social Music Revolution

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

newtelligence dasBlog 2.0.7226.0

Send mail to the author(s) Email Me (Tim Gaunt)

© 2008 Tim Gaunt.

Sign In

Get Windows Live Alerts

 Tuesday, October 16, 2007

Identify which application pool is associated with which W3WP.exe process

Tuesday, October 16, 2007 10:18:11 AM (GMT Standard Time, UTC+00:00)

Today I needed to identify a site that was causing the W3WP.exe process to run at 100% CPU. I had hoped that there was some clever way of identifying the site from the process id but no such luck. The issue was escalated because we have multiple sites under each application pool.It was done like this to keep the overheads minimal (each W3WP.exe process needs circa 25MB to run) but it makes identifying rogue code difficult.

If you need to identify which W3WP.exe relates to which Application Pool, open CMD, navigate to your System32 directory and type:

cscript iisapp.vbs

That'll then list the relevant W3WP.exe processes, process id and their app pool name.:) -simple and useful, just the way I like it!

 Monday, June 18, 2007

Server management 101 -part 1: Website directory structures and Identifying folder sizes

Monday, June 18, 2007 9:24:35 AM (GMT Standard Time, UTC+00:00)

Since getting our own dedicated server a couple of years ago we’ve had a fairly step learning curve which a lot of the time has been a tad hit-and-miss (never at the detriment of our customers I might add). Luckily we’ve had the superb support of Rackspace behind us but as others may not be so lucky, I thought I would post up a few nuggets we’ve received over the years. As I remember more, I’ll add additional posts.

Domain/Folder organisation

One of the first issues we came across (and I’m sure many people have already got into this position) was the structure of the folders on both the server and development machines. The solution we came up with was to have a common folder –for argument’s sake lets call it “WebsitesFolder”. Within “WebsitesFolder” you then create a new directory for each domain name and finally within that, a folder for each subdirectory i.e. www, blogs etc.

By creating a new folder for each subdomain, you are able to quickly find the correct folder for the domain. Then locally you are able to store the source files outside of the site’s root which will (or should) speed up your FTP transfer process as you won’t need to select which files to upload1. The structures might then look like this:
Development server

  • /domain.com
    • /www/
    • /subdomain/
    • /Source Imagery/
    • /Some Irrelevant Folder/
  • /domain2.com
    • /www/

Production server

  • /domain.com
    • /www/
    • /subdomain/
  • /domain2.com
    • /www/

1It might also be worth you checking out SyncBackSE which is an excellent FTP client that only uploads files you have changed since the last transfer. It also has the added advantage that it has customisable filters allowing you to ignore source files and folders as _notes, .cs, .vb etc. http://www.2brightsparks.com/syncback/sbse.html

Finding large directories

The other day I noticed that one of our server’s disk space was running a little low but as far as I was aware there was plenty of space left. As we tend to store all client data within set folders I was able to quickly identify that it wasn’t the client folders that was taking all the room so what was?

When you don’t know which folders are taking the space, there are a couple of tools you may find useful. The first I was told about was TreeSize (http://www.jam-software.com/freeware/index.shtml) -a free program that gives you a graphical representation of each folder’s usage:

It then allows you to quickly traverse the directory structure and identify the offending directory. There’s a load more information available through the easy-to-use interface but if all you want is a number it’s a little overkill.

The alternative to TreeSize

A heading? Just for this? Yes –this little tool is the Mac Daddy of directory size info as far as I’m concerned as it’s a free (we like free ;)) command line tool found on Microsoft’s site called “Directory Disk Usage” –DIRUSE.

DIRUSE is really easy to use, simply load up CMD and type in:
diruse /m /* c:\
and you’ll get a report of your chosen folder’s sub folders, related sizes and a count of the files within it. Ok it’s iteration can be a little slow but it gives you all the information you need quickly and easily.

The syntax is as follows:
DIRUSE [/S | /V] [/M | /K | /B] [/C] [/,] [/Q:# [/L] [/A] [/D] [/O]] [/*] DIRS

/S
Specifies whether subdirectories are included in the output.
/V
Output progress reports while scanning subdirectories.  Ignored if /S is specified.
/M
Displays disk usage in megabytes.
/K
Displays disk usage in kilobytes.
/B
Displays disk usage in bytes (default).
/C
Use Compressed size instead of apparent size.
/,
Use thousand separator when displaying sizes.
/L
Output overflows to logfile .\DIRUSE.LOG.
/*
Uses the top-level directories residing in the specified DIRS
/Q:#
Mark directories that exceed the specified size (#) with a "!".
(If /M or /K is not specified, then bytes is assumed.)
/A
Specifies that an alert is generated if specified sizes are exceeded. (The Alerter service must be running.)
/D
Displays only directories that exceed specified sizes.
/O
Specifies that subdirectories are not checked for specified size overflow.
DIRS
Specifies a list of the paths to check –you can use semicolons, commas, or spaces to separate multiple directories if required.

Note: Parameters can be typed in any order. And the '-' symbol can be used in place of the '/' symbol.

Also, if /Q is specified, then return code is ONE if any directories are found that exceed the specified sizes. Otherwise the return code is ZERO.

Example: diruse /s /m /q:1.5 /l /* c:\websitesfolder