Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find how much space TFS is using

Tags:

tfs-sdk

I'm tring to find out how much space TFS is using. Is there a simple check free space command on TFS?

Also is there a way to poll TFS for the amount of hard drive space left and see when large changes or large amount of files have been added and by whom for a given week or day?

like image 530
RetroCoder Avatar asked Jul 08 '11 00:07

RetroCoder


1 Answers

I'm tring to find out how much space TFS is using. Is there a simple check free space command on TFS?

Projects are not partitioned in the database in such a way that you can easily figure this out. Of course if you just want to see how much space all collections are using you can take a look at your db size.

Here is a good article to read that gives you a rough estimate of space used for files, work items etcetera.

Also is there a way to poll TFS for the amount of hard drive space left and see when large changes or large amount of files have been added and by whom for a given week or day?

TFS doesn't control the amount of HDD space you have left on your drive. You can however in code check this by doing something like:

using System.IO.DriveInfo

var drive = new DriveInfo("DRIVE_LETTER");
long freeSpace= drive.freeSpace;

As for your final question (see when large changes or large amounts of files have been added and by whom), this article demonstrates how to do what you are describing using TFS API.

like image 103
Mike Veigel Avatar answered Nov 26 '22 07:11

Mike Veigel