• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to enable CUPS Debugging on CentOS/RHEL

by admin

Steps below will guide how to configure CUPS to produce debug information and how to capture it.

Configuration

1. Open the cups configuration file /etc/cups/cupsd.conf with a text editor.

# vi /etc/cups/cupsd.conf

It would look something like this:

MaxLogSize 0
#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

or

#
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $"
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel info

2. We need to edit the LogLevel line to look like the following:

LogLevel debug2

3. Save the file now.

How to Capture the Log

1. Open two different terminal windows as a root user.

2. In one of the Terminal Run the following command:

# tail -f /var/log/cups/error_log > /tmp/cups_debug_error.txt

Let this command run while the following steps are performed.

3. In the other terminal, do the following:

# service cups restart

4. Now follow the steps to recreate the Issue which you are facing with the Printer.

– One the first Terminal, Press, Ctrl-C to Stop the tail command.

– Once the logs have been captured, reset the Loglevel to the default and restart the cups service.

More options with LogLevel

  • debug2 – Log everything.
  • debug – Log almost everything.
  • info – Log all requests and state changes.
  • warn – Log errors and warnings.
  • error – Log only errors.
  • none – Log nothing.

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. chmod: command not found
  2. Server Application Getting “connection refused” From Remote Servers [due to firewalld or iptables] – CentOS/RHEL 7
  3. flock: command not found
  4. How to create partitions inside loopback device
  5. virsh: command not found
  6. i3exit Command Examples in Linux
  7. pvresize Command Examples in Linux
  8. mount: command not found
  9. sudo Command Examples in Linux
  10. How to enable bind query logging to find out Who’s Querying a Name Server

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright