Machines with less than a specified amount of free disk space
This report lists all machines with a specific drive that has less than a specified amount of free disk space. Tweak the bolded items below to customize the report. You can get rid of the "AND (M.OS_NAME like '%XP%')" section if you don't care about the OS.
SQL Code:
SELECT M.NAME AS Machine, MD.DISK_FREE AS 'Free Space in GB' FROM MACHINE M
JOIN MACHINE_DISKS MD ON (MD.ID = M.ID)
WHERE (MD.NAME like '%Drive C%') AND (MD.DISK_FREE < 1.7) AND (M.OS_NAME like '%XP%')
ORDER BY M.NAME
SQL Code:
SELECT M.NAME AS Machine, MD.DISK_FREE AS 'Free Space in GB' FROM MACHINE M
JOIN MACHINE_DISKS MD ON (MD.ID = M.ID)
WHERE (MD.NAME like '%Drive C%') AND (MD.DISK_FREE < 1.7) AND (M.OS_NAME like '%XP%')
ORDER BY M.NAME
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
RichB
14 years ago
Here's a variation of that idea - looking for disks reporting more than 90% full:
SELECT M.NAME AS Machine, MD.PERCENT_USED AS 'Percent of Drive C Space Used' FROM MACHINE M
JOIN MACHINE_DISKS MD ON (MD.ID = M.ID)
WHERE (MD.NAME like '%Drive C%') AND (MD.PERCENT_USED > '90') AND (M.OS_NAME like '%XP%')
ORDER BY M.NAME
SELECT M.NAME AS Machine, MD.PERCENT_USED AS 'Percent of Drive C Space Used' FROM MACHINE M
JOIN MACHINE_DISKS MD ON (MD.ID = M.ID)
WHERE (MD.NAME like '%Drive C%') AND (MD.PERCENT_USED > '90') AND (M.OS_NAME like '%XP%')
ORDER BY M.NAME
Posted by:
airwolf
14 years ago
Posted by:
bsharding1982
13 years ago
Could you do this report but instead of a specific drive, report on the second drive? The reason I ask is because on some of our servers the second hard drive is D and some it is E, with the CD drive being the other letter. Basically just report on the available space on Disk #2 as listed in the inventory details page. Sorry if that doesn't make sense.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.