Linux-Development-Sys Digest #124, Volume #8 Tue, 5 Sep 00 10:13:15 EDT
Contents:
Re: HTML mail? (The Ghost In The Machine)
Re: Problem with SMP kernel on Tekram motherboard ("D. Stimits")
Re: HTML mail? ("Ross Crawford")
Re: Linux server to hold thousands of tcp connections? (Dan Kegel)
Re: Swap Atomically? (Kalle Olavi Niemitalo)
Re: adding a module (Susukita Ryutaro)
Syslog ("Sylvain")
Re: Time critical code (Kasper Dupont)
Re: /dev/log (Qing Liu)
Reading books or learning sample codes: Which is better? (Hans)
Re: Reading books or learning sample codes: Which is better?
("[EMAIL PROTECTED]")
will GUI program compile using gtk+ run on KDE? ("Richard Lim")
Qt or gtk+ is better in programming GUI program that can run on both KDE and GNOME?
("Richard Lim")
Re: Qt or gtk+ is better in programming GUI program that can run on both KDE and
GNOME? (Mikko Rauhala)
Re: will GUI program compile using gtk+ run on KDE? ("Andrew J Hobden")
Re: Alocate a memory location above 4G of memory (David Wu)
Re: Resolution of select timeout (Kasper Dupont)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (The Ghost In The Machine)
Subject: Re: HTML mail?
Date: Mon, 04 Sep 2000 23:13:09 GMT
In comp.os.linux.development.system, Frank Sweetser
<[EMAIL PROTECTED]>
wrote
on 23 Jul 2000 18:21:46 GMT
<[EMAIL PROTECTED]>:
>Marc A. Lepage <[EMAIL PROTECTED]> wrote:
>>Larry Ebbitt wrote:
>>>
>>> "Marc A. Lepage" wrote:
>>> >
>>>
>>> > So how do I send HTML email using mail on the command line? Is there a
>>> > way to specify that the content of the message is HTML instead of text?
>>> > How do I go about this?
>>> >
>>>
>>> HTML is for the web. Mail should be plain, monospaced text, no wider than
>>> 76 characters or so. I filter HTML mail, which is almost always spam,
>>> directly to the bit bucket.
>>
>>Thanks for the lecture.
>>
>>This is to be internal corporate mail on an intranet. It will report the
>>results of nightly automated builds to software developers. It will
>>include summaries of compilation and unit test run logs. It will include
>>hyperlinks to the full logs for developers to consult when failures have
>>occurred.
>
>Fair enough.
>
>The answer is very simple - the mail app sends what it gets. Give it
>plain text, it sends text. If you want to send html, send it html.
>
>echo "<html> (etc, etc) </html>" | mail ...
Not quite that simple, although that's part of it; one has to
also have the following in the headers:
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
That way, things like Lotus Notes will process it properly on
the remote end -- if that's an issue.
>
>--
>Frank Sweetser rasmusin at wpi.edu, fs at suave.net
>Full-time WPI Network Tech, Part time Linux/Perl guy
>If I don't document something, it's usually either for a good reason,
>or a bad reason. In this case it's a good reason. :-)
> -- Larry Wall in <[EMAIL PROTECTED]>
--
[EMAIL PROTECTED] -- insert random misquote here
------------------------------
Date: Mon, 04 Sep 2000 19:11:27 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: Re: Problem with SMP kernel on Tekram motherboard
Is this m/b an Intel i840 chipset (Tekram website makes it hard to
search by model number)? If so, there is a strong chance it is the
IO-APIC. If not i840, you might be able to ignore this. In
/var/log/messages, search for this:
kernel: WARNING: unexpected IO-APIC, please mail
Assuming this is present, on rare occasions, you will get something like
this, for either cpu#0 or cpu#1 (when the system dies, if you are lucky
enough for the disk controller to have time, it will write one last
death message):
kernel: unexpected IRQ vector 217 on CPU#0!
If you find either of these, try running SMP, but use kernel option
"noapic" when booting from lilo. E.G., if you have an smp kernel name
2.2.14-5.0smp, at the lilo prompt, hit tab to see what is there, then:
2.2.14-5.0smp noapic
This sounds very similar to the IO-APIC problem i840 SuperMicro boards
have.
Brian Shea wrote:
>
> I am running Redhat 6.2 kernel version 2.2.14-5.0smp and get this
> message before the system locks up.
>
> hda: lost interrupt
>
> This ONLY happens in SMP, I have been using single processor kernel for
> two days and have not had the problem. I first noticed the problem when
> i tried to recompile the modules for smp kernel running the smp kernel
> to test the speed. After the hard drive stoped thrashing that message
> was displayed.
>
> I amagine it has something to do the the interrupt mapping but I have no
>
> experience with smp programming. It only does this in the smp kernel.
>
> I read the IO-APIC document and it explanes how to exclude pci irq's
> connected to the apic but I not sure this is the problem.
>
> I have read a couple of the how-to' s and seached redhats sight but have
>
> found nothing.
>
> I have posted this message on news://comp.os.linux.development.system
> and news://comp.os.linux.hardware because i don't know who to tell.
>
> System Info
>
> Motherboard: Tekram P6B40D-A5
> Memory: 256MB
> hda: Maxtor 11.9GB
> hdb: ZipDrive (100MB)
> hdc: Yamaha CDRW
> hdd: Atapi 40x cdrom
>
> lspci >
>
> 00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge
>
> (rev 02)
> 00:01.0 PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge
> (rev 02)
> 00:07.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
> 00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
> 00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
> 00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 02)
> 00:09.0 Ethernet controller: Lite-On Communications Inc LNE100TX (rev
> 20)
> 00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> RTL-8029(AS)
> 00:0b.0 Multimedia audio controller: Creative Labs SB Live! EMU10000
> (rev 04)
> 00:0b.1 Input device controller: Creative Labs SB Live! (rev 01)
> 01:00.0 VGA compatible controller: nVidia Corporation Riva TNT2 Ultra
> (rev 11)
>
> cat /proc/cpuinfo > (single cpu mode, processor 1 not shown)
>
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 6
> model name : Celeron (Mendocino)
> stepping : 5
> cpu MHz : 534.558811
> cache size : 128 KB
> fdiv_bug : no
> hlt_bug : no
> sep_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 2
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 mmx fxsr
> bogomips : 532.48
------------------------------
From: "Ross Crawford" <[EMAIL PROTECTED]>
Subject: Re: HTML mail?
Date: Tue, 5 Sep 2000 11:21:58 +1000
"The Ghost In The Machine" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]...
> In comp.os.linux.development.system, Frank Sweetser
> <[EMAIL PROTECTED]>
> wrote
> >Fair enough.
> >
> >The answer is very simple - the mail app sends what it gets. Give it
> >plain text, it sends text. If you want to send html, send it html.
> >
> >echo "<html> (etc, etc) </html>" | mail ...
>
> Not quite that simple, although that's part of it; one has to
> also have the following in the headers:
>
> MIME-Version: 1.0
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> That way, things like Lotus Notes will process it properly on
> the remote end -- if that's an issue.
>
And what's stopping you from doing that using the above technique? I've
written a few (and seen many more) CGI scripts which do exactly that to
render HTML.
Regards,
ROSCO
------------------------------
From: Dan Kegel <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.networking,comp.protocols.tcp-ip
Subject: Re: Linux server to hold thousands of tcp connections?
Date: Mon, 04 Sep 2000 21:05:36 -0700
J R wrote:
> I am building an IM server for LINUX that will accept connections and
> hold them open for asyn communication (very much the same as AOL). I
> need some ideas about how to go about this.
>
> Should I use BSD sockets or go to a lower layer?
Use BSD sockets and TCP. (I've used UDP for chat, and regretted it.)
> What are the max # of
> BSD sockets that could probably be held open at the same time on LINUX?
Somewhere between 10,000 and 100,000 with the 2.4 kernel.
I suggest starting out with a single-threaded model using
poll(). You may never need to add additional threads; since
you won't be doing any disk I/O or slow computations, nothing
should block long enough for you to benefit from multiple threads.
See http://www.kegel.com/c10k.html for more info.
Also see http://www.kegel.com/dkftpbench/doc/Poller_poll.html
for a nifty lightweight C++ wrapper around poll(). The
advantage of this is it'll let you switch to the higher-performance
/dev/poll interface without rewriting your code.
One last bit of advice: write a load test app! See
http://www.kegel.com/dkftpbench/ for a load test app for FTP
for ideas. (I haven't converted it to use Poller yet, but I hope
to soon.)
- Dan
------------------------------
Subject: Re: Swap Atomically?
From: Kalle Olavi Niemitalo <[EMAIL PROTECTED]>
Reply-To: Kalle Olavi Niemitalo <[EMAIL PROTECTED]>
Date: 04 Sep 2000 20:50:57 +0300
"KIM, HYUNG-IL" <[EMAIL PROTECTED]> writes:
> I developed simple lock management system in AIX.
> And now, I'm porting that into Linux.
Have you looked at <pthread.h>? It already has mutexes.
> For concurrency control, I used system function "compare_and_swap()" in AIX.
> That fuction do "test and set", so called. That compare two value and swap
> in some condition, then return 0 or 1. Important thing is all instructions
> are done atomically.
i486 has a "cmpxchg" instruction which does something like that:
it compares a value in memory to a value in a register, and if
they match, it stores another value in that memory location. You
could perhaps define compare_and_swap as an inline function which
runs that instruction. What parameters does the AIX function
take?
------------------------------
From: [EMAIL PROTECTED] (Susukita Ryutaro)
Subject: Re: adding a module
Date: 5 Sep 2000 05:18:32 GMT
>> If you use kerneld (a daemon that handles module requests buy the
>> kernel) you just add the line:
>> alias name mydriver
>> where name is the module's id in register_chrdev() or whatever call you
>> use.
>>
>> Never use char-major-xxx because of what you said: the major changes!
>>
>> --Bruno
I am sorry my follow is late.
The kerneld is not running on my 2.2.x system. In the manpage of
kerneld, 'kerneld is obsolete as of kernel 2.1.90'.
The module's id in register_chrdev() is 'mydriver'.
Computational Science Division
The Institute of Physics and Chemistry(RIKEN)
SUSUKITA Ryutaro
------------------------------
From: "Sylvain" <[EMAIL PROTECTED]>
Subject: Syslog
Date: Tue, 5 Sep 2000 09:54:11 +0200
Hello,
I'm running into a syslog problem for weeks now and can't see any issue. I
did not find any helpful hints on newsgroup I posted and wonder if someone
here could help with this :
The goal : setting up a bootable CD-ROM based on RedHat 6.2
The problem : syslog does not log !
When booting, syslog is launched by the init scripts and does not log
anything except "Syslog restarting ..."
If I just launch it manually after the boot, it will work.
I modified the init scripts to launch it without a special daemon calling
function, does not change anything.
The interesting part : I made system call traces with strace and found :
- syslog opens /dev/log as a SOCK_DGRAM socket,
- loggers ("logger" for example) can't open /dev/log socket : get a
EPROTOTYPE error when opening with SOCK_DGRAM. Works when opening with
SOCK_STREAM. But that does not log as syslog opened the socket in SOCK_DGRAM
mode.
I think this is most of the problem but can't find a solution.
Note : I boot the system with a read-only root fs and a ramdisk over /var.
Kernel is 2.2.16 patched with devfs. When rebooting with a read-write root
fs, I have no problem at all !! But strace did not show something about
"logger" or "syslog" having troubles to open a file on the read-only fs
(except for the socket : see previous EPROTOTYPE error).
I don't think there is a user right problem as /dev/log is created 666 by
syslog (also some more info that let me write this, but too long here).
I someone could help about this problem, I just have no more ideas ...
Thanks in advance.
Sylvain.
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Time critical code
Date: Tue, 05 Sep 2000 11:52:53 +0200
Peter Pointner wrote:
>
> Yusuf Motiwala <[EMAIL PROTECTED]> wrote:
> > Thanks for reply, but I think cli/sti will not stop scheduler and
> > hence task switching. right? any idea.
>
> It does stop task switching, because nothing will call the scheduler.
> Of course you must make sure you don't give up the cpu voluntarily.
>
> Peter
This of course will only work in kernel mode.
Is there any simple way to do the same from
user mode?
--
Kasper Dupont
------------------------------
From: Qing Liu <[EMAIL PROTECTED]>
Subject: Re: /dev/log
Date: 05 Sep 2000 12:05:40 +0200
[EMAIL PROTECTED] (The Ghost In The Machine) writes:
> As for /dev/log, I'm not sure what that particular socket is
> used for, although I suspect it's for system logging.
You are right, it is used for syslogd.
--
Liu
------------------------------
From: Hans <[EMAIL PROTECTED]>
Subject: Reading books or learning sample codes: Which is better?
Date: Tue, 05 Sep 2000 09:59:59 GMT
Hello,
I'm a newbie Linux programmer. I used to develop M$ Windows applications,
especially GUI part. There are many books about programming in Linux. But, to
buy all the books beyond budget. So, I'm considering online resources for
learning Linux programming.
In addition, if you know a site which has collection of sample codes inform
me. To analize Kernel source or good program is next step of beginner. :-)
Thanks,
--
My homepage is 'http://www.geocities.com/flyingdoggle/main.html'
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: Reading books or learning sample codes: Which is better?
Date: Tue, 05 Sep 2000 12:52:34 +0200
Hi,
Do both,
But if you are a newbie programmer start with the documentation
A good start is http://www.linuxdoc.org/ i.e. linux documentation project
Some of this is real old,
What programming did you do
(please don't say M$-VB)
Maybe I can help with specific documentation,
Richard
Hans wrote:
> Hello,
>
> I'm a newbie Linux programmer. I used to develop M$ Windows applications,
> especially GUI part. There are many books about programming in Linux. But, to
> buy all the books beyond budget. So, I'm considering online resources for
> learning Linux programming.
>
> In addition, if you know a site which has collection of sample codes inform
> me. To analize Kernel source or good program is next step of beginner. :-)
>
> Thanks,
>
> --
> My homepage is 'http://www.geocities.com/flyingdoggle/main.html'
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
From: "Richard Lim" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: will GUI program compile using gtk+ run on KDE?
Date: Tue, 5 Sep 2000 19:33:31 +0800
can I use gtk+ to program GUI application and run it in KDE other then GNOME
which I suppose it is suppose to run on.
------------------------------
From: "Richard Lim" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Qt or gtk+ is better in programming GUI program that can run on both KDE and
GNOME?
Date: Tue, 5 Sep 2000 19:38:16 +0800
Qt or gtk+ is better in programming GUI program that can run on both KDE and
GNOME?
please advice.
thanxs.
regards,
richard lim
------------------------------
From: [EMAIL PROTECTED] (Mikko Rauhala)
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Re: Qt or gtk+ is better in programming GUI program that can run on both KDE
and GNOME?
Date: 5 Sep 2000 11:57:25 GMT
Reply-To: [EMAIL PROTECTED]
On Tue, 5 Sep 2000 19:38:16 +0800, Richard Lim <[EMAIL PROTECTED]> wrote:
>Qt or gtk+ is better in programming GUI program that can run on both KDE and
>GNOME?
Neither is really better than the other in this particular regard,
so make your decision based on licensing and the language you want
to use and the availability and quality of the appropriate language
bindings.
I'd personally make a it gnome program, since I prefer gtk+ in both of
the above regards and gnome programs can run quite happily in kde (and
vice versa, of course).
--
Mikko Rauhala - [EMAIL PROTECTED] - http://www.iki.fi/mjr/
------------------------------
From: "Andrew J Hobden" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Re: will GUI program compile using gtk+ run on KDE?
Date: Tue, 5 Sep 2000 13:04:44 +0100
gtk+ is not dependent on gnome, gnome uses gtk+
As long as you have the gtk libs installed on your system you can run your
app under kde fine.
Richard Lim <[EMAIL PROTECTED]> wrote in message
news:8p2lrr$6qs$[EMAIL PROTECTED]...
> can I use gtk+ to program GUI application and run it in KDE other then
GNOME
> which I suppose it is suppose to run on.
>
>
------------------------------
From: David Wu <[EMAIL PROTECTED]>
Subject: Re: Alocate a memory location above 4G of memory
Date: Tue, 05 Sep 2000 09:31:25 -0400
Thanks for the reply. I try to search for "mmap64" in 2.4 source but cannot find
it. Is it under a different name ? Thanks ... Dave Wu
Karl Heyes wrote:
> In article <[EMAIL PROTECTED]>, David Wu <[EMAIL PROTECTED]> wrote:
> > In linux 2.4, ( since it supports up to 64G of memory) is it possible is
> > specify a physical address of greater than 4G bytes in mmap's address parm. ?
> > My basic problem is that I need to address a specific memory location which
> > is above the 4G bytes. If mmap cannot do it , can I write a device driver
> > to do the allocation for the application. ( I'm thinking about the Intel's
> > PSE36 driver in Window NT which allows an user to address memory above 4G)
> >
>
> the mmap interface is 32 bit. you would have to use mmap64 to address bigger
> areas of memory. try and avoid going back to the segmented model.
>
> karl
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Resolution of select timeout
Date: Tue, 05 Sep 2000 15:42:28 +0200
Rick Ellis wrote:
>
> In article <[EMAIL PROTECTED]>,
> Peter Mueller <[EMAIL PROTECTED]> wrote:
>
> >I use select to get notefied of some timeouts. I found that the resolution of
> >the timeout time is 10 milli seconds. Is my measurement true?
>
> That makes sense with default 100 Hz clock.
The speed of the clock is given in linux/include/asm-i386/param.h,
it can be changed, but not all programs will work with other values.
On my computer everything seemed to work with 1000 Hz, except from
recording disk at once CDs.
Other values are not supported by proclib, so they could cause many
problems. The maximum posible speed allowed by the timer hardware
used in PCs is 596590 Hz, but the speed of your CPU probably sets
a lower limit.
The inaccuracy because of rounding errors might depend on the value
you select, but I cannot tell exactly which values are best.
>
> --
> http://www.fnet.net/~ellis/photo/linux.html
------------------------------
** 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
******************************