Linux-Development-Sys Digest #61, Volume #7      Tue, 17 Aug 99 09:13:43 EDT

Contents:
  Re: RH 6.0 modprobe for lo (Robin Becker)
  Re: why not C++? (Phil Howard)
  Re: /proc/<pid>/stat info incorrect on SMP systems? ([EMAIL PROTECTED])
  Re: why not C++? ([EMAIL PROTECTED])
  Scheduler trace for rt-apps (pmueller)
  Re: Deadly optimization bug (all versions!) (Alex Vinokur)
  Re: DRIVER for Toshiba DVD-RAM (only tested on kernel 2.0.36) (Christian Mund)
  Re: Custom login prompt... ("Rick Carlson")
  kernel 2.2.11 compile problem (Ulli =?iso-8859-1?Q?W=F6lfel?=)
  smp kernel build with rh 6.0 ([EMAIL PROTECTED])
  Re: smp kernel build with rh 6.0 (Villy Kruse)
  Re: Toshiba DVD-RAM and Linux ("Hartmut W. Malzahn")
  Re: Looking for a good IP packet analyzer (Warren Young)
  Re: Looking for a good IP packet analyzer (Warren Young)

----------------------------------------------------------------------------

From: Robin Becker <[EMAIL PROTECTED]>
Subject: Re: RH 6.0 modprobe for lo
Date: Mon, 16 Aug 1999 16:05:14 +0100

In article <[EMAIL PROTECTED]>, Johan Kullstam
<[EMAIL PROTECTED]> writes
>Robin Becker <[EMAIL PROTECTED]> writes:
>
>> In article <[EMAIL PROTECTED]>, Robin Becker
>> <[EMAIL PROTECTED]> writes
>> >In article <[EMAIL PROTECTED]>, Johan Kullstam
>> ><[EMAIL PROTECTED]> writes
>> >>Robin Becker <[EMAIL PROTECTED]> writes:
>> >>
>> >>> I'm getting some spurious boot messages about modprobe being unable to
>> >>> find the lo device. I have inserted an 'alias lo off' line in
>> >>> /etc/conf.modules and certainly attempts made after the boot to modprobe
>> >>> for lo certainly don't cause errors. I have most of the net stuff in
>> >>> modules, but can't figure this nonsense out.
>
>> the command which causes these messages is 
>> linuxconf --hint ipalias lo
>
>> an RH special just to keep us confused. 
>
>yes, i know linuxconf deals with ipaliases.  how do i turn them off
>*completely* (as in what is in redhat initscripts that i can
>disable/comment out).  i do not have ipalias built into my kernel.
>
you should hack the ipup-post script to see if its argument 1 is lo

eg
[ "$1" = "lo" ] && exit 0

this is really a bug in linuxconf though as I have absolutely no aliases
set up in the linuxconf controlled files.
-- 
Robin Becker

------------------------------

From: [EMAIL PROTECTED] (Phil Howard)
Subject: Re: why not C++?
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Date: Tue, 17 Aug 1999 05:40:02 GMT

On Mon, 16 Aug 1999 19:56:20 -0700 Randall Parker ([EMAIL PROTECTED]) wrote:
| I think the real problem with C++ and heap memory is that too many 
| programmers who use C++ do not understand how much all the stuff they are 
| writing is fragmenting the heap.

Of course.  They tend to be abstraction oriented applications programmers.
Details?  We don't need no steenkin details!  :-)


| Watching various (in many cases dangerous) programmers using C++ it has 
| been my experience that new seems to be more natural to them (ie they are 
| less likely to hesitate before using it) than is malloc. So they just use 
| it mad. 

Many also seem to be less likely to hesitate to skip object oriented design
and jump right into object oriented coding.  It's still object oriented so
they feel the objective (sorry) is met.


| I think it takes far greater discipline to write good C++ than good C 
| even though in theory the syntax of C++ ought to encourage the users to 
| think more about the design and partitioning of a problem. In practice 
| they don't know how to partition things into objects, they thrash and 
| fragment the heap, and they consume way more memory and do much more 
| copying around of data.

The thing I think has really happened with C++ is that it has made it so
easy to program object oriented code, that so many ill-prepared programmers
have joined in, that much C++ code out there is assumed to be object
oriented only because it was written in C++ and uses many object classes.
Many, many, good C++ programmers do things the right way, but there is a
huge set of programmers that know OO is good, C++ is OO, and therefore
their C++ is OO ... they don't know what object oriented design is.

--
Phil Howard           KA9WGN
[EMAIL PROTECTED] [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: /proc/<pid>/stat info incorrect on SMP systems?
Date: 16 Aug 1999 11:57:25 -0700

[EMAIL PROTECTED] (David T. Blake) writes:
> It indeed "says" that. But look deeper, if you can fathom
> that package, to try to verify it. The time in /proc/pid/stat
> is correct, but I don't think it ever gets parsed. It would be
> pretty easy to fix if that were the bug. I think it is 
> counting jiffies at some point instead of time.

It looks like it depends on the "cpu" line in /proc/stat.  On SMP
systems, that line is the sum of all the "cpuN" lines, which would
skew the ps results as we are seeing.

It looks like the procps code assumes that the "cpu" line will contain
averages instead of sums.

Of course, the documentation "proc.txt" just says that /proc/stat
contains "Overall statistics".

Perhaps procps should ascertain the number of CPUs from /proc/cpuinfo
and factor that in to the "Hertz" calculation...

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My PGP fingerprint: 15 6E C7 91 5F AF 17 C4  24 93 CB 6B EB 38 B5 E5

------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Tue, 17 Aug 1999 07:02:28 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> Toss in G++, and there will doubtless be a *host* of new bugs, just
> 'cause the code isn't *nearly* as mature.
> I suggest M3 for three reasons:
> a) There are examples of OS kernels implemented in it (SPIN);
> b) There is actual merit to the idea, as M3, while "Wirthian," is
>    nonetheless a fairly nice language, and most importantly,
> c) Since there's no subset in common with C, nobody will make the
>    mistake of thinking that it's a quick port, as might be the case
>    with C++.

I can hardly stand this ...

1.) IMHO it is best if the source corpus (the totality of all source
code of an operating system and its tools) is written in a single
language. The advantages are obvious: You just have to learn one
language, can concentrate on maintaining one compiler and not more,
you do not waste time by translating from one language into another,
can become a real expert on one language instead of having a more
vague knowledge of more languages and so on

2.) The language should be small and simple, kind of a "portable
machine language", we do not want to use recently developed
experimental language concepts. (Say things developed in the last
10 years.) (I admit that M3 is quite a stable thing.)

3.) Well, all of the above we have right now with C (ANSI C,
ISO C). We have a standard language. We can concentrate one
getting the job done in it. We do not have to waste time by
changing the language every 10 years rewriting all of the source
corpus and once its has stabilized after ten years to start
anew to rewrite in in the then-fashioned language.

Just keep on using C. Why mess it all up with M3, C++?
(Will someone come up with Java now?)

With kind regards

Andy Merkens




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: pmueller <[EMAIL PROTECTED]>
Subject: Scheduler trace for rt-apps
Date: Tue, 17 Aug 1999 09:44:43 +0200

Hi,

for (soft) rt apps it is often necessary to have a trace of the
task/thread scheduling. Is there any way to trace the scheduling of
linux tasks/threads?

Peter


------------------------------

From: Alex Vinokur <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Re: Deadly optimization bug (all versions!)
Date: Tue, 17 Aug 1999 08:07:01 GMT

In article <7p8scr$krk$[EMAIL PROTECTED]>,
  Veksler Michael <[EMAIL PROTECTED]> wrote:
>
>
> The bug shows itself on gcc-2.7.2.1, egcs-1.0.1, egcs-1.1.2, gcc-2.95.
> On AIX-4.1, Linux-x86 (RH4.2 and RH6.0).
>
> Just try to compile the following code once with -O and once without.
> This may be the reason behind some of the problems with Linux-2.2.xx
>
> (I post this here, instead of gnu.gcc.bugs, since my previous
> posts did not reach the group).
>
> The code:
>
> ---------- bug.c --------
>
> #include <stdio.h>
>
> /* If one=1, then the output should be: bit&1 */
> unsigned test(unsigned one , unsigned  bit)
> {
>     unsigned val=  bit & 1;
>     unsigned zero= one >> 1;
>
>     val++;
      printf (""); // It is an unnecessary line.
                   // All optimzation options work OK with this line.
                   //-------------------------------------------------
                   // Optimzation options -O1 and -O2 produce
                   // invalid results without this line
                   //-------------------------------------------------
                   // egcs-2.91.57 19980901 (egcs-1.1 release)
                   // SunOS 5.6
                   // So, it seems to be a compiler bug.
                   //-------------------------------------------------

>     return zero + ( val>> 1 );
> }
>
> int main()
> {
>   printf("ret=%d\n", test(1,0)); /* should print 0 */
>   printf("ret=%d\n", test(1,1)); /* should print 1 */
>   printf("ret=%d\n", test(1,65535)); /* should print 1 */
>
>   return 0;
> }
>
>

        Alex


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: Christian Mund <[EMAIL PROTECTED]>
Subject: Re: DRIVER for Toshiba DVD-RAM (only tested on kernel 2.0.36)
Date: Tue, 17 Aug 1999 08:30:47 GMT


Christoph Martin wrote:
> 
> Christian Mund <[EMAIL PROTECTED]> writes:
> 
> > 
> > Congratulations, it works !
> > 
> 
> It did not work, applying it to kernel 2.2.6. Same problems with read
> and write. Works for some time, then hangs, scsi bus reset, all
> devices hang -> reboot
> 
> Christoph
> 
Hi Christoph,

i only patched the sd.c - File and it works great for me. I can do mke2fs
and read/write to the DVD-RAM Medias. No Bus resets, Hangs.
What does dmesg say, when you get into trouble ?

With best regards,
Christian Mund





==================  Posted via CNET Linux Help  ==================
                    http://www.searchlinux.com

------------------------------

From: "Rick Carlson" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc,comp.os.linux.questions,comp.os.linux.setup,linux.dev.c-programming,linux.dev.kernel
Subject: Re: Custom login prompt...
Date: Tue, 17 Aug 1999 03:51:47 -0500

Thanks.
I already made the modifications to mingetty.
I haven't touched login or the other getty variants just yet, but the
mingetty works well.
I have uploaded the modified source code to my home page here:
http://freeweb.pdq.net/rickc/linux/esgetty/esgetty.zip

Michael L. Lockhart wrote in message <[EMAIL PROTECTED]>...
>Rick Carlson wrote:
>
>> I would like to modify the login prompt to display an interactive menu
using
>> ncurses.
>> Apparently, I did not install the source code, and I don't know where I
put
>> the CD's.
>> Can anyone point me to the exact location to download the source for the
>> mingetty program?
>> I am running RedHat 5.2 (Apollo), with Linux kernal 2.0.36 on an Intel
>> Pentium.
>>
>> Remove the obvious ".spamsucks" from my E-mail address to reply directly
to
>> me.
>>
>> Thanks,
>>
>> Rick Carlson
>> Houston, TX.
>
>There are a BAZILLION places. The www.redhat.com has a downloads area, so
does
>www.cdrom.com, and each list mirrors as well.
>
>--
>Mike Lockhart
>        -- Without Software, it's just a paper weight.
>
>
>



------------------------------

From: Ulli =?iso-8859-1?Q?W=F6lfel?= <[EMAIL PROTECTED]>
Subject: kernel 2.2.11 compile problem
Date: Tue, 17 Aug 1999 13:04:17 +0200

This is a multi-part message in MIME format.
==============88B1C78D78A0715B981560F1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

When I try to compile kernel 2.2.11 I always get the error message that
i copied into the attachment. Who can help me?

thanks,

Ulli

==============88B1C78D78A0715B981560F1
Content-Type: text/plain; charset=us-ascii;
 name="error.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="error.txt"

