locked
Get used disk space RRS feed

  • Question

  • I'm considering starting to buy 80GB disks for my workstations in my company. However I'm failing to create a report that returns used disk space so I can calculate the average disk space needed for new models.
    Friday, August 13, 2010 12:32 PM

Answers

  • I wasn't asking you to do that math yourself. I was saying let SQL do it for you.

     

    select

    v_R_System

    .Name0,

    v_GS_LOGICAL_DISK

    .Name0 as Drive,

    v_GS_LOGICAL_DISK

    .Size0/1024 as Size,

    v_GS_LOGICAL_DISK

    .FreeSpace0/1024 as FreeSpace,

    (

     

    Size0/1024-FreeSpace0/1024) as Used

    from

     

    v_R_System, v_GS_LOGICAL_DISK

    where

     

    v_GS_LOGICAL_DISK.DriveType0 = 3 and

    v_R_System

    .ResourceID = v_GS_LOGICAL_DISK.ResourceID

    • Marked as answer by HAL07 Wednesday, August 18, 2010 6:34 AM
    Saturday, August 14, 2010 4:57 PM

All replies

  • Have you looked at the following reports

    • Computers with low free disk space
    • Count physical disk Configuraitons
    • Disk information for a specific computer

     


    http://www.sccm-tools.com http://sms-hints-tricks.blogspot.com
    Friday, August 13, 2010 12:44 PM
  • none of them helps as im not looking for free disk space, not total disk size and not a specific computer.

    i need to get used disk space on all my computers.

    Friday, August 13, 2010 1:13 PM
  • Do they still make 80GB hard drives? If that's an upgrade from what you have now maybe you need to be buying new computers.

    Run this:

    select

     

    v_R_System.Name0, v_GS_LOGICAL_DISK.Name0 as Drive, v_GS_LOGICAL_DISK.Size0/1024 as Size, v_GS_LOGICAL_DISK.FreeSpace0/1024 as FreeSpace from v_R_System, v_GS_LOGICAL_DISK where v_GS_LOGICAL_DISK.DriveType0 = 3 and v_R_System.ResourceID = v_GS_LOGICAL_DISK.ResourceID


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    • Proposed as answer by John Marcum Friday, August 13, 2010 1:25 PM
    Friday, August 13, 2010 1:25 PM
  • yeah we rather want 80GB SSD than 200GB SATA disks where we only use 20-40GB anyways. Anything else is saved on network disks.

    that report returns free diskspace, and not used disk space? I would very much like to know used diskspace in GB please.

    Friday, August 13, 2010 1:37 PM
  • What I would do is change one of the reports to give you used space, or modify the Count physcial Disk configurations which feeds to the Computers with a specific hard disk size.  you subtract the size - freespace and find the MB of disk space used.

    There are many places to find where the disk size is depending on what report you look at:

    FileSys.UsedSpace0, LDISK.FreeSpace0, LDISK.Size0, 


    http://www.sccm-tools.com http://sms-hints-tricks.blogspot.com
    Friday, August 13, 2010 2:30 PM
  • The report I posted shows total space and free space. Simple math will get you used space. :-)

     


    John Marcum | http://myitforum.com/cs2/blogs/jmarcum |
    Saturday, August 14, 2010 12:31 AM
  • i don't get it, matthew. i cant see where i should replace it.

     

    john: i know. but i dont want to do math on all those computers :)

    Saturday, August 14, 2010 6:18 AM
  • I wasn't asking you to do that math yourself. I was saying let SQL do it for you.

     

    select

    v_R_System

    .Name0,

    v_GS_LOGICAL_DISK

    .Name0 as Drive,

    v_GS_LOGICAL_DISK

    .Size0/1024 as Size,

    v_GS_LOGICAL_DISK

    .FreeSpace0/1024 as FreeSpace,

    (

     

    Size0/1024-FreeSpace0/1024) as Used

    from

     

    v_R_System, v_GS_LOGICAL_DISK

    where

     

    v_GS_LOGICAL_DISK.DriveType0 = 3 and

    v_R_System

    .ResourceID = v_GS_LOGICAL_DISK.ResourceID

    • Marked as answer by HAL07 Wednesday, August 18, 2010 6:34 AM
    Saturday, August 14, 2010 4:57 PM
  • thank you very much. i found that my average disk use is 41GB.
    Wednesday, August 18, 2010 6:34 AM