Are there any CUPS settings that I can change to keep my Linux print queues from going down?

The default CUPS (Linux print spooler) settings have been shown to be reliable for Eclipse legacy printing at over 100 customer locations. In nearly all instances where print queues are consistently “going down,” a wide area network (WAN) issue has been proven to be the root cause. While working to resolve long-term networking issues, here are a few useful settings that can be adjusted to increase the amount of time allowed by CUPS before disabling a print queue

Timeout

The Timeout directive controls the amount of time CUPS will wait before an active HTTP or IPP request times out. The default timeout is 300 seconds (5 minutes), but this can be increased by modifying the /etc/cups/cupsd.conf configuration file, per the example below (1200 seconds or 20 minutes):

Timeout 1200

Maximum Job Limit

The MaxJobs directive controls the maximum number of jobs that are kept in memory. Once the number of jobs reaches the limit, the oldest completed job is automatically purged from the system to make room for the new one. If all of the known jobs are still pending or active then the new job will be rejected.

In a real-world scenario, if there is a printer down with a very large number of jobs in its queue this setting could cause printing to stop functioning server-wide. For this reason, and to ensure there are no hidden hardware or network issues, it is important to periodically monitor the number of jobs in the print queues (using the lpstat or similar tools).

If you regularly submit more than a few hundred jobs at one time to a print queue, you may wish to increase this setting in /etc/cups/cupsd.conf, taking care not to raise it too high to avoid system crash or spooler filesystem from filling up from an out of control print job.

By default, CUPS limits the number of active jobs at any one time to 500, but this can be increased to a larger value or be disabled entirely by setting the value in /etc/cups/cupsd.conf to 0 per the example below:

MaxJobs 0

Resources

http://www.cups.org/documentation.php/doc-1.3/ref-cupsd-conf.html

How do I monitor my APC UPS over the network on Linux?

If you have an APC UPS with a network card, we recommend using the PowerChute Network Shutdown software provided and supported by APC.

Installation

Before getting started, download and review the PowerChute Network Shutdown documentation.

Download the software from APC’s website: PowerChute Network Shutdown v2.2.4 for Linux

mkdir /esupport/powerchute && cd /esupport/powerchute
wget -c ftp://restrict:Kop\$74\!@ftp.apc.com/restricted/software/pcns/224/linux/pcns224Linux.tar.gz
tar xzf pcns224Linux.tar.gz
./install.sh

Answer the questions as prompted. Here is an example of the installation process:

  • Do you accept the license agreement? yes
  • Enter the PCNS instance number: 1
  • Enter the installation directory: [ENTER] to accept default value of /opt/APC/PowerChute
  • Are you sure? yes
  • Enter the java directory? [ENTER] to use the included version of Java

Run the configuration script:

cd /opt/APC/PowerChute/group1/
./PCNSConfig.sh

Configuration

You’ll be prompted to answer a series of questions. Here is an example of the configuration process:

  • Select the local IP address? 1
  • Select the netmask: [Enter] to select the default (255.255.255.0)
  • Select the type of configuration: [1]: Configure for a single UPS device
  • Management card IP: 192.168.1.101
  • Management card port: 80
  • Administrator user name: apc
  • Administrator password: apc
  • Authentication phrase: batterybackupsrule
  • Do you wish to register these settings? Yes

Support

How do I contact APC for support?

    How do I allow more than 10 telnet sessions from an IP on Linux?

    By default, RHEL limits the number of telnet connections from a single host to 10 simultaneous sessions. This is a security feature, but can be a problem in thin-client environments where many legitimate users connect from the same source IP address. To raise the limit:

    • Open the /etc/xinetd.conf file for editing
    vim /etc/xinetd.conf
    • Find the line containing the “per_source” value
    • Increase the integer from 10 to an appropriately-sized value for your environment
    • Save the configuration file
    • Reload xinetd
    service xinetd reload

    How do I mount an NTFS drive in Linux?

    The following procedure can be used to mount an NTFS partition — for example, an external USB drive formatted for use in Windows — for use in Linux:
    rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
    • Install the fuse-ntfs-3g package:
    yum -y install fuse-ntfs-3g

    • Create a mount point:
    mkdir -p /mnt/usb
    • Find the device ID and partition number (ie /dev/sdc2):
    fdisk -l
    • Update /etc/fstab:
    cp /etc/fstab /etc/fstab.`date +%Y%m%d.%H%M%S`
    vim /etc/fstab
    /dev/sdc2               /mnt/usb         ntfs-3g rw,umask=0000,defaults 0 0
    • Mount the drive:
    mount /mnt/usb