iPrint logs take a large amount of disk space

  • 7005751
  • 15-Apr-2010
  • 28-Apr-2014

Environment

Novell Open Enterprise Server 2 (OES 2) Linux
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 1
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 2

Novell iPrint for Linux Open Enterprise Server
Novell iPrint for Linux Open Enterprise Server Support Pack 1
Novell iPrint for Linux Open Enterprise Server Support Pack 2

Situation

In the default setup, iPrint will log to 3 files:

/var/log/apache2/error_log
/var/log/apache2/access_log
/var/log/apache2/ssl_request_log

The first log, error_log, will typically log only errors for iPrint (and other Apache based applications).  The other two files --

access_log & ssl_request_log -- will typically log every:

- printer status check
- job submission
- web page posting (to see printer list, install, etc.)

Therefore, depending on the number of printer & users, they can grow quite large.  Much of this information is typically not very useful for administration or day-to-day trouble shooting.  For example, the two logs might show:

access_log:
192.168.123.150 - - [13/Apr/2010:08:46:27 -0500]"POST /ipp/IppSrvr HTTP/1.1" 200 252
192.168.123.150 - - [13/Apr/2010:08:46:27 -0500]"POST /ipp/IPrint-Printer-Name1 HTTP/1.1" 200 313
192.168.123.150 - - [13/Apr/2010:08:46:44 -0500]"POST /ipp/IPrint-Printer-Name2 HTTP/1.1" 200 313
192.168.123.150 - - [13/Apr/2010:08:46:54 -0500]"POST /ipp/IPrint-Printer-Name3 HTTP/1.1" 200 313
192.168.123.150 - - [13/Apr/2010:08:47:21 -0500]"POST /ipp/IPrint-Printer-Name1 HTTP/1.1" 200 313
192.168.123.150 - - [13/Apr/2010:08:47:43 -0500]"POST /ipp/IPrint-Printer-Name2 HTTP/1.1" 200 313
192.168.123.150 - - [13/Apr/2010:08:47:43 -0500]"POST /ipp/IPrint-Printer-Name3 HTTP/1.1" 200 313


ssl_request_log:
[12/Mar/2010:22:38:57 -0600] 192.168.123.150 - - "POST /ipp/IPrint-Printer-Name1 HTTP/1.1" 72
[12/Mar/2010:22:39:12 -0600] 192.168.123.150 - - "POST /ipp/IPrint-Printer-Name2 HTTP/1.1" 318
[12/Mar/2010:22:39:12 -0600] 192.168.123.150 - - "POST /ipp/IPrint-Printer-Name3 HTTP/1.1" 72
[12/Mar/2010:22:39:18 -0600] 192.168.123.150 - - "POST /ipp/IPrint-Printer-Name4 HTTP/1.1" 318
[12/Mar/2010:22:39:27 -0600] 192.168.123.150 - - "POST /ipp/IPrint-Printer-Name5 HTTP/1.1" 72


As displayed above, these might be helpful for identifying what ip address is utilizing what printer (IPrint-Printer-NameX), they are typically very voluminous -- esp. if you have a limited amount of space available to /var/log.

Resolution

There are a two options for addressing this matter:

1) Activate or tune the logrotation function within Apache.
This is controlled by the /etc/logrotate.d/apache2 file.

2) Disable the logging of data to access_log and ssl_request_log.
To do so, you will need to modify 2 files -- /etc/sysconfig/apache2 and /etc/opt/novell/iprint/httpd/conf/iprint_g.conf -- in the following manner:

For /etc/sysconfig/apache2
  a) make a backup copy this file to a different location (i.e. cp /etc/sysconfig/apache2 /root/apache2-sysconfig.bkup)
  b) edit /etc/sysconfig/apache2
  c) comment out the following line:

     # APACHE_ACCESS_LOG="/var/log/apache2/access_log combined"

  d) add a similar line but with no blank value:

     APACHE_ACCESS_LOG=""

NOTE: this is a "default" logging directive for all virtual web servers running on a particular server.  By doing the above step, you will be turning off default access_log logging for all web servers.  If you have a virtual server defined for which you need/desire the access_log enabled, you will need to add a directive (as in TransferLog below) to that virtual server's definition.

For iprint_g.conf
  a) make a backup copy this file to a different name or location
     (i.e. cp /etc/opt/novell/iprint/httpd/conf/iprint_g.conf /etc/opt/novell/iprint/httpd/conf/iprint_g_conf.orig)
     NOTE: if you make a backup copy in the same location, and with a .conf extension,
     apache will execute both when it restarts and you will either see error messages or
     you will not receive the desired results.

  b) edit /etc/opt/novell/iprint/httpd/conf/iprint_g.conf and
     - comment out the TransferLog directive (to stop iprint from logging to access_log).  It will then look like:
     #   Transferlog  /var/log/apache2/access_log

     - comment out the CustomLog directive (to stop iprint from logging to ssl_request_log).  It will then look like:
     #    CustomLog /var/log/apache2/ssl_request_log \

3) test your setup:
   a) stop Apache2 with the following command:  rcapache2 stop
   b) rename or delete your /var/log/apache2/access_log and /var/log/apache2/ssl_request_log files
   c) start Apache2 with the following command:  rcapache2 start
        this will recreate empty log files that you just renamed in 3b.
   d) send some print jobs to one or two printers.

While you may see other applications writing to these two files, you will not see entries from iPrint.

Additional Information

With NetWare, there was an option to disable logging these types of events using ApacheAdmin, the web-based tool.
This tool does not exist for OES2 Linux, so the change must be made via the proper configuration file(s)..