HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- SQL Query to Show historic Drive Space Usage
Server Management - Systems Insight Manager
1829411
Members
2195
Online
109991
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 12:15 PM
08-18-2008 12:15 PM
SQL Query to Show historic Drive Space Usage
--Just posting this if anyone needs something like it.
select DATEADD(SECOND, Snapshot.CollectionDateTime / 1000, '19691231 20:00') AS CollectDate, R_LogicalDisks.DeviceName, R_LogicalDisks.Description, R_LogicalDisks.SizeMb, R_LogicalDisks.UsedMb, (R_LogicalDisks.SizeMb - R_LogicalDisks.UsedMb) AS FreeMB,R_LogicalDisks.UsedPercent from R_LogicalDisks
Left OUTER JOIN Snapshot on R_LogicalDisks.SnapshotID=SnapShot.SnapshotID
WHERE R_LogicalDisks.Description like '%Fixed%' AND NOT R_LogicalDisks.UsedMB is NULL AND NOT ((R_LogicalDisks.SnapShotID=-1) OR (R_LogicalDisks.SnapShotID is NULL)) AND DeviceKey in
(select devices.deviceKey from devices
LEFT OUTER JOIN notices ON devices.deviceKey = notices.deviceKey
LEFT OUTER JOIN DB_deviceInfoEx ON devices.deviceKey = DB_deviceInfoEx.deviceKey
LEFT OUTER JOIN IPAddress ON devices.deviceKey = IPAddress.deviceKey and IPAddress.ipIndex = 0
LEFT OUTER JOIN associated_device_data ON devices.deviceKey = associated_device_data.deviceKey
LEFT OUTER JOIN deviceProtocolInfo ON devices.deviceKey = deviceProtocolInfo.deviceKey
LEFT OUTER JOIN simAggrStatus ON devices.deviceKey = simAggrStatus.deviceKey
LEFT OUTER JOIN LockdownStatus ON devices.deviceKey = LockdownStatus.deviceKey
LEFT OUTER JOIN DeviceStatusValue ON devices.deviceKey = DeviceStatusValue.deviceKey and DeviceStatusValue.StatusSourceId= 6
JOIN consolidatedNodeAuths ON devices.mxGuid = consolidatedNodeAuths.NodeId and consolidatedNodeAuths.userID = '000000065b882db90000000400000007'
WHERE ( ( devices.productType = 1) ) )
order by R_LogicalDisks.DeviceName ASC, R_LogicalDisks.Description ASC, CollectionDateTime ASC
--order by R_LogicalDisks.UsedPercent DESC
select DATEADD(SECOND, Snapshot.CollectionDateTime / 1000, '19691231 20:00') AS CollectDate, R_LogicalDisks.DeviceName, R_LogicalDisks.Description, R_LogicalDisks.SizeMb, R_LogicalDisks.UsedMb, (R_LogicalDisks.SizeMb - R_LogicalDisks.UsedMb) AS FreeMB,R_LogicalDisks.UsedPercent from R_LogicalDisks
Left OUTER JOIN Snapshot on R_LogicalDisks.SnapshotID=SnapShot.SnapshotID
WHERE R_LogicalDisks.Description like '%Fixed%' AND NOT R_LogicalDisks.UsedMB is NULL AND NOT ((R_LogicalDisks.SnapShotID=-1) OR (R_LogicalDisks.SnapShotID is NULL)) AND DeviceKey in
(select devices.deviceKey from devices
LEFT OUTER JOIN notices ON devices.deviceKey = notices.deviceKey
LEFT OUTER JOIN DB_deviceInfoEx ON devices.deviceKey = DB_deviceInfoEx.deviceKey
LEFT OUTER JOIN IPAddress ON devices.deviceKey = IPAddress.deviceKey and IPAddress.ipIndex = 0
LEFT OUTER JOIN associated_device_data ON devices.deviceKey = associated_device_data.deviceKey
LEFT OUTER JOIN deviceProtocolInfo ON devices.deviceKey = deviceProtocolInfo.deviceKey
LEFT OUTER JOIN simAggrStatus ON devices.deviceKey = simAggrStatus.deviceKey
LEFT OUTER JOIN LockdownStatus ON devices.deviceKey = LockdownStatus.deviceKey
LEFT OUTER JOIN DeviceStatusValue ON devices.deviceKey = DeviceStatusValue.deviceKey and DeviceStatusValue.StatusSourceId= 6
JOIN consolidatedNodeAuths ON devices.mxGuid = consolidatedNodeAuths.NodeId and consolidatedNodeAuths.userID = '000000065b882db90000000400000007'
WHERE ( ( devices.productType = 1) ) )
order by R_LogicalDisks.DeviceName ASC, R_LogicalDisks.Description ASC, CollectionDateTime ASC
--order by R_LogicalDisks.UsedPercent DESC
- Tags:
- SQL
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP