/build/static/layout/Breadcrumb_cap_w.png

Kbox not showing correct Hard Disk size on RHEL 5.4

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

Answers (4)

Posted by: GillySpy 13 years ago
7th Degree Black Belt
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
Posted by: afzal 13 years ago
Fourth Degree Green Belt
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
Posted by: GillySpy 13 years ago
7th Degree Black Belt
0
I would open a support ticket on that. An fstab contents and a du output would be helpful as a comparisons for them.
Posted by: afzal 13 years ago
Fourth Degree Green Belt
0
I appriciate if you could open a ticket meanwhile i will get the logs and screenshots


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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