Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15382 - /usr/sbin/savelog uses gzip instead of bzip2 on log storage, 40% wasted space
Summary: /usr/sbin/savelog uses gzip instead of bzip2 on log storage, 40% wasted space
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-09 14:52 UTC by Frank Kruchio
Modified: 2003-03-07 19:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Kruchio 2003-02-09 14:52:01 UTC
I just noticed that gzip used in savelog and we only would need to change two 
constants in that script to make it work with bzip2.  
This can save space.  
 
The 2.6 MB syslog file compressed with bzip2 is much smaller:  
 
 
-rw------- 1 root root 148K Feb 9 14:25 syslog.1.bz2  
-rw------- 1 root root 589K Feb 9 14:26 syslog.1.compress.Z  
-rw------- 1 root root 270K Feb 9 14:28 syslog.1.gzipped.gz  
 
bzip2 compressed here 40% better than gzip -9  
 
I know its easy enough to change the savelog script but it would be nice to 
see bzip2 compression as the default.
Comment 1 Frank Kruchio 2003-02-09 14:57:17 UTC
Zhenlin posted the patch below for this bug on the forum: 
 
*** debianutils-1.16.3/savelog   Sun Feb  9 17:30:14 2003  
--- debianutils-1.16.3/savelog.orig   Sun Feb  9 17:29:19 2003  
***************  
*** 2,9 ****  
  # savelog - save a log file  
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll  
  #    Copyright (C) 1992  Ronald S. Karr  
- # Slight modifications by Low Zhen Lin <lowzl@hotmail.com>:  
- #   * uses `bzip2' rather than `gzip'  
  # Slight modifications by Ian A. Murdock <imurdock@gnu.ai.mit.edu>:  
  #   * uses `gzip' rather than `compress'  
  #   * doesn't use $savedir; keeps saved log files in the same directory  
--- 2,7 ----  
***************  
*** 71,78 ****  
   
  # common location  
  export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin  
! COMPRESS="bzip2 -9f"  
! DOT_Z=".bz2"  
   
  # parse args  
  exitcode=0   # no problems to far  
--- 69,76 ----  
   
  # common location  
  export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin  
! COMPRESS="gzip -9f"  
! DOT_Z=".gz"  
   
  # parse args  
  exitcode=0   # no problems to far  
 
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-07 19:09:04 UTC
added into portage in debianutils-1.16.7