4.19.2007

Linux printing with DELL 3100 CN

The goal I set out is to be able to print over the network from my Debian Etch laptop to a Dell 3100CN printer. The first part was just figuring out how to set the printer to have a static IP address. So I hit up the dell support site
for the manual. There is a web interface, but thats for noobs. I myself am a panel hacker. So below is how you would setup your network connectivity. Pay attention to the notes. Assigning an IP address is major stuff. You need an administrator for this or you could blow up your printer.

Assign an IP Address

An IP address is a unique number that consists of four sections that are delimited by a period and can include up to three digits in each section, for example, 111.222.33.44.

Assigning an IP address already in use can cause network performance issues.

NOTE: Assigning an IP address is considered as an advanced function and is normally done by a system administrator.
NOTE: Do not continue with this procedure until you have the following three addresses:
- IP Address
- Subnet Mask Address
- Gateway Address

For more information on using your operator panel, see "Operator Panel."

  1. Turn on the printer.

The Ready to Print appears.

  1. Press Menu.

  2. Press until Configure appears, and then press or .

  3. Press until Network appears, and then press or .

  4. Press until TCP/IP appears, and then press or .

  5. Press until IP AddressSetup appears, and then press or .

  6. Press until Panel appears, and then press .

  7. Press .

  8. Press until IP Address appears, and then press or .

  9. The cursor is located at the first digit of the IP address. Press to enter the numbers for the IP address.

  10. Press .

The cursor moves to the next digit.

  1. Repeat steps 10 and 11 to enter all of the digits in the IP address, and then press .

  2. Press .

  3. Press until Subnet Mask appears, and then press or .

  4. Repeat steps 10 to 11 to set Subnet Mask, and then press .

  5. Press .

  6. Press until Gateway Address appears, and then press or .

  7. Repeat steps 10 to 11 to set Gateway Address, and then press .

  8. Turn off the printer, and then turn it on again.
Okay, so you made it through the printer side configuration. Now, you get on your laptop and download Dell 3100 CN Postscript Printer Description File.
Then do the following:


1. Click "System" → "Administration" → "Printing"
2. Double Click "New Printer"
3. Click "Network Printer"
4. Choose "HP Jetdirect"
5. Enter of the printer
6. Choose "Install Driver..." and select the previously downloaded Dell_3100cn.ppd as the driver file
8. Select "Laser Printer 3100cn v3015.102 PS"
9. Enter the printer name, description, and location
10. Choose "Apply" and print test page.

Apparently, the above process is all good for Ubuntu. On Debian Etch, I was still having an issue, so I peeped out "/var/log/cups/error_log" and it was complaining about missing a file. So I busted out...
#cp /usr/local/src/Dell_3100cn.ppd /usr/share/ppd/
and now all is well. Mission accomplished. Time for a beer. ;)

Linux and open file descriptors

Increasing open file descriptors

I remember back in the day coming across file descriptors when running an ircd. In order to have a big bad ass ircd you would often need to increase the number of open file descriptors. By increasing this value, you can really push your server to the limit and whatever software you run on it.

A small number of open file descriptors (sockets) can significantly reduce both the performance of an Internet Server and the load that workload generator like httperf can generate. This is meant to provide some information about how to increase the limits on the number of open file descriptors (sockets) on Linux. Note: the actual numbers used below are examples. The numbers you should use will depend on weather you are modifying a system that will be used as a client or a server and the load being generated. In this example we increase the limit to 65535.

Also note that some of these steps may or may not be required depending on whether you are using PAM and if some of the stuff is being done remotely using ssh.

1. To check and modify system limits.

[The current limit shown is 8192]
% cat /proc/sys/fs/file-max
8192

[To increase this to 65535 (as root)]
# echo "65535" > /proc/sys/fs/file-max

If you want this new value to survive across reboots you can at it to /etc/sysctl.conf

# Maximum number of open files permited
fs.file-max = 65535

Note: that this isn't proc.sys.fs.file-max as one might expect.

To list the available parameters that can be modified using sysctl do

% sysctl -a

To load new values from the sysctl.conf file.

% sysctl -p /etc/sysctl.conf


2. Modify your software to make use of a larger number of open FDs.

[Find out where __FD_SETSIZE is defined]
% grep "#define __FD_SETSIZE" /usr/include/*.h /usr/include/*/*.h
/usr/include/bits/types.h:#define __FD_SETSIZE 1024
/usr/include/linux/posix_types.h:#define __FD_SETSIZE 1024

[Make a local copy of these files]
% cp /usr/include/bits/types.h include/bits/types.h
% cp /usr/include/linux/posix_types.h include/linux/posix_types.h

[Modify them so that they look something like
#define __FD_SETSIZE 65535

[Recompile httperf and/or your server so that it uses a larger file
descriptor set size by using -I include during compliation, this
will allow the compiler/preprocessor to use the new include files
rather than the default versions]

3. To check and modify limits per shell.

[Using csh: openfiles and descriptors show that the limit here is 1024]
% limit
cputime unlimited
filesize unlimited
datasize unlimited
stacksize 8192 kbytes
coredumpsize 0 kbytes
memoryuse unlimited
descriptors 1024
memorylocked unlimited
maxproc 8146
openfiles 1024

[To increase this to 65535 for all users (as root)]
# vi /etc/security/limits.conf

[Modify or add "nofile" (number of file) entries - note
that a userid can be used in place of *]
* soft nofile 65535
* hard nofile 65535

# vi /etc/pam.d/login
[Add the line]
session required /lib/security/pam_limits.so

[On many systems this will be sufficient - log in as a regular
user and try it before doing the following steps]

[These steps may be required depending on how PAM and ssh are configured
[Note on some systems - Debian?]
# vi /etc/pam.d/ssh
[Note on other systems - RedHat]
# vi /etc/pam.d/sshd
[Add the line]
session required /lib/security/pam_limits.so

# vi /etc/ssh/sshd_config
[May need to modify or add the line]
UsePrivilegeSeparation no

[Restart the ssh daemon]
[Note on some systems - Debian?]
# /etc/init.d/ssh reload
[Note on other systems - RedHat]
# /etc/rc.d/init.d/sshd reload


NOTE: it may still be necessary in some cases to adjust the limits manually.

In tcsh
limit descriptors 65535

In bash
ulimit -n 65535

Thanks for the bulk of this post.
http://bcr2.uwaterloo.ca/~brecht/servers/openfiles.html

4.14.2007

Meet Linux

Novell's funny answer clips to those Mac versus Windows PC television commercials. My favorite one is clip 3. :)

Meet Linux.