• Facebook
  • RSS Feed
  • Instagram
  • LinkedIn
  • Twitter
Sep 052011
 

file000978694068Introduction

Many customers have Vault Cache configured to download all or part of an end-users archive (they have the Desktop Policy set to “Store all Items”). Downloading a large archive or even a subset of it, can take quite some time. Sometimes one of the issues is BITS. This article will help test BITS so you can eliminate it from your investigations.

Detail

BITS is Microsoft’s Background Intelligent Transfer Service, and was first discovered by users of Microsoft Windows with the Automatic Updates feature. This is where updates to Windows were trickled down from either Microsoft or an internal Windows Update server to end-user workstations (and then installed, or users notified). Bandwidth is automatically throttled with BITS and it supports suspend and resume.

To test BITS what we can do is set up a file of say 100 Mb in size on the Enterprise Vault server where the users archive is located, and from the end-users workstation we can use BITSADMIN to download that file. During the download we can monitor the progress.

 

Simple!  There is a bit more to it than that, so please carry on with the information below….

 

1. Creating a 100 Mb file on the EV Server

I nearly always use the Windows Resource Kit tool called creatfil.exe

creatfil testbitsfile.txt 102400

That will create a 100 Mb file in the current folder, called testbitsfile.txt

For our testing, lets first of all try it top level of the default web site, in my case that’s c:\inetpub\wwwroot.

Note: For this first test we’re not going to try to pull any data from the Enterprise Vault virtual directory or any of the other virtual directories which may actually have configuration issues (that we haven’t checked nor have we discovered).  So we are going for the top level of the web site first of all.

 

2. Checking BITS on the client

For this you need to use BITSADMIN. When you run it with /list /verbose you will see :

C:>bitsadmin /list /verbose
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
Listed 0 job(s).

That’s from a Windows XP workstation.  It will be similar from other Operating Systems, for example this is Windows 7:

