I want to know different kinds of practices that people are using to manage inventory of servers. What I mean by inventory of servers is basically database that tracks basic information of servers such as hostname, OS type, management ip address.

A Few solutions that I can think

  • Spreadsheet
  • Microsoft Access

What are other solutions? What is the pro and con of these solutions?


3 Answers 3


It's very simple, use a software that can do that for you, from my experience on the matter, I've used GLPI, it got all the details you might need and more.

You can enter all the details about the server for example RAM, CPU, DISK ect. and add a reference id to it, what network configuration it has, who uses that server.

You can create users accounts to alert if something is wrong with their computer by submitting a support ticket, the admin will notified by email so he can answer right away or fix the problem. and you will have all the history of the problems related to the computer.

GLPI is free open source software, it has a simple web interface that makes it easy even for non technical to use it.

  • 1
    Didn't know GLPI. I will have a look. Thanks!
    – kimh
    Oct 6, 2014 at 14:02
  • it's well know, and widely adopted, here some screen shot to get more idea about what it provides glpi-project.org/spip.php?article10
    – HXH
    Oct 6, 2014 at 14:05
  • 1
    I can't read French, but I could guess that it's very detailed inventory :)
    – kimh
    Oct 6, 2014 at 14:13
  • I didn't notice it hahha, yeah it has many languages support, like German, Spanish ... English is surely supported, just installed it on your linux local machine, configure the apache server, MySQL server and PHP, and you will have a Web application that solve the problem with more details that you need. I've using it for years, nothing will go missing, or problem history will server and knowledge base later on.
    – HXH
    Oct 6, 2014 at 14:26

I've used small databases or even csv files, with front-end interfaces added as required. For instance, a few tables in a MySQL database with some python or php code in front to provide a user-friendly interface for searches and modifications.

Of course this all requires an admin who is comfortable with these tools, but it means the rest of the user-base does not have to a) know the tools, b) have direct access to the data store, or c) look at the data the same way you do. You can create read-only views, add authentication, allow for remote access to the data, etc. Or you can do none of that, and just have a single csv file for one person to maintain. A database is better because you can add fields when you need them without drastic changes to the interface code.

  • Thanks for your comment. Yes, Mysql is definitely one of options. The problem, in my case, is that our server administrators do not know programming, so front-end might become an issue...
    – kimh
    Oct 6, 2014 at 13:51

Please try using the following visual basic script on the server and pull out the information such as Hostname, Make, Model, Biosversion, Operating System, Serial Number, CPU, Memory and Disk drives in a .csv file. Copy the code and save it as .vbs file. All you need to do is, modify the 6th and 7th lines with the respective paths. The text file must have the hostname or FQDN name of the server where it is going to be executed.

Hope this helps.

Option Explicit

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

Const PATH_TO_INPUT = "D:\MachineName.txt"
Const PATH_TO_OUTPUT = "D:\MachineInventory.csv"

Dim fso
Set fso = WScript.CreateObject("Scripting.FileSystemObject")

Dim shl
Set shl = WScript.CreateObject("WScript.Shell")

Dim input
Set input = fso.OpenTextFile(PATH_TO_INPUT)

Dim output
Set output = fso.CreateTextFile(PATH_TO_OUTPUT, True)

output.WriteLine "Hostname,Serial Number,Make,Model,BIOS Version,Operating System,CPU,Memory (MB),Disk Drives"

Dim wmiService
Dim wmiResults

Dim hostname
Dim make
Dim model
Dim biosversion
Dim operatingSystem
Dim serialNumber
Dim cpu
Dim memory
Dim drives

Dim line
Dim exec
Dim pingResults 
While Not input.AtEndOfStream
    line = input.ReadLine
    hostname = ""
    make = ""
    model = ""
    biosversion = ""
    operatingSystem = ""
    serialNumber = ""
    cpu = ""
    memory = ""
    drives = ""

    Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
    pingResults = LCase(exec.StdOut.ReadAll)

    If InStr(pingResults, "reply from") Then
        On Error Resume Next

        Set wmiService = GetObject("winmgmts:\\" & line & "\root\CIMV2")

        If Not Err.Number = 0 Then
            output.WriteLine line & ",Error: " & Err.Description
            WScript.Echo line & ",Error: " & Err.Description
            On Error GoTo 0
            On Error GoTo 0
            hostname = line

            Set wmiResults = wmiService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

            Dim item
            For Each item In wmiResults
                serialNumber = Trim(item.SerialNumber)
                biosversion = Trim(item.SMBIOSBIOSVersion)        

            Set wmiResults = wmiService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

            For Each item In wmiResults
                make = Trim(item.Manufacturer)
                model = Trim(item.Model)

            Set wmiResults = wmiService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

            For Each item In wmiResults
                operatingSystem = Trim(item.Name)
                operatingSystem = Split(operatingSystem, "|")(0)
                memory = Round(Trim(item.TotalVisibleMemorySize) / 1024, 2)

            Set wmiResults = wmiService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

            For Each item In wmiResults
                cpu = Trim(item.Name)

            Set wmiResults = wmiService.ExecQuery("SELECT * FROM Win32_LogicalDisk WHERE DriveType=3", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

            For Each item In wmiResults
                drives = drives & Trim(item.DeviceID) & "" & Round(Trim(item.Size) / (1024^2), 2) & ";  "

            output.WriteLine hostname & "," & serialNumber & "," & make & "," & model & "," & biosversion & "," & operatingSystem & "," & cpu & "," & memory & "," & drives
        End If
        output.WriteLine line & ",No Response"
        WScript.Echo line & ",No Response"
    End If


Set wmiService = Nothing
Set wmiresults = Nothing

Not the answer you're looking for? Browse other questions tagged .