We are experiencing problem that Kbox not showing correct Hard disk partition information of the machines where Red Hat Enterprise Linux 5.4 is installed. The situation becomes worst when we try to calculate the total HDD space via custom report, it is adding up MB and GB all together, so the size 4 GB in one partition and 800 MB in other partition becomes 804 . I am using the following SQL and it is working fine for my Windows XP and windows 7 machines.

SELECT MACHINE.IP AS MACHINE_IP ,sum(MACHINE_DISKS.DISK_SIZE) AS MACHINE_DISKS_DISK_SIZE, sum(MACHINE_DISKS.DISK_FREE) AS MACHINE_DISKS_DISK_FREE, sum(MACHINE_DISKS.DISK_USED) AS MACHINE_DISKS_DISK_USED FROM MACHINE_DISKS JOIN MACHINE ON (MACHINE.ID = MACHINE_DISKS.ID) group by MACHINE.IP ORDER BY MACHINE_DISKS.DISK_SIZE asc

Please note that we have most of the machines with 80 GB and more HDD size.

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Yes, I see the problem. I would open a ticket and log a bug but as a workaround you can use a query like this which parses the name to determine if the value is in Mb or Gb and translates all values in to Gb

SELECT MACHINE.IP AS MACHINE_IP ,
sum(MD.REAL_SIZE) AS MACHINE_DISKS_DISK_SIZE,
sum(MD.REAL_FREE) AS MACHINE_DISKS_DISK_FREE,
sum(MD.DISK_USED) AS MACHINE_DISKS_DISK_USED
FROM (
select *,
case when NAME RLIKE 'Total: [0-9]+[[...]]?[0-9]*M' THEN DISK_SIZE/1024
when NAME RLIKE 'Total: [0-9]+[[...]]?[0-9]*G' then DISK_SIZE
ELSE DISK_SIZE/1024/1024 /*KB*/ END REAL_SIZE,
case when NAME RLIKE 'Total: [0-9]+[[...]]?[0-9]*M' THEN DISK_FREE/1024
when NAME RLIKE 'Total: [0-9]+[[...]]?[0-9]*G' then DISK_FREE
ELSE DISK_FREE/1024/1024 /*KB*/ END REAL_FREE
FROM MACHINE_DISKS) MD
JOIN
MACHINE ON (MACHINE.ID = MD.ID)
group by MACHINE.IP
ORDER BY MD.DISK_SIZE asc
Answered 03/02/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
Thank you Gerald, I guess this will solve the MBs and GBs problme. Any idea to solve the problem number 1. that correct HDD size is not appearing from RHEL 5.4 machines. i mean to say that it is showing approx 20 GB size instead of 80 GB or more.

Regards,

Afzal
Answered 03/02/2011 by: afzal
Fourth Degree Green Belt

Please log in to comment
0
I would open a support ticket on that. An fstab contents and a du output would be helpful as a comparisons for them.
Answered 03/03/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
I appriciate if you could open a ticket meanwhile i will get the logs and screenshots


Regards,
Answered 03/05/2011 by: afzal
Fourth Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity