Linux-Development-Sys Digest #198, Volume #6 Fri, 1 Jan 99 19:13:54 EST
Contents:
Counting page faults ("Matej Arta�")
Re: silly question (ebatchelor)
Re: small fonts on tty ("D. Stimtis")
Re: Kernel-2.2-pre2 (Rudi Sluijtman)
Re: Lilo (BootLoader) Installation ("Alan D. Wilcox")
Re: Kernel-2.2-pre2 ("D. Stimits")
Re: Registry for Linux - Why? (Horst von Brand)
Re: silly question (Adam P. Jenkins)
Re: silly question (Adam P. Jenkins)
Re: Counting page faults (Richard Jones)
Re: silly question (Adam P. Jenkins)
Re: Counting page faults (Todd Graham Lewis)
Re: silly question ("Bob Taylor")
Re: small fonts on tty ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: "Matej Arta�" <[EMAIL PROTECTED]>
Subject: Counting page faults
Date: Fri, 1 Jan 1999 18:04:16 +0100
Hello!
I'm not a very experienced programmer in Linux, and I'd like to know if
there's any way to count page faults an application or any application makes
within Linux c code when accessing a page that is not in the physical memory
but has been cached to disk.
I have also been trying to allocate a block of memory with malloc that is
larger than the actual physical memory space, but malloc returns NULL
already at around 16MB (I have 64MB of RAM). I've noticed that malloc
allocates up to around 1GB in Windows without any problems.
Thanks.
Matej
------------------------------
From: ebatchelor <[EMAIL PROTECTED]>
Subject: Re: silly question
Date: Fri, 01 Jan 1999 13:32:56 -0600
OOps, my mistake...sorry.
I thought I was posting to the "comp.os.linux.development" group,
not the "comp.os.unix.worship" group.
Hail Unix,
Ed
------------------------------
Date: Fri, 01 Jan 1999 12:40:43 -0700
From: "D. Stimtis" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: small fonts on tty
Helge Stahlmann wrote:
>
> Does anybody know how to set up smaller vga fonts on a linux terminal?
> The standard 16*8 fonts are much too big on my 19" display.
>
> Helge
The command "setfont" will install a new console font. Typically, use it in rc.local.
The fonts
which are available by default should be in /usr/lib/kbd/consolefonts/. I like
cp850-8x8 for 132x44
mode.
------------------------------
From: Rudi Sluijtman <[EMAIL PROTECTED]>
Subject: Re: Kernel-2.2-pre2
Date: 01 Jan 1999 21:20:53 +0100
I compiled kernel-2.2.0-pre2.
1) make xconfig gave me some trouble (but this has been solved by
Stefaan A Eeckels, several postings ago).
2) there are some differences in startup messages:
Jan 1 16:31:31 oriol syslogd 1.3-3: restart.
Jan 1 16:31:31 oriol kernel: klogd 1.3-3, log source = /proc/kmsg started.
Jan 1 16:31:31 oriol kernel: Loaded 6282 symbols from
/lib/modules/2.2.0-pre2/System.map.
Jan 1 16:31:31 oriol kernel: Symbols do not match kernel version.
I am not too worried about this message, but the next is more serious:
Jan 1 16:31:31 oriol kernel: Partition check:
Jan 1 16:31:31 oriol kernel: hda: hda1 hda2! hda3! hda4 < hda5 hda6 hda7 hda8 > < >
Jan 1 16:31:31 oriol kernel: hdb: hdb1 hdb2! hdb3 < hdb5 > < hdb6 hdb7 hdb8??? >
Jan 1 16:31:31 oriol kernel: hdc: hdc1 hdc2 hdc3
- what is the meaning of the exclamation marks ?
- what do the question marks on the second line mean ?
whith 2.1.x kernel these lines were:
Dec 31 23:28:21 oriol kernel: Partition check:
Dec 31 23:28:21 oriol kernel: hda: hda1 hda2 < > hda3 hda4 < hda5 hda6 hda7 hda8 >
Dec 31 23:28:21 oriol kernel: hdb: hdb1 hdb2 < hdb5 hdb6 hdb7 hdb8 > hdb3 < hdb9 >
Dec 31 23:28:21 oriol kernel: hdc: hdc1 hdc2 hdc3
hdb2 contains a FreeBSD 2.2.7 istallation, hdb9 has a windows95 filesystem.
Mounting it with 2.2.0.-pre2 gives this error-messages:
Jan 1 16:31:31 oriol kernel: attempt to access beyond end of device
Jan 1 16:31:31 oriol kernel: 03:49: rw=0, want=1, limit=0
Jan 1 16:31:31 oriol kernel: FAT bread failed
Is this a bug, or could there be some error in the hdb partition table ?
3) pasting with gpm (gpm -t ms) does not work anymore.
Rudi Sluijtman.
[EMAIL PROTECTED]
------------------------------
From: "Alan D. Wilcox" <[EMAIL PROTECTED]>
Crossposted-To:
alt.os.linux,alt.os.linux.caldera,alt.os.linux.slackware,comp.linux,comp.linux.os,comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.help,comp.os.linux.ne
Subject: Re: Lilo (BootLoader) Installation
Date: Thu, 31 Dec 1998 15:43:44 -0500
System Commander sure does make life a lot simpler though.
I've used it for years, and haven't had any grief dealing
with boot issues. My S-C menu selection for Linux runs LILO
which then boots the system.
Alan
G-der wrote:
>
> It was my understanding that NT did make some changes in the MBR to point to the
> loader, even if the loader itself is not in the MBR. I could be mistaken though
>
> Gene
>
> Mantikor wrote:
>
> > This is not true...
> >
> > The NT boot loader sits on the boot sector, not the MBR. You can
> > safely install LILO on the MBR, and set it up to boot linux and an
> > alternative partition (your current bootable one). If you select this
> > alternate when LILO boots, it will start up the boot loader, and you
> > can choose between Win98 and NT.
> >
> > On Tue, 29 Dec 1998 21:40:31 -0700, G-der <[EMAIL PROTECTED]> wrote:
> >
> > >I would say the first boot record of teh Linux parrtition. If you install it to
> > >the master boot record it will wipe out the NT loader, which as far as i know is
> > >required to load NT.
> > >
> > >The boot.ini for NT can be edited to point to LILO to boot Linux, but I would
> > >recommend a boot manager like System Commander. It will automaticly detect both
> > >NT and Linux and set up boot entries for them, but it only works if LILO has not
> > >been installed to the master boot record.
> > >
> > >Gene
------------------------------
Date: Fri, 01 Jan 1999 12:56:38 -0700
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Kernel-2.2-pre2
Vitor Pedro Bonucci Pias wrote:
>
> When I disable SMP in "make config" the kernel fail to
>
> compile.But I enable SMP and now seems OK.
>
> But my syslogd put this mesages in /var/log
>
> "Can't find map file"
>
> Any susgestion is apreciated
>
> Pedro Pias (Porto *** Portugal)
The map file is System.map, which after compile is in /usr/src/linux/. If you look at
the Makefile
there, you'll see a system map location specified, via INSTALL_PATH. Rename your old
System.map
something like System.map.old, and copy the new System.map to there, it should find it
(I'd save the
old kernel as well as something like bzImage.old).
I haven't compiled the 2.2.0pre version, but I assume to enable or disable the SMP you
still have to
uncomment/comment out the Makefile SMP=1 line. If the config scripts are doing it
right, you could
still manually do this in Makefile.
------------------------------
From: [EMAIL PROTECTED] (Horst von Brand)
Subject: Re: Registry for Linux - Why?
Date: 31 Dec 1998 01:07:04 GMT
In article <[EMAIL PROTECTED]>, Konstantinos Agouros wrote:
>If the initial installation asks for a backup-floppy or tape (but a flop-
>py is enough) that contains one registry and the server has software to
>generate everything out of that it's done and the machine comes up like
>before.
Just do a tar of selected files in /etc. Even better than a monolitic
registry, you can recover the DNS settings f.ex. without disturbing the
rest. RedHat has a kickstart installation mode, where all "interesting" data
for the machine is placed in a file consulted during install. RH-5.2 has a
mkkickstart program that creates this configuration file from a running
system. Never tried it, but sounds almost like what you are asking for. Or
something like dumping/restoring configuration might be integrated into
linuxconf?
--
Horst von Brand [EMAIL PROTECTED]
Casilla 9G, Vi�a del Mar, Chile +56 32 672616
------------------------------
Subject: Re: silly question
From: [EMAIL PROTECTED] (Adam P. Jenkins)
Date: 01 Jan 1999 17:42:55 -0500
ebatchelor <[EMAIL PROTECTED]> writes:
> I am a new user to Linux. I am an experienced MSDOS user, have written
> many batch files to accomplish what I want to do, and can recall the
> names of most DOS utilities I need to use. Of course, DOS sucks, but
> Windows cures many of the DOS shortcomings (long file names,
> multitasking (almost), etc.). Linux seems to incorporate the best of
> both worlds,
>
> but....
>
> Why the convoluted, hard to recall, someone thought it was funny in 1975
> utility names? It seems to me that BASH could be easily recoded to
> include easy to use and remember identifiers without giving up ANY
> functionality. I know it's part of the worship Unix thing, but it seems
> Linux could be more user friendly with little effort...
I think for the most part it's just different; you think what you're
used to is more "natural", but really it's just what you learned
first. While unix shell command names tend to be a little shorter
than their DOS counterparts, (if there is even a DOS counterpart),
most of them are pretty mnemonic.
ls -> "list" files
rm -> "remove" file
rmdir -> remove directory
mkdir -> make directory
cd -> change directory
mv -> "move" file
chmod -> "change mode" of file
chown -> change owner
sh -> shell
csh -> C shell
bash -> Bourne Again shell (OK, I admit that's being funny)
man -> manual
find -> you guessed it, find files
I could go on, but I think you'll find the "joke" names are far
outnumbered by the mnemonic names. In fact the only joke names I can
think of offhand are bash and bison. For instance, I definitely don't
think "del" is any more natural than "rm". One is short for "delete"
and one is short for "remove", both equally explainable to a newbie.
It's only when you get someone who is already used to say, "del", that
they have trouble with "rm".
In any case, you can use the "alias" command in bash, csh, or tcsh, to
make DOS-like aliases for any commands that you like.
>
> Just a question.
>
> Ed Batchelor
> innocent bystander
>
Out of curiosity, which utility names do you find to be convoluted
compared to their DOS counterparts?
--
Adam P. Jenkins
[EMAIL PROTECTED]
------------------------------
Subject: Re: silly question
From: [EMAIL PROTECTED] (Adam P. Jenkins)
Date: 01 Jan 1999 17:44:38 -0500
ebatchelor <[EMAIL PROTECTED]> writes:
> I am a new user to Linux. I am an experienced MSDOS user, have written
> many batch files to accomplish what I want to do, and can recall the
> names of most DOS utilities I need to use. Of course, DOS sucks, but
> Windows cures many of the DOS shortcomings (long file names,
> multitasking (almost), etc.). Linux seems to incorporate the best of
> both worlds,
>
> but....
>
> Why the convoluted, hard to recall, someone thought it was funny in 1975
> utility names? It seems to me that BASH could be easily recoded to
> include easy to use and remember identifiers without giving up ANY
> functionality. I know it's part of the worship Unix thing, but it seems
> Linux could be more user friendly with little effort...
I think for the most part it's just different; you think what you're
used to is more "natural", but really it's just what you learned
first. While unix shell command names tend to be a little shorter
than their DOS counterparts, (if there is even a DOS counterpart),
most of them are pretty mnemonic.
ls -> "list" files
rm -> "remove" file
rmdir -> remove directory
mkdir -> make directory
cd -> change directory
mv -> "move" file
chmod -> "change mode" of file
chown -> change owner
sh -> shell
csh -> C shell
bash -> Bourne Again shell (OK, I admit that's being funny)
man -> manual
find -> you guessed it, find files
I could go on, but I think you'll find the "joke" names are far
outnumbered by the mnemonic names. In fact the only joke names I can
think of offhand are bash and bison. For instance, I definitely don't
think "del" is any more natural than "rm". One is short for "delete"
and one is short for "remove", both equally explainable to a newbie.
It's only when you get someone who is already used to say, "del", that
they have trouble with "rm".
In any case, you can use the "alias" command in bash, csh, or tcsh, to
make DOS-like aliases for any commands that you like.
>
> Just a question.
>
> Ed Batchelor
> innocent bystander
>
Out of curiosity, which utility names do you find to be convoluted
compared to their DOS counterparts?
--
Adam P. Jenkins
[EMAIL PROTECTED]
------------------------------
From: Richard Jones <[EMAIL PROTECTED]>
Subject: Re: Counting page faults
Date: Fri, 1 Jan 1999 23:02:23 +0000
Matej Arta� <[EMAIL PROTECTED]> wrote:
: Hello!
: I'm not a very experienced programmer in Linux, and I'd like to know if
: there's any way to count page faults an application or any application makes
: within Linux c code when accessing a page that is not in the physical memory
: but has been cached to disk.
See getrusage(2). It returns the number of page faults so
far (and other information). If you do one call before and
one call after, you should be able to see if the application
did any page faults during the access.
: I have also been trying to allocate a block of memory with malloc that is
: larger than the actual physical memory space, but malloc returns NULL
: already at around 16MB (I have 64MB of RAM). I've noticed that malloc
: allocates up to around 1GB in Windows without any problems.
That's is truly strange. Are you running 2.0 or 2.1/2.2?
With 2.0 memory can be overcommitted and is not actually
allocated until you use it. With 2.1/2.2 this is a
configurable parameter, normally turned *off*, so you can
only allocate memory that you really have by default. To
change this behaviour (2.1/2.2 only), do:
echo 1 > /proc/sys/vm/overcommit_memory
and you should be able to allocate unrealistic amounts of
memory like in Windows.
Rich.
--
- Richard Jones. Linux contractor London and SE areas. -
- Very boring homepage at: http://www.annexia.demon.co.uk/ -
- You are currently the 1,991,243,100th visitor to this signature. -
- Original message content Copyright (C) 1998 Richard Jones. -
------------------------------
Subject: Re: silly question
From: [EMAIL PROTECTED] (Adam P. Jenkins)
Date: 01 Jan 1999 17:47:42 -0500
ebatchelor <[EMAIL PROTECTED]> writes:
> I am a new user to Linux. I am an experienced MSDOS user, have written
> many batch files to accomplish what I want to do, and can recall the
> names of most DOS utilities I need to use. Of course, DOS sucks, but
> Windows cures many of the DOS shortcomings (long file names,
> multitasking (almost), etc.). Linux seems to incorporate the best of
> both worlds,
>
> but....
>
> Why the convoluted, hard to recall, someone thought it was funny in 1975
> utility names? It seems to me that BASH could be easily recoded to
> include easy to use and remember identifiers without giving up ANY
> functionality. I know it's part of the worship Unix thing, but it seems
> Linux could be more user friendly with little effort...
I think for the most part it's just different; you think what you're
used to is more "natural", but really it's just what you learned
first. While unix shell command names tend to be a little shorter
than their DOS counterparts, (if there is even a DOS counterpart),
most of them are pretty mnemonic.
ls -> "list" files
rm -> "remove" file
rmdir -> remove directory
mkdir -> make directory
cd -> change directory
mv -> "move" file
chmod -> "change mode" of file
chown -> change owner
sh -> shell
csh -> C shell
bash -> Bourne Again shell (OK, I admit that's being funny)
man -> manual
find -> you guessed it, find files
I could go on, but I think you'll find the "joke" names are far
outnumbered by the mnemonic names. In fact the only joke names I can
think of offhand are bash and bison. For instance, I definitely don't
think "del" is any more natural than "rm". One is short for "delete"
and one is short for "remove", both equally explainable to a newbie.
It's only when you get someone who is already used to say, "del", that
they have trouble with "rm".
In any case, you can use the "alias" command in bash, csh, or tcsh, to
make DOS-like aliases for any commands that you like.
>
> Just a question.
>
> Ed Batchelor
> innocent bystander
>
Out of curiosity, which utility names do you find to be convoluted
compared to their DOS counterparts?
--
Adam P. Jenkins
[EMAIL PROTECTED]
------------------------------
From: Todd Graham Lewis <[EMAIL PROTECTED]>
Subject: Re: Counting page faults
Date: Fri, 1 Jan 1999 18:45:42 -0500
On Fri, 1 Jan 1999, Matej Arta� wrote:
> I'm not a very experienced programmer in Linux, and I'd like to know if
> there's any way to count page faults an application or any application makes
> within Linux c code when accessing a page that is not in the physical memory
> but has been cached to disk.
I believe that the per-process statistics in "/proc/<pid>/stat". Let me
see if I can find the man page that describes them. (rustle, rustle.)
Can't find the docs, but an old shell script of mine has the entries of
"stat" defined as follows:
set -A proc_fields_description \
"the process id of the process" \
"the filename of the executable" \
"one of:
R: running
S: sleeping in an interruptible wait
D: sleeping in an uninterruptible wait or swapping
Z: zombie
T: traced or stopped on signal" \
"the pid of the process's parent" \
"the process group of the parent" \
"session id of the process" \
"the tty which the process uses" \
"the process group of the process which owns this processes's tty" \
"flags (not well documented, but 4=math, 10=traced)" \
"number of minor faults (those not requiring disk reads)" \
"number of minor faults (those not requiring disk reads) by
the process and its children" \
"number of major faults (those requiring disk reads)" \
"number of majorfaults (those requiring disk reads) by the
process and its children" \
"number of jiffies process has been scheduled in user mode" \
"number of jiffies process has been scheduled in kernel mode" \
"utime for process and its children" \
"stime for process and its children" \
"max. size (in jiffies) of next timeslice, or remaining of current
timeslice, if process is running" \
"standard nice value plus fifteen (kernel does not use negative
numbers" \
"time in jiffies of process's next timeout" \
"time (in jiffies) the process started in after system boot" \
"time (in jiffies) before process's next timer-caused SIGALRM" \
"virtual memory size" \
"Resident Set Size: # of pages in real memory (minus 3)" \
"current limit on rss" \
"address above which program text can run" \
"address below which program text can run" \
"address of the start of the stack" \
"current value of esp (32-bit stack pointer), as found in the
kernel stack page" \
"current EIP (32-bit instruction pointer)" \
"bitmap of pending signals" \
"bitmap of blocked signals (usually 0, 2 for shells)" \
"bitmap of ignored signals" \
"bitmap of catched signals" \
"'channel' in which the process is waiting (see 'ps -l')"
Thus, you can do the equivalent of the following in your program:
$majfaults=`cat /proc/$PID/stat|awk '{print $12}'`;
If anyone knows where the man page that documents this is, I'm sure that
this guy would prefer that to my old shell script extracts.
> I have also been trying to allocate a block of memory with malloc that is
> larger than the actual physical memory space, but malloc returns NULL
> already at around 16MB (I have 64MB of RAM). I've noticed that malloc
> allocates up to around 1GB in Windows without any problems.
This is a feature. 8^) Unix allows the system to set limits on a
user's resource consumption, including memory. You are hitting the
system limit on how much memory you can use. `ulimit -a` should list
all of your limits. I can't for the life of me remember which config
file these are set in, but just to confirm the theory, you can run your
program as root and see if the 16-MB limit still exists. If not, then
figure out how to raise your core memory limit.
Good luck, and welcome to Linux!
--
Todd Graham Lewis [EMAIL PROTECTED] (800) 719-4664, x2804
"It's still ludicrous that nobody's ever made a run at us by making UNIX
a popular platform on PCs. It's almost too late now." -- Steve Balmer
"It is too late." -- Bill Gates _Newsweek_, 6/23/97, p. 82
------------------------------
Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] ("Bob Taylor")
Subject: Re: silly question
Date: Sat, 02 Jan 1999 00:03:21 GMT
In article <[EMAIL PROTECTED]>,
ebatchelor <[EMAIL PROTECTED]> writes:
> OOps, my mistake...sorry.
>
> I thought I was posting to the "comp.os.linux.development" group,
>
> not the "comp.os.unix.worship" group.
>
> Hail Unix,
I worship God. I do not worship man nor OS.
Read some history of Unix and maybe you will understand why Unix
commands are named the way they are. Furthermore, you began by stating
how long you have been using MSDOS and that you are a new user of
Linux. After you have spent 10% of that time using/learning Linux,
THEN you will qualify yourself to criticize Unix.
BTW, grow up.
--
+---------------------------------------------------------------+
| Bob Taylor Email: [EMAIL PROTECTED] |
|---------------------------------------------------------------|
| Like the ad says, at 300 dpi you can tell she's wearing a |
| swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you |
| can tell it's painted on. I suppose at 2400 dpi you can tell |
| if the paint is giving her a rash. (So says Joshua R. Poulson)|
+---------------------------------------------------------------+
------------------------------
Crossposted-To: comp.os.linux.development.apps
From: [EMAIL PROTECTED]
Subject: Re: small fonts on tty
Reply-To: [EMAIL PROTECTED]
Date: Sat, 2 Jan 1999 00:36:48 GMT
D. Stimtis <[EMAIL PROTECTED]> wrote:
:> Does anybody know how to set up smaller vga fonts on a linux terminal?
:> The standard 16*8 fonts are much too big on my 19" display.
:>
:> Helge
:
: The command "setfont" will install a new console font. Typically, use it in
:rc.local. The fonts
: which are available by default should be in /usr/lib/kbd/consolefonts/. I like
:cp850-8x8 for 132x44
: mode.
I guess that what really is in order, is SVGATextMode. I run it myself on both my
computers with a 100 x 40 character display, but it can do pretty much everything.
It beats X, in my opinion. Great package, and if you've ever bought a cd with
a mirror of Sunsite, it's on it.
--
Boudewijn Rempt | www.xs4all.nl/~bsarempt
------------------------------
** 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 (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
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-Development-System Digest
******************************