Questions
and Answers
Amy Rich
The following suggestion was submitted by James Holtom for the
user who was having issues with FreeBSD crashing. I've certainly
had enough issues with ACPI myself that it's worth trying to disable
it (though that probably won't fix the disk fsck problem itself).
The correspondent with FreeBSD crash problems doesn't state what
version is being used. Looking at the panic message, I would suggest
that it is version 5.x, on account of the "Terminate ACPI" message
-- ACPI isn't found in the 4.x line. ACPI is a known cause of difficulties,
and a possible cause of crashes, and consequential file-system problems.
Try stopping ACPI from loading at boot time by including the line:
hint.acpi.0.disabled="1"
in file /boot/device.hints
Useful References:
http://www.freebsd.org/releases/5.1R/errata.html#late-news
http://www.freebsd.org/releases/5.1R/hardware-i386.html#proc
http://www.freebsd.org/cgi/man.cgi?query=acpi&sektion=4&manpath=FreeBSD+5.1-release
Q I'm running ISC's DHCP client, version
3.0.1rc11. I don't want DHCP to touch my /etc/resolv.conf file, because
I'm running my own DNS server. Is there some setting I can change
to tell dhclient not to touch this file?
A The script dhclient-script writes
information into /etc/resolv.conf. Instead of modifying this file
directly (since it will get overwritten if/when you upgrade), copy
it to another location and make your modifications there. Then,
specify the new script file in your dhclient.conf:
option script "/path/to/new/script-name";
Q I'm migrating our work servers from
Linux to Solaris. Is there a way to mount ext3fs partitions on a Solaris
machine so that I can copy over data?
A If you have both machines up
and running at the same time, you're probably better off using NFS
or running an archiving (tar, cpio, etc) process over the network
instead of trying to mount the filesystem directly. If you're trying
to hook the disk directly up to a machine running Solaris, you might
want to try using the Lxrun program mentioned at:
http://wwws.sun.com/software/linux/compatibility/lxrun/
Lxrun contains binary precompiled ext2fs modules for both SPARC and
Intel platforms. The modules only allow read-only access, but if you're
just copying information over from the old Linux disk, this should
be enough.
Q I've written an http server for
one department in our company that needs something stripped down
and fast. Just to make sure that I have actually improved performance
over the other servers that we were testing, I'd like to measure
the performance of my daemon. Can you suggest any tools that might
help?
A The Web Performance Tools at:
http://www.alphaworks.ibm.com/tech/wptools
should help you analyze performance for your traffic patterns. There
are two tools: stress and record. Stress is an HTTP engine that simulates
thousands of HTTP clients using parameters that you define. Record
is a proxy that preserves an HTTP session for later playback with
stress (so you can create some typical user sessions for stress testing).
The tools run on AIX, Windows, Linux, Solaris, and HP/UX.
Q Our network admin is trying to
convince us that we should use /31 networks for point-to-point links
(we're a small ISP). As far as I know, /31s won't give the users
any usable IPs, so this is rather pointless. Is my information incorrect?
A You don't say what sort of routers
you're using, so I'll pick IOS because it's one of the most popular.
Later versions of IOS allow you to use /31s on point-to-point links.
You don't need broadcast and network addresses. I think you can
also keep the interfaces listed as unnumbered if you're running
an older version of IOS. These should both leave you with two usable
IPs. For an example, take a look at:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080087aeb.html
Also see RFC 3021 for the best technical explanation:
http://www.faqs.org/rfcs/rfc3021.html
Q I'm struggling with the difference
between the ctime/atime/mtime dates on a file. What does each one
mean, and when does each one get updated?
A Each of these timestamps is relative
to the Epoch, January 1st, 1970 00:00:00, not 0 or 1 AD, so if you're
writing code, you need to account for that. The three timestamps
are as follows:
ctime - last inode change time since the epoch (NOT creation time)
mtime - last modification time since the epoch
atime - last access time since the epoch
The ctime changes when the inode itself is modified. This happens
when the file is modified, moved, copied, permissions or modes changed,
etc. The ctime of a directory is changed when you cd into it. You
can look at the file with less, more, ls, etc. without changing the
ctime.
The mtime changes when the file is written out (e.g., after editing,
being opened for writing by a process, etc.).
The atime changes when the file is read from (less, more, cat,
being opened for reading by any process). To view these timestamps
with ls, use the following switches:
ctime: ls -c
mtime: ls -t
atime: ls -u
Q I'm in the process of restricting
from whom I will accept mail. I'm running Solaris 9 and sendmail 8.9.12,
built from source. In my mc file (mailhub.mc), I have the following
line:
FEATURE(rhsbl,'dsn.rfc-ignorant.org','550 You do not accept bounces - http://www.rfc-ignorant.org/')
When I try to build my new cf file, I get the following error:
m4 /usr/lib/mail/m4/cf.m4 mailhub.mc > mailhub.cf
mailhub.mc:14: m4: Cannot open /usr/lib/mail/feature/rhsbl.m4: \
No such file or directory
Did I not install all parts of sendmail when I built it from source?
Is this file something I should have gotten elsewhere?
A rhsbl.m4 does not come with the
standard sendmail distribution or with Sun's distribution. You can
obtain it from:
http://www.megacity.org/software_downloads/rhsbl.m4
Since I'm guessing that you just copied this FEATURE line from someone
else's mc file, I strongly recommend that you read the contents at:
http://www.rfc-ignorant.org/
to understand what you'll actually be accomplishing with this FEATURE
line and how to get it to work correctly.
Q I've just switched from running
FreeBSD on an Intel laptop to using OS X on one of the new Apple
Powerbooks. I've been trying to get back to something resembling
my comfortable FreeBSD environment, so I've installed Apple's beta
3 X server. I was running ssh-agent under FreeBSD, and I'd like
to do the same with Apple's X server, but I'm not sure how. Under
FreeBSD, I was calling it as part of the startx script, but that's
not the way the Apple application works, as far as I can tell. Any
suggestions?
A If you've just purchased a new
Powerbook, presumably you're running OS X 10.2 or later. If so,
you want to look at sshLogin:
http://www.synthemesc.com/sshLogin/
This program is distributed as an OS X package file for use with the
installer utility. This will add a directory to the /Applications
directory and an icon to the System Preferences window. You can make
configuration changes and add multiple keys by clicking on that icon.
Also click on the Login Items icon under the System Preferences window
and make sure that sshAskPass is listed.
Q I need to measure the distance
between a cable drop and a switch in our machine room. The wire
is run through the walls and ceiling, so using physical methods
isn't going to work. Is there a piece of software I can use to measure
the wire distance, instead?
A Traceroute can give you an approximation,
but you'd be better off using a hardware solution to do your measuring.
If you want to do the math yourself, you can use an Ohm meter. If
you have the spare cash to spend, purchase something more complex
like an Ethernet analyzer or higher-end cable tester. Fluke has
a number of products that would fit the bill here, and a search
on Google for Fluke and "cable length" will turn up several good
choices.
Q I'm trying to do some system profiling
via cron using this command:
/usr/local/bin/top -d1 > /tmp/topfile
While this works from the command line, I always wind up with an empty
file from cron because top wants a tty. Is there another program I
should be using to get the same kind of information?
A If you want the information from
top, you can run it in batch mode from cron:
/usr/local/bin/top -bd1 > /tmp/topfile
Top is only going to show you a select number of processes, though.
You might also want to look into using programs like sar, ps, and
system process logging to get the information you're after.
Q I'm upgrading my Ultra 5 desktop
with a bigger disk, and I'm wondering what's the biggest one I can
put in that will still be supported by Solaris 8.
A Due to controller limitations,
Ultra 5 machines can only support up to 120G IDE drives.
Q I've been trying to get X to work
with a virtual OpenBSD machine running on top of VMware 3.x without
much success. I start with a Windows 2000 install, create an OpenBSD
virtual machine, and that works fine. Then I run xf86cfg and save
the configuration. When I exit the setup, I get fatal errors and
X doesn't work. Any hints?
A When asking questions, it's best
to give specific hardware details, software version numbers, and
list any patches/service packs that have been installed. You're
also more likely to get usable information if you provide the exact
error messages. That said, there's some information at:
http://frogger974.homelinux.org/
that may help you. This details installing OpenBSD as a guest OS under
VMware, including setting up X. Essentially, this page suggests using
the FreeBSD VMware tools with a few modifications. The page also includes
a link to a pre-made XF86Config file that may just work for you, depending
on your hardware.
Q I'm trying to use WinSCP on a
Windows 2000 machine to transfer files from a Solaris 8 server.
I'm able to upload files to the server just fine, but when I try
to download them, I get the following error:
Error listing directory "/home/brk".
Unexpected directory listing line "drwxr-xr-x 13 brk 1536 Aug 19 09:01 .".
Operation aborted
I have a Linux machine that works fine with the exact same commands,
though. Is WinSCP unusable with Solaris, or is this something I can
fix?
A Based on the error you report,
it looks like you're using /usr/ucb/ps, which doesn't print out
the group name unless it's given the -g flag. You want to switch
to having /usr/bin in your path first, or perhaps /usr/local/bin,
if you have GNU ps installed. Both of these ps binaries will include
the group in the file listing. There's an issue that has a similar
error message if there is no execute permission on the directory
that you're trying to connect to. That's not the case here, though,
as evinced by the drwxr-xr-x portion of the error output.
Q I've just moved to FreeBSD 5.0-RELEASE
from FreeBSD 4.8-STABLE, and a number of things seem to have just
stopped working. I can no longer make entries in /dev for things
like apm or my sound card (/dev/MAKEDEV is gone, too). My wireless
card no longer gets started automatically, and I have to run dhclient
by hand to get it to come up. Is FreeBSD 5.0-RELEASE really this
unusable, or are there simple fixes that I'm overlooking?
A There are some big design changes
between 4.8-STABLE and 5.0-RELEASE. Also, 5.0-RELEASE is still buggy
in some places and isn't meant to take the place of a -STABLE release
like 4.8-STABLE. If you're interested in playing with the OS and
reporting bugs, then 5.0-RELEASE is a good choice. If you want something
that's just going to work out of the box, you may want to stay with
the 4.x-STABLE releases for now. If you choose to stick with 5.0,
read all of the information available on 5.0 (in the upper right-hand
corner) at the FreeBSD Web page: http://www.freebsd.org/.
Now to answer your specific questions. To begin, /dev is no longer
a part of the root filesystem. It's a new type of filesystem called
devfs. Under devfs, the files you need are automatically created
when you load drivers. Take a look at the devfs man page for more
information.
The sound modules are not loaded by default. You can load them
at boot time by adding the following line to /boot/loader.conf (this
will load ALL of the sound drivers):
snd_driver_load="YES"
This should load a slew of sound modules and create the corresponding
entries in /dev each time you reboot.
As for apm, it has been replaced by ACPI. See the man pages for
acpi, acpiconf, and acpidump for more information. In /boot/device.hints,
apm is disabled with:
hint.apm.0.disabled="1"
If you'd like to switch back to apm, change that line to:
hint.acpi.0.disabled="1"
Add the following to /boot/loader.conf:
apm_load="YES"
Again, you'll want to reboot after making these changes.
Finally, you were probably using pccardd to start and configure
your wireless card. These things should now be under the control
of devd. You can add the following line to your /etc/rc.conf to
turn devd on:
devd_enable="YES"
You might also have lines something like the following in /etc/rc.conf
from your previous 4.8-STABLE install:
pccard_enable="YES" # enable pccard devices
pccard_conf="/etc/pccard.conf" # use alternate pccard.conf file
pccard_mem="0xd8000" # location for pccard
pccard_ifconfig="DHCP" # use DHCP to bring up wireless card
Q We have a dynamic IP from our cable
company, but we run our own mail server because their mail system
is rather unreliable, in my opinion. Recently, AOL started blocking
all dynamic IP addresses using one of the blacklists. I'm using sendmail
8.12.9 on an HP/UX machine. Is there any way I can get around their
blocks so I can send mail to people at AOL?
A If you're running sendmail, you
can use the mailertable to route mail for specific domains through
your ISP's mail server and still deliver the rest of your mail directly.
The mailertable entries would look like:
aol.com esmtp:your.isps.smtp.host
netscape.net esmtp:your.isps.smtp.host
cd into the directory where your mailertable is stored, and build
the mailertable database with:
makemap hash mailertable < mailertable
Now add the mailertable feature to your mc file:
FEATURE('mailertable')dnl
And rebuild your cf file and HUP or restart the parent sendmail process.
Q I need to schedule a payroll run
from cron every 14 days, but cron doesn't seem to lend itself well
to that. Is there an easy way to do this that I'm overlooking?
A Instead of using cron, use at.
Schedule the first run by hand, and then, at the top of your script
(/your/script), put:
#!/bin/sh
at -f /your/script now + 14 days
# body of your script goes here
Q I have Solaris 8 running on a 280R.
Whenever the system boots, /tmp is set to mode 755, not 1777. I can
chown this while the machine is running, and it's fine till the next
reboot. Why won't my changes to /tmp stick?
A Most likely, your /tmp filesystem
is of type tmpfs and the permissions are wrong on the directory
in the root filesystem, before the /tmp filesystem gets mounted.
You can boot into single-user mode to fix the permissions on the
root partition. You might also want to check /etc/init.d/RMTMPFILES,
which should be hard-linked to/from /etc/rc2.d/S05RMTMPFILES. Someone
may have changed the permissions inside that startup script.
Amy Rich, president of the Boston-based Oceanwave Consulting,
Inc. (http://www.oceanwave.com), has been a UNIX systems
administrator for more than 10 years. She received a BSCS at Worcester
Polytechnic Institute, and can be reached at: qna@oceanwave.com.
|