[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

logwatch: patch for zz-disk_space



 
This patch for logwatch is usefull when there are device whit long name
into the first column:
 
#######################################
--- /etc/log.d/scripts/services/zz-disk_space.orig  2004-11-15
00:35:15.875785762 +0100
+++ /etc/log.d/scripts/services/zz-disk_space       2004-11-15
00:36:48.774989023 +0100
@@ -17,7 +17,8 @@
    echo
    echo "------------------ Disk Space --------------------"
    echo
-   df -h | grep '^/dev/'
+   #df -h | grep '^/dev/'
+   df -Ph|awk 'NR==1||$1~/^\/dev/ {printf("%-30s %7s %7s %7s %5s %s\n",
$1,
$2, $3, $4, $5, $6)}'
    echo
 elif [ "$PRINTING" = "y" ] ; then
    echo
#######################################
 
Example, on my FC3 system the df -h command show:
 
Filesystem         Dimens. Usati Disp. Uso% Montato su
/dev/mapper/Vol0-LvRoot
                      4,9G  2,1G  2,9G  43% /
/dev/hda1              92M  3,6M   88M   4% /boot
none                  121M     0  121M   0% /dev/shm
/dev/mapper/Vol0-LvHome
                      3,0G  184K  3,0G   1% /home
/dev/mapper/Vol0-LvU   24G   22G  2,1G  92% /u
/dev/mapper/Vol0-LvVar
                      3,9G   95M  3,9G   3% /var
 
The logwatch report show:
 
/dev/mapper/Vol0-LvRoot
/dev/hda1              92M  3,6M   88M   4% /boot
/dev/mapper/Vol0-LvHome
/dev/mapper/Vol0-LvU   24G   22G  2,1G  92% /u
/dev/mapper/Vol0-LvVar
 
and the view is not completed.

It is enough to signal this little problem to this ML or I must do some
other thing ?

Many thanks

-- 
Dario Lesca <d lesca solinos it>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]