make[3]: Entering directory `/usr/src/linux-2.2.11/drivers/block'
gcc -D__KERNEL__ -I/usr/src/linux-2.2.11/include -Wall -Wstrict-prototypes -O2 -
fomit-frame-pointer  -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-ju
mps=2 -malign-functions=2 -DCPU=686   -DEXPORT_SYMTAB -c ll_rw_blk.c
ll_rw_blk.c: In function `add_request':
ll_rw_blk.c:349: `major' undeclared (first use this function)
ll_rw_blk.c:349: (Each undeclared identifier is reported only once
ll_rw_blk.c:349: for each function it appears in.)
ll_rw_blk.c: In function `make_request':
ll_rw_blk.c:546: too few arguments to function `attempt_merge'
ll_rw_blk.c:397: warning: unused variable `max_segments'
make[3]: *** [ll_rw_blk.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.2.11/drivers/block'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.2.11/drivers/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.11/drivers'
make: *** [_dir_drivers] Error 2

==============88B1C78D78A0715B981560F1==


------------------------------

From: [EMAIL PROTECTED]
Subject: smp kernel build with rh 6.0
Date: Tue, 17 Aug 1999 11:13:24 GMT

Hi,

I have a dual processor pentium-II  system on which I have installed
rh6.0.  The install procedure correctly detected the dual processors
and installed the smp kernel image. Now for some reason I have to
build the kernel. I have enabled the SMP support option in 'make
menuconfig'. During compilation I see the -D__SMP__ on the command
line. So far, so good.

Now when I boot with my new kernel image, my scsi driver is the
first to complain. It says

ncr53xxx.o : Kernel version mismatch

              This module is built for kernel version 2.2.5-15smp.
              This kernel is 2.2.5-15

Panic: cannot mount root (blah, blah..)

What is happening ? Even after I enable SMP support, is a non-SMP
kernel being built ? Am I missing something ?

Please help.

Rajesh K.



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: smp kernel build with rh 6.0
Date: 17 Aug 1999 14:08:00 +0200

In article <7pbg4g$orj$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I have a dual processor pentium-II  system on which I have installed
>rh6.0.  The install procedure correctly detected the dual processors
>and installed the smp kernel image. Now for some reason I have to
>build the kernel. I have enabled the SMP support option in 'make
>menuconfig'. During compilation I see the -D__SMP__ on the command
>line. So far, so good.
>
>Now when I boot with my new kernel image, my scsi driver is the
>first to complain. It says
>
>ncr53xxx.o : Kernel version mismatch
>
>             This module is built for kernel version 2.2.5-15smp.
>             This kernel is 2.2.5-15
>
>Panic: cannot mount root (blah, blah..)
>
>What is happening ? Even after I enable SMP support, is a non-SMP
>kernel being built ? Am I missing something ?
>

-15smp reflects EXTRAVERSION as found in /usr/src/linux/Makefile.

This EXTRAVERSION does not necessarily reflect the actual SMP status
of the kernel, but is conviniently used by redhat to distinguish the
pre-built versions.


As the scsi module is loaded from initrd this is still the original 
driver you will get a version conflict.

Therefore, you should either:

rebuild initrd with mkinird,

or

include the scsi driver into the compiled kernel and then eliminate initrd
from the lilo entry for your new kernel.

Villy

------------------------------

From: "Hartmut W. Malzahn" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Toshiba DVD-RAM and Linux
Date: Tue, 17 Aug 1999 14:55:20 +0200

Christoph Martin wrote:
> Mount a DVD-ROM via the /dev/scd0, then try to dd a 400M file to
> /dev/null. Same happens with the DVD-RAM, which was written under
> Windows/95. dd runs for a while happily, then it hangs, a scsi bus
> reset occurs and after that all the scsi devices hang. -> reboot :(

Strange... I just put a 1 GB file on a DVD-RAM and did a cp to /dev/null
with no problem at normal speed. Maybe this problem doesn't affect my
system, though, because I have two SCSI controllers with the hard disk
on one and DVD-RAM and another CD-ROM connected to the other.

> Applied the patch to kernel 2.2.6 and did some tests. mke2fs on the
> DVD-RAM still makes problems, like reported above while reading.

That works fine here, too, aside from being painfully slow, of course.

Cheers --- Hartmut

------------------------------

From: Warren Young <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Looking for a good IP packet analyzer
Date: Tue, 17 Aug 1999 05:43:10 -0600

M van Oosterhout wrote:
> 
> Dana Hudes wrote:
> >
> > A review of the tcpdump man page refers to another program from the same
> > group, BPF.
> > tcpdump doesn't capture outbound packets from the host it is running on.
> 
> Yes it does.

It depends on what type of host you run it on.  On Linux, yes, it
handles this.  Other, weaker OSes are often missing this capability.
-- 
= Warren Young, maintainer of the Winsock Programmer's FAQ at:
=     http://www.cyberport.com/~tangent/programming/winsock/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

------------------------------

From: Warren Young <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Looking for a good IP packet analyzer
Date: Tue, 17 Aug 1999 05:47:31 -0600

[EMAIL PROTECTED] wrote:
> 
> >    3) recognizes & formats various packet formats [raw 802; raw IP; POP;
> > NNTP; SNMP; etc. -- not for this project necessarily, but nice to have in
> > the future]

Ethereal decodes all the packet types you mention.
 
> >    3a) [would be nice] extensibility to the packet recognition & formatting
> > algorithm [Shomiti does this by allowing you to create a procedure in a .DLL
> > that recieves the raw packet and gives it the opportunity to decode it; if
> > the packet is recognizable, you repeatedly call various functions to "build
> > up" the format of the packet -- i.e., if the first two bytes of a packet are
> > an integer, you make a call to an "its_an_int" and the program displays the
> > fact that the next two bytes are an int]
> 
>   Nope, not yet.

The original poster essentially said he'd be willing to do some
programming in order to add support for special programming.  You're
right that Ethereal doesn't have an external plugin API, but that's only
necessary when you don't have the source code to the program.  With
Ethereal, you do.  I'm sure you can find out how to extend it by looking
at, say, the POP3 decoding routines.

Ain't Open Source great?
-- 
= Warren Young, maintainer of the Winsock Programmer's FAQ at:
=     http://www.cyberport.com/~tangent/programming/winsock/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

------------------------------


** 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
******************************

Reply via email to