→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BeatleUy
Engaged Sweeper II
Hi!

I found two issues when working with LANsweeper:

1) On the grid called "Computers in domain XXXXX" when you click the column title to sort data, some of them did not work. For example the column "Memory" is sorted this way: 190 MB then 2030 MB then 254 MB. It's like it sorts from left to right, not numeric. The same occurs with columns "Processor" and "IP address" .

2) LANsweeper (or WMI) did not detect correctly the number of processors of two or more identical computers. For example, I have three identical IBM computers with Intel Core 2 Duo, two of them are shown "2 * 1794 Mhz" while the other is "1 * 1794 Mhz", the same occurs with Intel Pentium IV Hyper Threading processors, only one of ten computers shows "2 * 2793 Mhz"...

Thanks in advance.
2 REPLIES 2
frendel
Engaged Sweeper
For problem 1, the reason for this is that it is returning the value as a string value (straight text) instead of a numerical value. As a string, it goes left to right to determine the sort. As a numerical value, it will sort properly. To solve this, at least for the memory, you have to do the following.

1st) In the Stored Procedure dbo.Wb30Computers, you have to find the line that states ' CAST(CAST(CAST(tblComputersystem.TotalPhysicalMemory AS bigint) / 1024 / 1024 AS NUMERIC) AS varchar) + ' MB' AS Memory '

and change it to ' CAST(CAST(CAST(tblComputersystem.TotalPhysicalMemory AS bigint) / 1024 / 1024 AS NUMERIC) AS numeric) AS Memory '

Basically, this will return the data as a numeric instead of a string. But to not get an error, you have to remove the + ' MB' portion otherwise it won't convert it properly.

2nd) This step is optional. If you want to show that it is still shown in MB (since it won't end in that anymore), you have to edit the it-alldomain.aspx page. Go to the line that states ' <td valign="middle" class="tblcell">Memory</td> ' and change it to ' <td valign="middle" class="tblcell">Memory (MB)</td> '. What this will do is in the column header on the webpage, it will show ' Memory (MB) ' which will show that the memory is in MB.

This will solve the memory sort problem. However, the processor and IP address are a bit different. I'm not sure it will allow the IP Address to be a numeric value (haven't tried) but for the processor, since it's showing number of processors, you'd probably have to set up a system in the Stored Procedure to have a new column saying "Number of Processors" which will hold the value (1, 2, whatever) and then have the column next to it be the actual speed. In which case, after that, it's the same as the memory. Change the Stored Procedure to return it as numeric (getting rid of the ' Mhz' part and then change the column header on the page to show that's how it's displaying the data.

Shouldn't be too hard...but so far we've not really found a need to sort by those columns but we did the Memory one just to see if it would work.
MTD
Engaged Sweeper
Hi,

i have the same problem with the number of the processors. Do you have found a solution for this problem ?

Thanks