- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- ProLiant Servers (ML,DL,SL)
- >
- Script to inventory hardware?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО09-17-2009 02:08 AM
тАО09-17-2009 02:08 AM
Script to inventory hardware?
I'm looking to do a count of all physical disks & ideally capacity across the server estate (100+ servers) so I can report on numbers & overall raw capacity.
I know I can query logical disk info/space etc. but it's the underlying hardware I'm after...
Any pointers would be appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 05:48 AM
тАО09-17-2009 05:48 AM
Re: Script to inventory hardware?
i have the script 4 you:
!!!!!! diskusage.vbs FILE START !!!!!!!!!
Const HARD_DISK = 3
strComputer = WScript.Arguments.Item(0)
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")
For Each objDisk in colDisks
Wscript.Echo "DeviceID: "& vbTab & objDisk.DeviceID
Wscript.Echo "Free Disk Space: "& vbTab & Round(objDisk.FreeSpace / 1048576) & " MB
" & vbCrLf
Next
!!!!!! diskusage.vbs FILE END !!!!!!!!!
If you have FULL WMI access from the network to the servers, you can:
1) generate a simple text list of servers that you want to monitor.
2) for each server in the list (you can iterate with a loop, if u want, see "*** section" later), launch that command:
cscript /NoLogo diskusage.vbs
** section. ONLY IF YOU DON'T HAVE FULL WMI ACCESS FROM NET:
correct diskusage.vbs second line as follows:
strComputer = "."
then schedule it to run ON THE SERVERS YOU WANT TO REPORT FOR.
BUT, create a network share on your mgmt_server and point the
*** section. How to iterate automatically from a simple text list:
!!!!!!!! all_srv_rpt.bat FILE START !!!!!!!!
@ECHO OFF
For /F "usebackq delims=; tokens=1,*" %%a IN ("list_of_servers.txt") DO(
cscript /NoLogo diskusage.vbs %%a >
)
!!!!!!!! all_srv_rpt.bat FILE END !!!!!!!!
PLACE THIS FILE IN THE SAME DIR OF THE VBS (OBV.LY...) OR TYPE THE FULL PATH OF IT INSIDE THIS.
**** section. You want to report more details 'bout disks.
take a look AT the object properties here:
http://msdn.microsoft.com/en-us/library/aa394173(VS.85).aspx
and then modify the VBS adding lines like the objDisk.FreeSpace, deleting the round function around it and substituting FreeSpace with the property name that you want to report.
-------------------------------------------------
I sincerely hope this helps you (it took 'bout half an hour for me to write it....)
Bye.
MS MCSA Server 2003
HP Accredited Integration Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 06:03 AM
тАО09-17-2009 06:03 AM
Re: Script to inventory hardware?
I'm looking to capture info relating to physical disks - i.e. what disks are installed into the server chassis, regardless of logical disks configured on them. I've already got scripts to capture free space etc. but what I'm trying to achieve is a count of how many of the following disks we have installed:
o 18gb
o 36Gb
o 72Gb
o 146Gb
o 300Gb
o 500Gb
etc.
I actually want to count the number of spindles within the estate, the free space within them I can already manage.
Sorry!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 06:59 AM
тАО09-17-2009 06:59 AM
Re: Script to inventory hardware?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 07:15 AM
тАО09-17-2009 07:15 AM
Re: Script to inventory hardware?
you can use:
to show all physicaldrive in the embedded Controller.
_______
if you want (or if some of the servers does not use controllers in slot=0) you can first obtain a list of controllers simply using:
Then, since scripting is not a problem here, you can manage the output and use it to feed the first command, iterated for each controller line.
HTH
:-)
MS MCSA Server 2003
HP Accredited Integration Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 07:21 AM
тАО09-17-2009 07:21 AM
Re: Script to inventory hardware?
@Diego - Ah, now you're talking! I'll certainly give it a go (never used ACU cli so it'll be a good thing to check out anyway :)
Not quite as streamlined as I hoped (i.e. not able to run such a script from a single machine) but it gets me closer than I am ATM.
Will report back tomorrow...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 07:22 AM
тАО09-17-2009 07:22 AM
Re: Script to inventory hardware?
sum the freespace value to a variable each time the loop goes, instead of printing it***.
after the loop print the variable in the output.
*** you can use operator to do this. example:
varName = varName + objDisk.FreeSpace
or
varName = varName + Round(objDisk.FreeSpace)
if you want to discuss it futher, open a new post and give the link. :-)
MS MCSA Server 2003
HP Accredited Integration Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 07:23 AM
тАО09-17-2009 07:23 AM
Re: Script to inventory hardware?
glad i had the right shot now.
i'll wait for the report. :-)
MS MCSA Server 2003
HP Accredited Integration Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2009 11:34 PM
тАО09-17-2009 11:34 PM
Re: Script to inventory hardware?
You can download Spiceworks, from Spiceworks.com.
Its a IT Helpdek ticketing solution, but also has full network inventory built in. You can configure it to scan what ever network segments you have. It will then list out everything it has found in a Inventory. As you drill down into each machine you can see the full info. How many disks, sizes, Ram, and how many in which slots etc..
Brilliant program, and its free.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2009 05:47 AM
тАО10-06-2009 05:47 AM
Re: Script to inventory hardware?
please, give points to contributors. :-)
MS MCSA Server 2003
HP Accredited Integration Specialist