Linux-Misc Digest #665, Volume #26 Sat, 30 Dec 00 12:13:02 EST
Contents:
Re: Thrashing HD (Jerry Kreps)
Re: How to set up network printer at linux? (Carfield Yim)
Re: Internet Filtering (D'Arque Bishop)
Re: linux search engine? (Jerry Kreps)
Vim telnet problem. (Carfield Yim)
Re: Any fix for Java in Netscape? (Edwin Johnson)
Re: Linux Networking Problem (Dances With Crows)
Re: Laptop:displaying X using external monitor (Dances With Crows)
----------------------------------------------------------------------------
From: Jerry Kreps <[EMAIL PROTECTED]>
Subject: Re: Thrashing HD
Date: Sat, 30 Dec 2000 10:18:23 -0600
Reply-To: [EMAIL PROTECTED]
Jean-David Beyer wrote:
> [EMAIL PROTECTED] wrote (in part):
> >
> > > What swap spaces would I use for each and where is a good web
> >
> > The rule used to be twice the physical memory. If you don't really
> > know what you need, that's still a good rule, later after seeing how
> > much swap you actually use, you'll know what is best for your style of
> > use.
> >
> "The rule" is completely counterintuitive to me. The more memory I have,
> the less swapping my machine should do. Others implicitly agree with me
> because, when people complain about too much swapping, they say to get
> more memory. They do not say add more swap space. This machine has 512
Well, here is an old adage: "Theory proposes but reality disposes." A lot
of people agreed with Ptolemy, too, but he was wrong.
Not all of us can afford several hundred MB of memory in order to avoid
using swap space. And besides, modern systems like Linux no longer swap,
strictly speaking, they page. The term 'swap' is so well entrenched that
it is often used interchangably with 'page", but the techniques are
different. And, I don't care how much memory you have, sooner or later you
will either a) run a huge process using large amounts of data or b) run
many, many tasks simulaneously. Either situation will cause Linux to
employ Virutal Memory ("paging" aka "swapping"). Or, undesirably, you
might encounter an ill-coded application that creates a race condition
which causes Linux to page out of RAM and disk swap space. You will see
this, after you recover, in the messages file with references to VM
failures. If you happen to be running a desktop GUI like KDE you will
notice icons disappearing off your desktop while your CPU free time stays
at 0%. While attempting to install Corel Office 2000 their install script
produced such a situtation.
If you need swap space the best scenerio is to have it on a second drive,
not the one where /root or /bin /sbin or /usr/bin resides. And, if you
need or use more than one swap file you may want to 'nice' one to a higher
priority so that the kernel isn't switching back and forth between them,
because they are of equal niceness, while paging (which is what causes a
lot of disk thrashing. Also, make sure you haven't disabled or otherwise
changed your L1 or L2 caching, and that ALL your DMA channels are
functional. (Some cheap CPUs have reduced cache sizes or defective --
henced disabled-- DMAs.
Scot Maxwell, in "Linux Core Kernel Commentary" wrote:
"Memory is one of the most important resources that the kernel manages.
One characteristic that distinuishes one process from another is that two
processes live in logically separate memory spaces (threads, by contrast,
share most of their memory). Even if the processes are both instances of
the same program -- for example, two xterms or two Emacs -- the kernel
arranges for each process to see memory as if it were the only process
running on the system. System security and stability are improved when one
process cannot, accidently or maliciously, scribble over another's working
space.
The kernel, too, lives in its own memory space; this is known as kernel
spac, as opposed to user space, which is a general term for any nonkernel
taks's memory space.
There are various kinds of "memory":
Registers 32 bytes 9ns
On-chip (L1) cache 16K 9ns
Off-chip (L2) cache 256K 20ns
RAM XMB 70ns
HD XGB 9ms
As everyone knows, there is a huge DECREASE in speed between the last two,
but a huge INCREASE in capacity. Linux makes portions of that huge appear
to be memory by a process called 'Virutal Memory" (VM). Virtual Memory is
a technique of seamlessly blending access to RAM and disk, primary and
secondary storage. Applications see all of this memory as if it were
really there. It's not, that is why it is called 'virutal' -- but, thanks
to the kernel, applications can't tell the difference. To an application
it is as if we had a huge amount of RAM that is sometimes really slow.
Virutal Memory, in a sense, lies to a process about the address at which it
resides. Each process address space appears to begin at 0 and extends up
from there, making relative address references easy. Obviously this can't
be true for all processes at the same time, but this fiction is convenient
when generating code because processes don't have to know that they don't
live at address 0, and they don't have to care, either.
These two meanings are not necessarily related, because an operating system
theoretcially could give each process its own logical address space wihtout
also conflating primary and secondary storage. All of the real systems
that I'm aware of, though, do both or neither, which is probably what lead
to the confusion in the first place.
To avoid this polysemy, some prefer to reserve the term "virtual memory"
for the logical-address-space meaning, and user either "paging" or
"swaping" for the disk-as-memory meaning.
Early virtual memory systems could move only an entire application's code
and data -- a whole process -- to or from the disk. This technique is
called swapping, because it swaps one process for another. For this
reason, a section of disk set aside for VM is often called swap space (or
simply swap), even though modern systems no longer swap in the orginal
sense. Similarly, you will often see the terms 'swap device' and 'swap
partition' -- synonymous terms for a disk partition dedicated as a swap
space -- and swap file, a regular, fixed length file used for swapping.
Swapping is useful, and much more than no VM at all, but it has it's
limitations. First, it requires an entire process to fit into memory
simultaneously, so it can't help when you want to run a process that
requires more storage than you have RAM installed on the system -- even if
there's plenty of disk space ready to compensate.
Furthermore, swapping can be inefficient. When you swap, you must swap out
the entire process simultaneously, even if this means swapping out an
entire 8MB process just because you need another 2KB. Similarly, you must
swap an entire process simultaneously, even if you are going to execute
only a small portion of the swapped-in application's code.
Enter 'Paging", which divides the system's memory into smallish
chunks--pages-- that can be moved to and from the disk independently. Page
is like swapping, but with much smaller granularity. Page has more
book-keeping overhead than swapping, because the number of pages far
exceeds the number of processes, but you gain a lot of flexibility with
paging. Paging is faster, too, for several reasons -- one is that you
usually don't need to move a whole process to or from the disk anymore,
just enough of its pages to satisfy the request. ALways rmember that
factor-of-1000 speed difference -- you want to avoid touching the disk
whenever possible.
Pages traditionally are fixed size on a particular platform -4K on x86 --
which simplifies paging implementations. However, most CPUs now provide
hardware support for variable-sized pages, often up to 4MB or larger. The
standard Linux kernel doesn't support variable size pages so you may want
to edit your BIOS and set the page size at 4K, if you are not dual booting
windows.
Linux can swap to dedicated disk partitions, to a file, or both in various
combinations. You can add or remove swap space on a running system. And,
unlike some flavors of Unix, Linux can get along just fine without any swap
space at all."
------------------------------
From: Carfield Yim <[EMAIL PROTECTED]>
Subject: Re: How to set up network printer at linux?
Date: Sun, 31 Dec 2000 00:23:29 +0800
Dances With Crows wrote:
>
> On Sat, 30 Dec 2000 01:31:43 +0800, Carfield Yim staggered into the
> Black Sun and said:
> >Sorry for late reply, actually I interested in how to setup both, but
> >at this point I need to know how to use a printer from Linux that's
> >available on the network. Don't really know what you mean for protocol.
> >Rod Smith wrote:
> >> Carfield Yim <[EMAIL PROTECTED]> writes:
> >> > As title, how to do?
> >> Do you want to share a printer connected to Linux, or use a printer
> >> from Linux that's available on the network? Also, what protocol do
> >> you want/need to use? (For instance, do you want to share a printer
> >> with Windows, MacOS, or other Unix/Linux systems?)
>
> If you want to let your Linux machine print to a remote printer, you
> need to add an entry like so in your /etc/printcap :
>
> rp1|Remote_Printer_1:\
> :lp=/dev/null:sh:\
> :sd=/var/spool/lpd/rp1:\
> :rm=remote.printserver.hostname:rp=RMP1:
>
> "rp1" is the default name for remote printer 1, separated from various
> aliases for the same printer by |s. rm= is followed by the hostname or
> IP address of the remote printserver. rp= is followed by the queue name
> of the remote printer. There is no if= or af= in this entry because
> this was cut-n-pasted from a printcap I used with a remote printer which
> understood PostScript.
>
> For further information, look at
> http://linuxdoc.org/HOWTO/Printing-HOWTO.html since that's very
> comprehensive even if it's biased towards PDQ instead of lpr/lprNG/CUPS.
> It covers printing to a remote printer, sharing printers to a 9x/NT
> network via Samba, and all that good stuff.
>
> --
> Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
> Brainbench MVP for Linux Admin / Workin' in a code mine, hittin' Ctrl-Alt
> http://www.brainbench.com / Workin' in a code mine, whoops!
> -----------------------------/ I hit a seg fault....
Thx a lot, let me try
------------------------------
From: [EMAIL PROTECTED] (D'Arque Bishop)
Subject: Re: Internet Filtering
Date: Sat, 30 Dec 2000 16:12:05 GMT
Heys Bob,
In article <92ks35$bbr$[EMAIL PROTECTED]>, Bob Simon wrote:
>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>>
>> It's not practical, sorry. Not that it's infeasible to *do*
>> it though it'd take some serious packet-sniffing and whatnot),
>> but the tools that claim to _do_ it generally either don't catch
>> everything, or catch stuff they really shouldn't.
>
>Dan, Thanks for your reply but I'm not sure if I understand what
>you mean. Are you saying that:
>a) the programs that claim to block porn sites are so ineffective
> that one shouldn't bother with them
>b) the programs are pretty good but not perfect (this is my
> impression of the situation, btw)
>c) it's too difficult to determine "objectionable" sites on the fly
> and that's why programs rely on precompiled lists
>d) something else?
>From what I have seen in the past, it's e) all of the above. You should
check out sites such as Peacefire (http://www.peacefire.org) and take a
look at what they have to say as far as the effectiveness of blocking sites.
Not only do a lot of innocent sites get caught in the crossfire, these
programs also tend to impose their own agendas onto your web browsing. For
example, according to a Peacefire report a couple of weeks ago, several
global amnesty groups were blocked by several of the web filtering software.
It doesn't help any when said software also doesn't allow you to actually
VIEW their filtering lists.
>> It's probably easiest to just turn on some sort of accounting/logging
>> of what sites are being accessed. You won't stop anyone, or catch
>> them red-handed, but you can sit down and have a talk after-the-fact.
>
>Although I've coded procedural languages in the past, I'm not up to
>this task yet in Unix. Although it sounds like an interesting project
>for the future, before I give up on filtering I think I'll try
>downloading and installing NetNanny for a 30 day free evaluation.
What I might suggest is installing Squid and have it log what sites your
family browse. A comparable Windows solution would be Disk Tracy, which
essentially does the same thing.
Just my $.02...
--
==============================================================================
"Do you see the smile in my words, sad and evil? Sad because
I am utterly alone. Evil because I am dead and yet I live.
Can you hear me? Listen. A dead man visits you."
--James O'Barr, The Crow
D'Arque Bishop -- [EMAIL PROTECTED]
http://www.ravenloft.net/~drkbish
"For a dark man shall come unto the House of God, and the
darkness shall be upon him, yea, even within him."
-- from Noctropolis: Night Vision
==============================================================================
------------------------------
From: Jerry Kreps <[EMAIL PROTECTED]>
Subject: Re: linux search engine?
Date: Sat, 30 Dec 2000 10:31:56 -0600
Reply-To: [EMAIL PROTECTED]
Tijmen Stam wrote:
> Does anyone know if there's a good search engine (and maybe even an
> index, like yahoo's) around anywhere? I couldn't find anyone (exept for
> the ones provided by altavista and such, but they just add a "+linux" to
> the search...)
>
> Tijmen
>
>
The best search engine on the Internet, which is also powered by Linux, is
http://www.google.com
------------------------------
From: Carfield Yim <[EMAIL PROTECTED]>
Subject: Vim telnet problem.
Date: Sun, 31 Dec 2000 00:36:17 +0800
I can't use vim when I telnet to my machine, but using vi is ok. I think
that the reason is the type of terminal set at linux telnetd don't
support colour text. How can I set it correctly?
------------------------------
From: [EMAIL PROTECTED] (Edwin Johnson)
Subject: Re: Any fix for Java in Netscape?
Reply-To: [EMAIL PROTECTED]
Date: 30 Dec 2000 16:37:03 GMT
About a year ago I was installing Slackware4.0 and had problems such as you
have with a _lot_ of disk activity. Increasing the swap drive space
amazingly took care of the problem while running 32m RAM. Incidentally, if
you have RedHat there is something on the Netscape web site regarding paths
for fonts which give similar problems. I've never had RedHat so don't
know if that cures everything, but it is worth a look.
...Edwin
On Fri, 29 Dec 2000 15:23:13 GMT, Harmon Seaver
<[EMAIL PROTECTED]> wrote:
>
> If I have them enabled, going to a site with java (javascript is the
>worst offender) will crash netscape. It locks up, turns grey and won't
>respond
>to either mouse or keyboard. I have to go to an xterm window and kill it.
>Sometimes it just crashes and disappears, but usually it does the above.
> If I disable just javascript and leave java enabled, some sites with
>java work, some don't. I've seen this problem with Netscape and java for some
>time now, can't remember how many releases back.
> I'm using Mandrake 7 at the moment, about to upgrade to RH 7.0, however,
>so I'll see if that makes a difference.
>
>
>
>[EMAIL PROTECTED] wrote:
>> Harmon Seaver <[EMAIL PROTECTED]> wrote:
>>> Is there any fix for java and javascript for netscape? I've looked at
>>> all the ns help, done the chkfontpath thing, etc. How come the ns for linux
>>> can't deal with java, the ns for Macs seems to work with java and javascript
>>> just fine.
>
>> Both java and javascript work fine for me under Linux... What, exactly,
>> is the problem you're having?
>
>> Adam
>
>
>--
>Harmon Seaver, MLIS Systems Librarian
>Arrowhead Library System Virginia, MN
>(218) 741-3840 [EMAIL PROTECTED] http://harmon.arrowhead.lib.mn.us
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Edwin Johnson ....... [EMAIL PROTECTED] ~
~ http://www.shreve.net/~elj ~
~ ~
~ "Once you have flown, you will walk the ~
~ earth with your eyes turned skyward, ~
~ for there you have been, there you long ~
~ to return." -- da Vinci ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
From: [EMAIL PROTECTED] (Dances With Crows)
Subject: Re: Linux Networking Problem
Date: 30 Dec 2000 17:09:51 GMT
Reply-To: [EMAIL PROTECTED]
On Sat, 30 Dec 2000 14:48:07 GMT, david conner staggered into the Black
Sun and said:
>I just installed Red Hat 7 (I downloaded it) and I don't know how to let it
>access the network. I duel boot with Windows 98
^^^^
Fighting over system resources, are they?
>so I printed out all that winipcfg would tell me about the network. In
>Linux, I don't know what to fill out and where to fill out this
>information in netconf. I called Red Hat, but they weren't much help. I
>am using a Cable Internet connection, but I am on a Network under
>that... so the cable probably doesn't mean anything.
root# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 broadcast
192.168.1.255 up
root# route add default gw 192.168.1.1
The first IP address is the IP address you wish your NIC to have. The
netmask is the netmask. The broadcast address is obtained by logical
ANDing the netmask with the NIC's IP address.
The route command adds a default gateway to the kernel routing table.
In your case, the default gateway would be the IP addr of your cable
modem. Unless your cable modem is using DHCP, at which point you can
most likely forget the ifconfig stuff and just execute "pump -i eth0".
I don't use RedHat very much, so I don't know what you'd do with their
distro-specific tools, but you can put the ifconfig and route (or pump)
commands into /etc/rc.d/rc.local once you've figured out what the right
command lines are.
>Thanks in advance to all who answer... my email address is
>[EMAIL PROTECTED], so if you know what to do, you can email me.
"Post here, Read Here" is the time-honored Usenet tradition. If you
don't have a reliable NNTP feed, you can go to
http://deja.com/home_ps.shtml and use that.
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / Workin' in a code mine, hittin' Ctrl-Alt
http://www.brainbench.com / Workin' in a code mine, whoops!
=============================/ I hit a seg fault....
------------------------------
From: [EMAIL PROTECTED] (Dances With Crows)
Subject: Re: Laptop:displaying X using external monitor
Date: 30 Dec 2000 17:09:53 GMT
Reply-To: [EMAIL PROTECTED]
On Sat, 30 Dec 2000 12:30:04 -0000, tue staggered into the Black Sun and
said:
> I would like to connect the laptop using external display as the
>resolution of my laptop is only 800x600. But the monitor would go blank
>as soon as linux start booting up. I am using linux mandrake 7.2 and
>acer travelmate 507t.
Many laptops have a special key combination (Fn-F7 on my Thinkpad 380D)
that switches video-out from the internal display to the external one.
Tried that if there is one? Also, some display adapters require the
"extern_disp" option in the XF86Config file, so go to
http://xfree86.org/ and search for info about the specific video chipset
in your machine.
It's unlikely that you will be able to get more than 800x600 resolution
even on an external display without dropping the color depth from where
it is now. The maximum resolution you can get out of a video card is
determined by the card's VRAM and the color depth you're using, and many
laptop display chipsets have just enough VRAM to display 16-bit color
at the resolution of the built-in LCD.
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / Workin' in a code mine, hittin' Ctrl-Alt
http://www.brainbench.com / Workin' in a code mine, whoops!
=============================/ I hit a seg fault....
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to comp.os.linux.misc.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************