| aug97.tar |
Questions and Answers
Bjorn Satdeva
mkdir /my/new/spool/dir cd /my/new/spool/dir (cd /usr/spool; tar -cvpf - lp ) | tar -xvpf - cd /usr/spool mv lp lp.ol ln -s /my/new/spool/dir/lp /usr/spool/lp
then restart the line printer daemon (or reboot the system). When you are certain that everything is working, you can remove the lp.old directory. This trick does help when you are short of disk space, but it should be seen as only a temporary solution. Otherwise, you run the risk of amassing a significant number of symbolic links, with nothing where you really expect it to be. If you create lots of such links, you end up with what I call the symbolic links from Hell. The result can be a situation in which each system is a special case unto itself, with the time required for maintaining each system steadily increasing. A better solution is to use a separate filesystem. You can then simply mount the filesystem you wish to use on the target directory (/usr/spool/lp) or, in this case, on the parent directory (/usr/spool). As a general configuration rule, I prefer not to have /usr/spool or /var directories on my root filesystem, the reason being that I try to make that filesystem as close to "read-only" as possible. Although the filesystem software in the kernel is much more solid today than it was a decade ago, large numbers of "write" accesses to the root filesystem, create the risk of serious damage. And as we all know, a severely damaged root filesystem is more difficult (read: time-consuming) to repair than any other filesystem on the machine.
The .z (lower-case) extension means that the file was compressed with the very old pack command, which is no longer in use because there are much more effective compression algorithms available today. A .Z (upper-case) extension means that the file has been compressed with the compress program, while a .gz extension means it was compressed by the GNU gzip program (which uses by far the most efficient compression algorithm). I have been told that unzip for MS-DOS will correctly uncompress files compressed with compress and gzip.
ifconfig le1 inet 165.227.19.1 netmask 255.255.255.0
The ifconfig should be placed in one of the rc files, together with the ifconfig command for the first interface card. Again, the exact location is vendor-dependent. If you have tcpdump or a similar program, you can see what information is going across the wire. You should be able to see traffic from the other systems on that network segment (unless you are using ethernet switches).
http://www.usenix.org/sage/jobs/jobs-descriptions.html
Any system administrator who does not know this document should have a look. You can also purchase a more complete version from USENIX with more explanatory information. I recommend that any system administrator who has to hire other system administrators or who is currently looking for another position get the full document and read it very carefully.
The behavior of the cron daemon is described in the crontab files, which are typically located in /var/spool/cron/crontabs. There is one crontab file for each user. cron reads these files when it starts, and it wakes up every minute to examine all stored crontabs to see if any command is supposed to be run at that time. When cron runs a command, the output of the command is emailed to the user whose crontab file contained the command. The commands are specified in the crontab file, one command to a line. Each line in a crontab file has six fields, separated by white space:
minutes hours day-of-month month day-of-week command
Figure 1 defines the fields. Figure 2 shows a crontab file with some entries I use.) The commands are executed when the minute, hour, and month fields match the current time, and when at least one of the two day fields (day-of-month, or day-of-week) match the current time. In the sample in Figure 2,, make is executed once an hour, at ten minutes before the top of the hour. The make file checks to see if any of the system files need updating. Since all of the day- and month-related fields are wildcarded, make is called every hour, and will update the files as needed. The monthly cleanup script (/etc/monthly) is specified to be executed at 5:30 AM on the first day of the month: the minute field is 30, the hour field is 5, the day-of-the-month is 1, and both month and day-of-the-week are wildcarded. The syntax of the crontab file gives you all the control you need. If, for example, you want to execute a command once a year, at 8:33 AM on the first Monday in January, the first five fields of the crontab file would look like this:
33 8 * 0 1
A word of warning: beware that shifts to and from Daylight Savings Time affect any command you choose to execute in the first hour of the day (hour zero). This hour disappears when Daylight Savings Time takes effect in the spring, but occurs twice with the shift back to standard time in the fall.
1. Cannot fork: Not enough memory on SUNOS 2. Cannot fork: Not enough space on SOLARIS.
With regard to tuning, I've tried set maxusers=60 on the SOLARIS; thus far I have not changed anything on the SUNOS.
A useful resource in this regard is Mike Loukides' System Performance Tuning, from O'Reilly and Associates. This book offers many hints for dealing with these issues, and includes very clear explanations of how to use vmstat to get information about what goes on inside your computer. The bottomline is that you probably need to add memory to your machines, but you need first to diagnose the specific problems and understand why they are occurring.
About the AuthorBjorn Satdeva is the president of /sys/admin, inc., a consulting firm which specializes in large installation system administration. Bjorn is also co-founder and former president of Bay-LISA, a San Francisco Bay Area user's group for system administrators of large sites. Bjorn can be contacted at /sys/admin, inc., 2787 Moorpark Ave., San Jose, CA 95128; electronically at bjorn@sysadmin.com; or by phone at (408) 241-3111.
|