Linux-Development-Sys Digest #687, Volume #8 Thu, 3 May 01 06:13:07 EDT
Contents:
Re: Cannot load shared object file (Allin Cottrell)
Re: Cannot load shared object file (Paul Kimoto)
Re: Startup service ("D. Stimits")
Re: Transfer data to mySQL Server ("D. Stimits")
Re: Networking in Linux
Re: ???how to get bus-address of the PCI hardware device
Re: Transfer data to mySQL Server
Re: Transfer data to mySQL Server (Dean Thompson)
Re: Transfer data to mySQL Server
Re: Transfer data to mySQL Server (Dean Thompson)
Re: Transfer data to mySQL Server ("D. Stimits")
malloc Bug? (Torsten Blank)
Lilo pble with RH 7.1 (MBR corrupted) (buffat)
Re: How to write to a file in Linux Kernel (Kasper Dupont)
Re: Startup service (Kasper Dupont)
Re: malloc Bug? (Kasper Dupont)
----------------------------------------------------------------------------
From: Allin Cottrell <[EMAIL PROTECTED]>
Subject: Re: Cannot load shared object file
Date: Wed, 02 May 2001 22:56:34 -0400
Martin wrote:
> I don't understand why /usr/lib/libstdc++-libc6.1-2.so.3 is a
> link-name to an older library file.
Blame the Gremlins. Personally, I find these flavor-of-the-month
libstdc++ libraries, with their insanely complex numbering
scheme, a complete pain in the butt. When a program (say, netscape)
complains of not finding a specific version, it's sorely tempting
just to create a symlink from something on the system that looks
sort of similar, to the version demanded. Usually the program
runs about as well as if the "real" C++ library were present.
Allin Cottrell.
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Cannot load shared object file
Date: 2 May 2001 23:27:33 -0400
Reply-To: [EMAIL PROTECTED]
In article <9R%H6.16311$[EMAIL PROTECTED]>,
Martin wrote:
> I have libstdc++2.10 installed and that contains
> /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so. I also have
> libstdc++2.10-devel and libstdc++-compat installed.
>
> I don't understand why /usr/lib/libstdc++-libc6.1-2.so.3 is a
> link-name to an older library file.
libstdc++-libc6.1-2.so.3
and
libstdc++-libc6.2-2.so.3
are different libraries with different sonames, and thus neither is
supposed to be a replacement for the other. (Presumably the first
is for programs built against glibc-2.1.*; and the second, against
glibc-2.2.*.)
--
Paul Kimoto
This message was originally posted on Usenet in plain text. Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.
------------------------------
Date: Wed, 02 May 2001 21:51:19 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Startup service
Xiaomu Zeng wrote:
>
> "D. Stimits" wrote:
>
> > >
> > > aha so it is rc.local i am looking for?
> >
> > If your only concern is to run some command at startup, yes. If it must
> > be controlled for start and stop activity at various runlevels, you'd
> > create a script to go in the init.d subdirectory; then links from the
> > various runlevel directories would determine whether the script is
> > called with a start or stop at the given runlevels. inetd is a sample of
> > something controlled at various runlevels, as well as a few other
> > daemons. To see a list of what is controlled to start or stop, try this:
> > chkconfig --list
> > (chkconfig might not be available under all distributions, I haven't
> > checked)
> >
>
> So rc.local will always be ran, at any init level (even single user mode)?
>
> Xiaomu
I have not actually tested to give you an answer. It does not use the
normal runlevel scripting, so I believe it likely does (without looking
I am guessing that the rc main init script always calls rc.local once it
has finished the last runlevel it is aiming for, aside from shutdown).
The way to test it would be to add a line to rc.local such as:
echo "rc.local has run" > /tmp/rc.test.txt
Make sure that file is empty and try rebooting to single user mode. If
the file /tmp/rc.test.txt has "rc.local has run" in it, then it ran;
otherwise not. rc.local does definitely run at normal multiuser console
and graphics mode.
D. Stimits, [EMAIL PROTECTED]
------------------------------
Date: Wed, 02 May 2001 21:52:29 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
[EMAIL PROTECTED] wrote:
>
> Hi,
> what possibilities exist to transfer few data to a mySQL Database running on
> a Linux Red Hat Server 7.0? Have I to implement my own server program in C++
> or any other programming language or are there any less complicated solution
> for this kind of problem?
>
> Thanks a lot in advance
One really big question is "what format is your current data in"?
D. Stimits, [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] ()
Crossposted-To: comp.os.linux.networking
Subject: Re: Networking in Linux
Date: Thu, 03 May 2001 07:08:42 -0000
In article <[EMAIL PROTECTED]>,
Chainsaws and Code <[EMAIL PROTECTED]> wrote:
>Does anybody know where in the source the lowest level of handling network
>packets occurs? This question is asked disreguarding drivers for NICs and
>modems and such (as in the networking device has done its job, now what?)
Just look at a NIC driver and see what's called when a packet arrives. That'll
put you on the right track.
--
http://www.spinics.net/linux
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: ???how to get bus-address of the PCI hardware device
Date: Thu, 03 May 2001 07:14:08 -0000
In article <i6_H6.7433$[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>anyone know how...
The kernel source comes with *lots* of PCI device drivers. You can
quickly find your answer be reading one.
Here's a sample from lance.c:
while ((pdev = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE,
pdev))) {
unsigned int pci_ioaddr;
unsigned short pci_command;
pci_irq_line = pdev->irq;
pci_ioaddr = pdev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
In other words find the device with pci_find_device and extract the address
from the PCI into that's returned.
--
http://www.spinics.net/linux
------------------------------
From: <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
Date: Thu, 3 May 2001 09:49:04 +0200
Hi,
>
>One really big question is "what format is your current data in"?
It could be ASCII or any other format, because i develope also the program
in win32 which will send the data to the linux red hat server.
Bye
Julia
------------------------------
From: Dean Thompson <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
Date: Thu, 03 May 2001 17:52:54 +1000
Hi Julia,
> >One really big question is "what format is your current data in"?
> It could be ASCII or any other format, because i develope also the program
> in win32 which will send the data to the linux red hat server.
You shouldn't have a problem then importing your data via a text file which is
delimited by commas for instance. Check out the "insert" command under SQL
and see whether or not it provides support for importing text files.
Additionally, you might like to check out the URL:
http://www.itlab.musc.edu/mysql_import/readme.html which is an application
written to allow you to import data into your MySQL database via a web
interface. Could it be any easier :)
You might like to check that out as being another method of getting data into
your database.
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Dean Thompson | E-mail - [EMAIL PROTECTED] |
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
------------------------------
From: <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
Date: Thu, 3 May 2001 09:58:05 +0200
Hi,
>> >One really big question is "what format is your current data in"?
>> It could be ASCII or any other format, because i develope also the
program
>> in win32 which will send the data to the linux red hat server.
>
>You shouldn't have a problem then importing your data via a text file which
is
>delimited by commas for instance. Check out the "insert" command under SQL
>and see whether or not it provides support for importing text files.
And how does mySQL know to open the text file and read the data in? Have i
there to specify a directory, where it will check for new files every minute
or something like that?
Thanks in advance
Julia
------------------------------
From: Dean Thompson <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
Date: Thu, 03 May 2001 18:11:31 +1000
Hi Julia,
>>> >One really big question is "what format is your current data in"?
>>> It could be ASCII or any other format, because i develope also the
>>> program in win32 which will send the data to the linux red hat server.
>>
>>You shouldn't have a problem then importing your data via a text file which
>>is delimited by commas for instance. Check out the "insert" command under
>>SQL and see whether or not it provides support for importing text files.
> And how does mySQL know to open the text file and read the data in? Have i
> there to specify a directory, where it will check for new files every
> minute or something like that?
The insert command takes the file from the current directory that you are in.
However, I am getting this feeling that you are developing an application
which is purely using the DBMS as a data store while allowing a client program
to maniuplate the data.
If that is the case, then you will want to look at the MySQL manual and
interface with the database over its TCP/IP port.
See ya
Dean Thompson
--
+____________________________+____________________________________________+
| Dean Thompson | E-mail - [EMAIL PROTECTED] |
| Bach. Computing (Hons) | ICQ - 45191180 |
| PhD Student | Office - <Off-Campus> |
| School Comp.Sci & Soft.Eng | Phone - +61 3 9903 2787 (Gen. Office) |
| MONASH (Caulfield Campus) | Fax - +61 3 9903 1077 |
| Melbourne, Australia | |
+----------------------------+--------------------------------------------+
------------------------------
Date: Thu, 03 May 2001 02:16:18 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Transfer data to mySQL Server
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> >> >One really big question is "what format is your current data in"?
> >> It could be ASCII or any other format, because i develope also the
> program
> >> in win32 which will send the data to the linux red hat server.
> >
> >You shouldn't have a problem then importing your data via a text file which
> is
> >delimited by commas for instance. Check out the "insert" command under SQL
> >and see whether or not it provides support for importing text files.
> And how does mySQL know to open the text file and read the data in? Have i
> there to specify a directory, where it will check for new files every minute
> or something like that?
>
> Thanks in advance
> Julia
If the text data is delimited in a way that is friendly for MySQL, it
can be fairly easy. Tab delimited (and I think comma) are trivial. The
key is the "LOAD" command. One sample reference book I have shows this:
LOAD DATA [LOCAL] INFILE file [REPLACE|IGNORE]
INTO TABLE table [delimiters] [(columns)]
Simply using "LOAD DATA INFILE" will assume tab delimited. Other options
include: "FIELDS TERMINATED BY 'c'", "FIELDS ENCLOSED BY 'c'", "FIELDS
ESCAPED BY 'c'", "LINES TERMINATED BY 'c'".
To use that you simply connect via something like:
mysql --user=julia --host=localhost -p
Then give it the pass.
C++ apps to read files as import are not particularly hard; compared to
some of the VC++ MFC stuff it is quite easy. Now something that seems
very useful here for you in particular is TkExpect. TkExpect is used to
automate command line functions basically by observing it and giving
responses. You might want to check that out for some more automated
means of doing this once you are able to do it by hand.
D. Stimits, [EMAIL PROTECTED]
------------------------------
From: Torsten Blank <[EMAIL PROTECTED]>
Subject: malloc Bug?
Date: 03 May 2001 11:15:47 +0200
Hi!
Is that a malloc (or kernel) bug:
I have written a simple test program, which allocates blocks of 100M until
malloc will return with a NULL, without writing to the allocated memory.
With that program, i get 2800M of memory. But, i only have 256M of real memory
and 256M of swap space. So, when i write to the memory after the allocation process
the program breaks with a seqfault.
I use Suse Linux 7.1 with kernel 2.2.16
greetings, Torsten Blank
--
Torsten Blank
Institut fuer Theoretische Physik der Uni Karlsruhe
Tel: 0721 / 608 6365 Fax: 0721 / 608 3582
Web: http://www-itp.physik.uni-karlsruhe.de/~tb
------------------------------
From: buffat <[EMAIL PROTECTED]>
Subject: Lilo pble with RH 7.1 (MBR corrupted)
Date: Thu, 3 May 2001 11:18:46 +0200
I have installed the new Redhat 7.1 on a working linux system running RH
7.0 (Athlon 750 , 256 M Ram, 3 IDE disk). During the installation a CDROM
problem hang the process of the update, and I had to reinstall (update)
RH 7.1. But this time the MBR record was corrupted and I am unable to
restore it. My system is now running, but only with a lilo boot floppy.
Otherwise I get the infamous LI when starting from the 1st ide (15 Giga
Maxtor UDMA 66). I have try to restore the MBR from window with fdisk /MBR
but without success. I have try to copy the boot (boot.0300) file save by
lilo to the MBR with dd, without success. I have even try to fill the MBR
with 0, but it erase the partition table on my disk, and I have to do a
recovery. I have try to put all the boot directory on the 1st partition of
the disk (WIN98 partition), as the Linux root partition is on the 2nd ide
disk.
My question is: how can I put a new MBR on my ide0 disk (5 Giga Maxtor UDMA
66), in order to boot again directly from disk.
Any advice will be appreciated.
--
Marc BUFFAT, Pr. Universite Claude Bernard LYON I
tel: (33) 04/72/43/10/05 (UCBL)
fax: (33) 04/72/44/80/54
[EMAIL PROTECTED] | http://mecapar.univ-lyon1.fr
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: How to write to a file in Linux Kernel
Date: Thu, 03 May 2001 09:22:40 +0000
Massimiliano Caovilla wrote:
>
> ouyang wrote:
> >
> > I am using Linux Kernel 2.2.16.
> > I want to write to a file when I am in kernel.
> > What should I do?
> > Your help will be greatly appreciated.
> >
> > vincent
>
> Hi
> everyone on the newsgroup will tell you not to do it. But if you really
> want to, you have to allocate a struct file *, get it via a filp_open(),
> then directly access write/read/ioctl or whatever via the pointers in
> the file struct. kind of this
>
> struct file *pr_file;
> oldfs mm_offset_t;
>
> pr_file = filp_open("/etc/pino.conf",O_RDONLY,600);
> if IS_ERR(pr_file) {
> printk("error \n");
> return(-EINVALID);
> }
> oldfs=get_fs();
> set_fs(KERNEL_DS);
> pr_file->f_op->write(pr_file,(caddr_t)base,len,&pr_file->f_pos);
> set_fs(oldfs);
> fput(pr_file);
> The oldfs stuff is needed because usually write and read work with user
> memory buffers.
>
> Ciao, if u want more help write me also at [EMAIL PROTECTED]
> Massimiliano
> you will have to
You have to verify the f_op and write fields
before using them, they could be NULL pointers.
Also notice that this will require the current
process to have read permitions to the file,
if that is not desirable you have to do
something else.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Startup service
Date: Thu, 03 May 2001 09:35:28 +0000
D. Stimits wrote:
>
> Xiaomu Zeng wrote:
> >
> > "D. Stimits" wrote:
> >
> > > >
> > > > aha so it is rc.local i am looking for?
> > >
> > > If your only concern is to run some command at startup, yes. If it must
> > > be controlled for start and stop activity at various runlevels, you'd
> > > create a script to go in the init.d subdirectory; then links from the
> > > various runlevel directories would determine whether the script is
> > > called with a start or stop at the given runlevels. inetd is a sample of
> > > something controlled at various runlevels, as well as a few other
> > > daemons. To see a list of what is controlled to start or stop, try this:
> > > chkconfig --list
> > > (chkconfig might not be available under all distributions, I haven't
> > > checked)
> > >
> >
> > So rc.local will always be ran, at any init level (even single user mode)?
> >
> > Xiaomu
>
> I have not actually tested to give you an answer. It does not use the
> normal runlevel scripting, so I believe it likely does (without looking
> I am guessing that the rc main init script always calls rc.local once it
> has finished the last runlevel it is aiming for, aside from shutdown).
> The way to test it would be to add a line to rc.local such as:
> echo "rc.local has run" > /tmp/rc.test.txt
>
> Make sure that file is empty and try rebooting to single user mode. If
> the file /tmp/rc.test.txt has "rc.local has run" in it, then it ran;
> otherwise not. rc.local does definitely run at normal multiuser console
> and graphics mode.
>
> D. Stimits, [EMAIL PROTECTED]
This command will tell you in which runlevels rc.local
will be executed:
ls -l /etc/rc.d/*/*local*
The sequence of actions during startup is the following:
the init program /sbin/init will load a configuration
file from /etc/inittab. The configuration file will tell
init to execute /etc/rc.d/rc, this script will execute
all start scripts from the appropriate runlevel directory.
--
Kasper Dupont
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: malloc Bug?
Date: Thu, 03 May 2001 09:49:31 +0000
Torsten Blank wrote:
>
> Hi!
>
> Is that a malloc (or kernel) bug:
>
> I have written a simple test program, which allocates blocks of 100M until
> malloc will return with a NULL, without writing to the allocated memory.
> With that program, i get 2800M of memory. But, i only have 256M of real memory
> and 256M of swap space. So, when i write to the memory after the allocation process
> the program breaks with a seqfault.
>
> I use Suse Linux 7.1 with kernel 2.2.16
>
> greetings, Torsten Blank
>
> --
> Torsten Blank
> Institut fuer Theoretische Physik der Uni Karlsruhe
> Tel: 0721 / 608 6365 Fax: 0721 / 608 3582
> Web: http://www-itp.physik.uni-karlsruhe.de/~tb
Do you have overcommiting enabled?
cat /proc/sys/vm/overcommit_memory
--
Kasper Dupont
------------------------------
** 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 the
comp.os.linux.development.system newsgroup.
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
******************************