Bug 169918 - logwatch doesn't print disk space values for long device paths
logwatch doesn't print disk space values for long device paths
Status: CLOSED DUPLICATE of bug 152419
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: logwatch (Show other bugs)
4.0
noarch Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-05 01:26 EDT by Don Buchholz
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 03:04:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Don Buchholz 2005-10-05 01:26:24 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc3 Firefox/1.0.7

Description of problem:
The default logwatch configuration prints a small "Disk Space" table at the end of every daily report.  When reporting disk usage on a filesystem with a long device name (e.g. an LVM logical volume named "/dev/mapper/VGexp00-img00") only the device name will be reported.  

It's a bit of a problem, as the LVM volume(s) are the one(s) I'm really concerned with monitoring for disk usage.



Version-Release number of selected component (if applicable):
logwatch-5.2.2-1.noarch.rpm

How reproducible:
Always

Steps to Reproduce:
1.  Read daily LogWatch report
2.
3.
  

Actual Results:  My daily report now contains:

   ------------------ Disk Space --------------------
   
   /dev/sda2             9.4G  1.6G  7.5G  17% /
   /dev/sda1              99M   11M   83M  12% /boot
   /dev/sda5             7.6G   94M  7.1G   2% /var
   /dev/sda6             7.6G   59M  7.1G   1% /var/www
   /dev/mapper/VGexp00-img00
   
   
   ###################### LogWatch End ######################### 




Expected Results:  I expect to see values for the last filesystem.

   ------------------ Disk Space --------------------
   
   /dev/sda2             9.4G  1.6G  7.5G  17% /
   /dev/sda1              99M   11M   83M  12% /boot
   /dev/sda5             7.6G   94M  7.1G   2% /var
   /dev/sda6             7.6G   59M  7.1G   1% /var/www
   /dev/mapper/VGexp00-img00
                         897G  277G  602G  32% /export/img00
  
   
   ###################### LogWatch End ######################### 




Additional info:

In the script, /etc/log.d/scripts/services/zz-disk_space, the report is generated using the command:

    df -h | grep '^/dev/'

The problem can be solved by adding the "-P" option to df(1):
 
    df -Ph | grep '^/dev/'

My case can be made a bit prettier with:

    df -Ph |
      grep '^/dev/' |
      awk '{printf("%-25s  %6s %6s %6s  %4s %s\n",$1,$2,$3,$4,$5,$6);}'

And we can get our column headers back with:

    df -Ph |
      egrep '^(Filesystem|/dev/)' |
      awk '{printf("%-25s  %6s %6s %6s  %4s %s\n",$1,$2,$3,$4,$5,$6);}'
Comment 1 Ivana Varekova 2005-10-05 03:04:31 EDT

*** This bug has been marked as a duplicate of 152419 ***

Note You need to log in before you can comment on or make changes to this bug.