To know the size of each database file, Kankuru executes the method GetFileSize in KMO/KServer. The first parameter is a smo server and the second is an enum (basically data or log file).

I collect file size in sys.master_files (except for tempDB) and used space from sys.sysfiles.

I use the default trace to know if a file recently increased.