6 Replies Latest reply on Sep 21, 2011 5:45 AM by evizintin

    Number of FREE Memory Slots in the Inventory

    Rookie

      I did not found an entry in the Inventory DB that show the number of free memory slots.

      Memory slot.jpg

      Any one knows if the value exist or how I can have this number?

       

      Is possible to have a new entry in the Inventory named "Number of FREE Slots"?

       

      Thank you and regards,

       

      Eduardo.

        • 1. Re: Number of FREE Memory Slots in the Inventory
          Specialist

          Hi!

           

          You can use this:

          In the query select: Computer.Memory.Slots.Memory Slot.Installed Size = 0 MB

           

          Then Select Columns and include: Computer.Memory.Slots.Memory Slot.Number

           

          This  will return a list of all memory slots that do not have any memory in  them.

          A computer will show up multiple times if it has multiple empty  slots.

           

          Best Regards

          Troga

          1 of 1 people found this helpful
          • 2. Re: Number of FREE Memory Slots in the Inventory
            Rookie

            Tks Troga for your suggestion, I will do it for now.

             

            Any one knows if is possible to request to LANDesk to add a new entry in the Inventory named "Number of FREE Slots" or something like that? If yes, how to do?

             

            PS: I am new in LANDesk Community.

             

            Edu

            • 3. Re: Number of FREE Memory Slots in the Inventory
              Specialist

              Hi!

               

              There is a Section "Enhancement Requests".

              You can make a New Request there and people can vote for it.

               

              Best Regards

              Troga

              • 4. Re: Number of FREE Memory Slots in the Inventory
                Catalysttgj Expert

                check out this other thread. I posted an LDMS query on this thread that you might find useful. Its not exactly what you're asking for, but you could in theory use it to gen out an excel csv file that would have columns for each memory slot, and then just total up the columns with 0's. This way you wouldn't get a list of duplicate line items, but rather a column per memory slot. You may need to add more columns. The one i made only has i think 8 slots populated, but you can easily expand this.

                 

                Beyond this, do you have access to your DB to run/write sql queries? If so, it would be pretty simple to get this same info that way. I'll look for the db table that contains this data. I've scanned through the tables enough. I think i know where it is. I'll post it soon.

                 

                cheers,

                g;-)

                • 5. Re: Number of FREE Memory Slots in the Inventory
                  Catalysttgj Expert

                  Alright, if you're ready for some deep magic, here is an SQL query that can get the data you're after. This does a little more than just produce a count of slots that are unused. It also gets total slots, total memory, slots used, and slots unused, and it displays each slot, plus the devicename. The only trick is that this is a hardcoded script that only shows 8 slots. If you have a single device in your DB that has more than 8 slots, you'll need to expand this script to handle the total number of slots of the device that has the most slots. That should be pretty easy to figure out.

                   

                  This script was gen'd on a 2005 SQL server. Hope that's close to what you're running, otherwise it may or may not be coded effectively for what you have. Not sure on that. I'm not an SQL guru by any means. If anyone out there has suggestions for improvement, please tear it up!:

                   

                   

                  use (YOUR LANDESK DB NAME GOES HERE)
                  go
                  select
                  c.devicename,
                  (case when M0.InstalledSize is null then 0 else M0.InstalledSize end) +
                  (case when M1.InstalledSize is null then 0 else M1.InstalledSize end) +
                  (case when M2.InstalledSize is null then 0 else M2.InstalledSize end) +
                  (case when M3.InstalledSize is null then 0 else M3.InstalledSize end) +
                  (case when M4.InstalledSize is null then 0 else M4.InstalledSize end) +
                  (case when M5.InstalledSize is null then 0 else M5.InstalledSize end) +
                  (case when M6.InstalledSize is null then 0 else M6.InstalledSize end) +
                  (case when M7.InstalledSize is null then 0 else M7.InstalledSize end) as 'Total Memory',
                  (case when M0.InstalledSize is null then '-' else cast(M0.InstalledSize as varchar(10)) end) as Slot0,
                  (case when M1.InstalledSize is null then '-' else cast(M1.InstalledSize as varchar(10)) end) as Slot1,
                  (case when M2.InstalledSize is null then '-' else cast(M2.InstalledSize as varchar(10)) end) as Slot2,
                  (case when M3.InstalledSize is null then '-' else cast(M3.InstalledSize as varchar(10)) end) as Slot3,
                  (case when M4.InstalledSize is null then '-' else cast(M4.InstalledSize as varchar(10)) end) as Slot4,
                  (case when M5.InstalledSize is null then '-' else cast(M5.InstalledSize as varchar(10)) end) as Slot5,
                  (case when M6.InstalledSize is null then '-' else cast(M6.InstalledSize as varchar(10)) end) as Slot6,
                  (case when M7.InstalledSize is null then '-' else cast(M7.InstalledSize as varchar(10)) end) as Slot7,
                  (case when M0.InstalledSize is null then 0 else 1 end) +
                  (case when M1.InstalledSize is null then 0 else 1 end) +
                  (case when M2.InstalledSize is null then 0 else 1 end) +
                  (case when M3.InstalledSize is null then 0 else 1 end) +
                  (case when M4.InstalledSize is null then 0 else 1 end) +
                  (case when M5.InstalledSize is null then 0 else 1 end) +
                  (case when M6.InstalledSize is null then 0 else 1 end) +
                  (case when M7.InstalledSize is null then 0 else 1 end) as 'Total Slots',
                  (case when M0.InstalledSize is null or M0.InstalledSize = 0 then 0 else 1 end) +
                  (case when M1.InstalledSize is null or M1.InstalledSize = 0 then 0 else 1 end) +
                  (case when M2.InstalledSize is null or M2.InstalledSize = 0 then 0 else 1 end) +
                  (case when M3.InstalledSize is null or M3.InstalledSize = 0 then 0 else 1 end) +
                  (case when M4.InstalledSize is null or M4.InstalledSize = 0 then 0 else 1 end) +
                  (case when M5.InstalledSize is null or M5.InstalledSize = 0 then 0 else 1 end) +
                  (case when M6.InstalledSize is null or M6.InstalledSize = 0 then 0 else 1 end) +
                  (case when M7.InstalledSize is null or M7.InstalledSize = 0 then 0 else 1 end) as 'Slots used',
                  (case when M0.InstalledSize = 0 then 1 else 0 end) +
                  (case when M1.InstalledSize = 0 then 1 else 0 end) +
                  (case when M2.InstalledSize = 0 then 1 else 0 end) +
                  (case when M3.InstalledSize = 0 then 1 else 0 end) +
                  (case when M4.InstalledSize = 0 then 1 else 0 end) +
                  (case when M5.InstalledSize = 0 then 1 else 0 end) +
                  (case when M6.InstalledSize = 0 then 1 else 0 end) +
                  (case when M7.InstalledSize = 0 then 1 else 0 end) as 'Slots unused'
                  from computer as c
                  left outer join MemorySlot as M0 on c.computer_idn = M0.computer_idn and M0.SlotNo = 0
                  left outer join MemorySlot as M1 on c.computer_idn = M1.computer_idn and M1.SlotNo = 1
                  left outer join MemorySlot as M2 on c.computer_idn = M2.computer_idn and M2.SlotNo = 2
                  left outer join MemorySlot as M3 on c.computer_idn = M3.computer_idn and M3.SlotNo = 3
                  left outer join MemorySlot as M4 on c.computer_idn = M4.computer_idn and M4.SlotNo = 4
                  left outer join MemorySlot as M5 on c.computer_idn = M5.computer_idn and M5.SlotNo = 5
                  left outer join MemorySlot as M6 on c.computer_idn = M6.computer_idn and M6.SlotNo = 6
                  left outer join MemorySlot as M7 on c.computer_idn = M7.computer_idn and M7.SlotNo = 7
                  where c.devicename is not null
                  • 6. Re: Number of FREE Memory Slots in the Inventory
                    Rookie

                    Tks Catalysttgj, is very cool to know that we can go deep in the LDMS DB .

                     

                    I will try it.

                     

                    rgds

                     

                    Edu