cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stiwa
Champion Sweeper
Hi,

i need a report, where i can see all assets with a SSD and less than 10% free disk space.
Anyone capable of doing this?
Thanks.
1 ACCEPTED SOLUTION
Bruce_B
Lansweeper Alumni
Getting a can't divide by zero error would indicate that either the freespace value or the size value for one of your disk drives is 0. We've adjusted the report to exclude these values.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDiskdrives.Volumename,
Ceiling(tblDiskdrives.Size / 1024 / 1024 / 1024) As [Max size in GB],
Ceiling(tblDiskdrives.Freespace / 1024 / 1024 / 1024) As [Free Space in GB],
tblDiskdrives.FileSystem,
tblDiskdrives.Description,
tblDiskdrives.Caption,
tblDiskdrives.Compressed,
(tblDiskdrives.Freespace / tblDiskdrives.Size) * 100 As [Percent Free Space],
tblFloppy.Model,
tblFloppy.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblFloppy On tblAssets.AssetID = tblFloppy.AssetID
Where (tblDiskdrives.Freespace / tblDiskdrives.Size) * 100 < 10 And
(tblFloppy.Model Like '%SSD%' Or tblFloppy.Model Like '%Solid State%') And
tblAssetCustom.State = 1 And tblDiskdrives.Freespace > 0 And
tblDiskdrives.Size > 0
Order By tblAssets.AssetName,
tblDiskdrives.Caption

View solution in original post

11 REPLIES 11
stiwa
Champion Sweeper
I get an error:

error while getting report
Fehler aufgrund einer Division durch Null.

= error due to division by zero
Bruce_B
Lansweeper Alumni
Hi,

Hard Drives are scanned using WMI(Windows Management Instrumentation) a management framework built into Windows operating systems. Microsoft has not added an identifier for SSD's in the hard drive WMI class. As such SSD's aren't directly identifiable in Lansweeper, but it might be possible to filter on them if their modelname has %SSD% in it or %Solid State%. You can adjust these filters in the report below if you find a different SSD identifier, or remove them to get all types of hard drives.

For instructions on how to add a report to Lansweeper, you can consult this post

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDiskdrives.Volumename,
Ceiling(tblDiskdrives.Size / 1024 / 1024 / 1024) As [Max size in GB],
Ceiling(tblDiskdrives.Freespace / 1024 / 1024 / 1024) As [Free Space in GB],
tblDiskdrives.FileSystem,
tblDiskdrives.Description,
tblDiskdrives.Caption,
tblDiskdrives.Compressed,
(tblDiskdrives.Freespace / tblDiskdrives.Size) * 100 As [Percent Free Space],
tblFloppy.Model,
tblFloppy.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblFloppy On tblAssets.AssetID = tblFloppy.AssetID
Where (tblDiskdrives.Freespace / tblDiskdrives.Size) * 100 < 10 And
(tblFloppy.Model Like '%SSD%' Or tblFloppy.Model Like '%Solid State%') And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
tblDiskdrives.Caption