Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Creating a report to list computers by C: drive size

Created: 02 Aug 2012 • Updated: 07 Aug 2012 | 4 comments
This issue has been solved. See solution.

We have a number of servers in our environment with tiny C: drives.  I'd like to write a report for Altiris (7.1) that will allow me to list all servers with a C: drive smaller than 20gigs.  Anyone have advice on how to word that query?

Thanks,

Erica

Comments 4 CommentsJump to latest comment

JimChud's picture

This should get you in the right direction.

This should give you an indication of what you need and you can add os parameters in if you need it:

SELECT
   [vri3_Computer].[Guid] AS [_ItemGuid],
   [vri3_Computer].[Name],
   [ajs8_vHWComputerSystem].[Model],
   [dca5_AeX AC Identification].[Hardware Serial Number],
   [ld].[Size (Bytes)] / (1024 * 1024) [Disk Size(MB)],
   [ld].[Free Space (Bytes)] / (1024 * 1024) [Free Space (MB)],
   [dca6_HW Computer System].[Number Of Processors],
   [dca6_HW Computer System].[Total Physical Memory (Bytes)],
   [dca5_AeX AC Identification].[OS Name] AS [OSName],
   [dca4_AeX AC TCPIP].[IP Address],
   [dca4_AeX AC TCPIP].[MAC Address],
   [dca5_AeX AC Identification].[Domain],
   [ajs8_vHWComputerSystem].[Manufacturer]

FROM
   [vRM_Computer_Item] AS [vri3_Computer]
      LEFT OUTER JOIN [Inv_AeX_AC_TCPIP] AS [dca4_AeX AC TCPIP]
         ON ([vri3_Computer].[Guid] = [dca4_AeX AC TCPIP].[_ResourceGuid])
      LEFT OUTER JOIN [Inv_AeX_AC_Identification] AS [dca5_AeX AC Identification]
         ON ([vri3_Computer].[Guid] = [dca5_AeX AC Identification].[_ResourceGuid])
      LEFT OUTER JOIN [Inv_HW_Computer_System] AS [dca6_HW Computer System]
         ON ([vri3_Computer].[Guid] = [dca6_HW Computer System].[_ResourceGuid])
      LEFT OUTER JOIN ([vComputer] AS [ajs7_vComputer]
         LEFT OUTER JOIN [vHWComputerSystem] AS [ajs8_vHWComputerSystem]
            ON ([ajs7_vComputer].[Guid] = [ajs8_vHWComputerSystem].[_ResourceGuid]))
         ON ([vri3_Computer].[Guid] = [ajs7_vComputer].[Guid])
   LEFT JOIN dbo.vHWLogicalDisk AS ld
  ON [vri3_Computer].[Guid] = ld._ResourceGuid
WHERE
 [ld].[Logical Disk Type] = 3 AND
 [ld].[Name] = 'C:' AND
    [ld].[Size (Bytes)] / (1024 * 1024) < 20000

Regards Jim.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem and give a thumbs up to useful comments, articles and downloads.

SOLUTION
JimChud's picture

Hi,

Did this solve your problem?

Regards Jim.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem and give a thumbs up to useful comments, articles and downloads.

Erica_Palmer's picture

Yes, thank you very much.  This definitely got me going in the right direction.  And reminded me that I really need to brush up on my SQL.

JimChud's picture

Glad i could help, i know the feeling about the SQL. its a regular uphill battle :)

Regards Jim.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem and give a thumbs up to useful comments, articles and downloads.