BITSADMIN version 3.0 [ 7.5.7601 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows.
Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets.
Listed 0 job(s).

3. Creating the copy job

Using BITSADMIN do the following :

C:>bitsadmin /create /download testjob
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
Created job {EA0CC157-1C36-4987-A121-755B648C838A}.

You can then see basic information about the job :

C:>bitsadmin /list /verbose
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
GUID: {EA0CC157-1C36-4987-A121-755B648C838A} DISPLAY: 'testjob'
TYPE: DOWNLOAD STATE: SUSPENDED OWNER: EVxyz1
PRIORITY: NORMAL FILES: 0 / 0 BYTES: 0 / 0
CREATION TIME: 9/5/2011 5:41:46 AM MODIFICATION TIME: 9/5/2011 5:41:46
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 0
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
DESCRIPTION:
JOB FILES:
NOTIFICATION COMMAND LINE: none
CUSTOM HEADERS: NULL
Listed 1 job(s).

4. Adding a file to the job

At this time we then add the file(s) to the job.

C:>bitsadmin /addfile testjob http://evault1/testbitsfile.txt c:\temp\testbitsfile.txt
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
Added http://evault1/testbitsfile.txt -> c:\temp\testbitsfile.txt to job.

Now we should see :

C:>bitsadmin /list /verbose
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
GUID: {FC300DCE-C4B6-406B-AAB2-5A58849FBCB0} DISPLAY: 'testjob'
TYPE: DOWNLOAD STATE: SUSPENDED OWNER: EVxyz1
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN
CREATION TIME: 9/5/2011 5:48:24 AM MODIFICATION TIME: 9/5/2011 5:48:35 AM
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 0
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
DESCRIPTION:
JOB FILES:
0 / UNKNOWN WORKING http://evault1/testbitsfile.txt -> c:\temp\testbitsfile.txt
NOTIFICATION COMMAND LINE: none
CUSTOM HEADERS: NULL
Listed 1 job(s).

5. Suspend and Resume the job

To start the job, you actually “resume” it :

C:>bitsadmin /resume testjob
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
Job resumed.

You can suspend the job in the same manner, using the /suspend switch, and resume it again… just for testing purposes, if you like.

 

6. Monitor the overall download

From the client, you can keep doing BITSADMIN /LIST /VERBOSE, or better still, in another DOS window do :-

BITSADMIN /MONITOR /REFRESH 1

When there are no jobs:

clip_image001

After creating the job:

clip_image002

When a download is happening:

clip_image003

14259 is the number of bytes downloaded to date, and will (hopefully!) go up.

When a download has finished:

clip_image004

At that time though, if you look at c:\temp you won’t see our test file. In order to get that there is one last step – you have to “complete” the job :

C:>bitsadmin /complete testjob
BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
Job completed.

And then we see :

C:>dir c:\temp\testbitsfile.txt
Volume in drive C has no label.
Volume Serial Number is E4A6-DDDC
Directory of c:\temp
09/05/2011 05:30 AM 104,857,600 testbitsfile.txt
1 File(s) 104,857,600 bytes
0 Dir(s) 1,086,599,168 bytes free

7. Review/resolve any errors

If your transfer / monitor window shows an error, then do a /list /verbose, and see what that shows you.. It’s usually quite helpful. Eg :

BITSADMIN version 3.0 [ 7.5.7000 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.
GUID: {0654125B-DAFC-40BC-B248-98E7E8FA67BB} DISPLAY: 'testjob'
TYPE: DOWNLOAD STATE: ERROR OWNER: EVxyz1
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN
CREATION TIME: 9/5/2011 5:58:56 AM MODIFICATION TIME: 9/5/2011 5:59:07 AM
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 1
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
ERROR FILE: http://evault1/testbitsfile2.txt -> c:\temp\testbitsfile.txt
ERROR CODE: 0x80190194 - The requested URL does not exist on the server.
ERROR CONTEXT: 0x00000005 - The error occurred while the remote file was being p
rocessed.
DESCRIPTION:
JOB FILES:
0 / UNKNOWN WORKING http://evault1/testbitsfile2.txt -> c:\temp\testbitsfile.txt
NOTIFICATION COMMAND LINE: none
CUSTOM HEADERS: NULL
Listed 1 job(s).

You can try also copying and pasting the URL in to a web browser to see what happens.

And from a different time in a different place (ie recycling electrons) :

BITSADMIN version 2.0 [ 6.6.2600.2130 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.
GUID: {87AB7825-DEFE-4583-9D52-5F7EEFD01DC8} DISPLAY: get-clienttest.gif
TYPE: DOWNLOAD STATE: ERROR OWNER: l3-af782robert_wilcox
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / UNKNOWN
CREATION TIME: 11/11/2008 09:31:47 MODIFICATION TIME: 11/11/2008 09:34:25
COMPLETION TIME: UNKNOWN ACL FLAGS:
NOTIFY INTERFACE: UNREGISTERED NOTIFICATION FLAGS: 3
RETRY DELAY: 600 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 1
PROXY USAGE: PRECONFIG PROXY LIST: NULL PROXY BYPASS LIST: NULL
ERROR FILE:    http://gpkvltstr1.enterprise.veritas.com/enterprisevault/clienttest.gif -> c:\temp\clienttest.gif
ERROR CODE:    0x80190191
ERROR CONTEXT: 0x00000005
DESCRIPTION:
JOB FILES:
        0 / UNKNOWN WORKING http://gpkvltstr1.enterprise.veritas.com/enterprisevault/clienttest.gif -> c:\temp\clienttest.gif
NOTIFICATION COMMAND LINE: none
Listed 1 job(s).

We got an error state :

0x80190191 =  HTTP 401
0x00000005 = Access Denied

 

Conclusion

As mentioned previously BITS will automatically throttle bandwidth usage, but for those people who don’t trust Microsoft software, or just want to be control freaks, you can have a Group Policy to throttle it too (and in fact was one of the early Vault Caches cases I worked one, and it caused great issues until it was discovered it was a GPO throttling things!). If the test download that you performed was AMAZINGLY slow, yet connectivity to the Enterprise Vault server is good, try (using appropriate credentials) to drag and drop the file using Windows Explorer from the Enterprise Vault server, to the client workstation. If that copy process is nice and quick, then suspect Group Policy interference!

Read more about that here.

BITS is used heavily for Content Cache data, so testing it, and eliminating it from any potential issues is an important step in getting to the resolution of some problems.

Maybe Enterprise Vault will use BITS for uploads of data … in the future???

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)