Linux-Development-Sys Digest #662, Volume #7 Wed, 8 Mar 00 11:13:20 EST
Contents:
Re: how mmap realy works (Dieter Stueken)
Re: select on sockets. ("Sameer Singh Chabungbam (expires 06-2000)")
Do I need a username and password? 7110 ([EMAIL PROTECTED])
disk IO performace tool (Dieter Stueken)
Re: disk IO performace tool (James Cownie)
Re: Creating VB RAD Style Application to Linux (Christopher Browne)
Re: Absolute failure of Linux dead ahead? (Wolfgang Weisselberg)
Re: Impasse with 2 SCSI controllers, kernel mods required? (John Belew)
Re: Swapping HDs... how best to do it? (Mike Dowling)
frame grabber card (Verena Vanessa Hafner)
Re: Do I need a username and password? 7110 (Max)
Re: disk IO performace tool ("Bernard Beauchamp")
Re: Why a file system ? (David Fox)
Re: How can I map kernel space to user space ?? (Fabrice Peix)
Re: Why a file system ? (Alexander Viro)
----------------------------------------------------------------------------
From: Dieter Stueken <[EMAIL PROTECTED]>
Subject: Re: how mmap realy works
Date: Wed, 08 Mar 2000 13:34:00 +0100
liran wrote:
>
> Hi,
> i wonder lately how the mmap method realy works.
> it seems that there is full synchronization between the
> file that have been mapped and the memory,but actuly it
> doesnt make sense that each approach to the memory will
> make some kind of interrupt to flush the memory to the
> storage device,where the file seats.
Hi Liran,
your misunderstanding is, that reading from a file means reading
from disk, you forget about the buffer cache. If a file is read
the system will first look into the cache, if parts of the file
are already in memory. mmapped files are updated against this
buffer cache, so there is no overhead. Even better, the MMU
hardware allows, that the buffer cache and the processes mmapped
memory are physically the same!
But your problem may be true for files accessed thru a network.
Here the altered data must be updated thru the network, so you
have a time gap of unsyncronized data when accessing the data
from a third host.
BTW. there is also a flag (MAP_PRIVATE) to separate changes of
the mmaped data from the file data.
Many people are suspicious about using mmap. In my opinion however
it is much more elegant and even faster to use than traditional
lseek/read/write in many situations, especially when randomly accessing
small parts of an existing large file.
Dieter.
--
Dieter St�ken, con terra GmbH, M�nster
[EMAIL PROTECTED] [EMAIL PROTECTED]
http://www.conterra.de/ http://qgp.uni-muenster.de/~stueken
(0)251-980-2027 (0)251-83-334974
------------------------------
From: "Sameer Singh Chabungbam (expires 06-2000)" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer
Subject: Re: select on sockets.
Date: Wed, 08 Mar 2000 13:27:59 +0100
tommie jones wrote:
>
> When I do a select on a set of file descripters (in readfs)
> I not only get a response when a file descriptor is ready to be read
> from but also when a file descriptor is closed by the server (dealing
> with sockets here) what other type of events will select tell me about,
> is there a way to tell which event happened.
Yes there is. Look the man page of select and recv for that. Basically
what you do is something like the following (It is part of an actual
code - slightly edited):
============
rdyCount = select(maxFD, &selFDvar, NULL, NULL, NULL);
if (rdyCount < 0) {
/* are we interrupted ? if so repeat */
if (errno == EINTR) {
/* perhaps you want to log the error TODO */
continue;
}
/* this is an error - log it please TODO */
continue;
}
/*
* We have an event - classify the event.
*/
if (FD_ISSET(axSocket, &selFDset)) {
/* an AgentX packet is ready or the socket is closed */
readCount = read(ZaxSocket, recvBuf, C_BUFSIZE);
if (readCount > 0) {
/* Normal data is available */
ProcessPkt(recvBuf, readCount);
} else if (readCount < 0) {
/* This is error in reading the socket */
/* Could be that we are interrupted?*/
if (errno == EINTR) {
/* What do you do then? */
} else {
/* TODO Log to the error handler */
}
} else /* readCount == 0 */ {
/* Connection has been closed by the othe party. We
* try to open a new connection. But it turns out that
* it is not as simple as that. TODO */
/* TODO - We fix the read problem by removing the read
* from the socket. */
close (axSocket);
FD_CLR(axSocket, selFDset);
}
===========
This code is meant to be illustrative.
Hope it helps.
regards,
- sameer.
--
/* I was once told to "code" my replies. And hence, the following ;-) */
main(int a,char*__,char*_){_&&main((++a<<a<<!!_)+!!_,"lm`*gcZe7YgYX_Rc",
0)&&putchar((a<<a)+a)||(--a&&putchar(*(--__+a++)+a)&&main(--a,++__,0));}
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To:
comp.os.linux.hardware,comp.os.linux.m68k,comp.os.linux.misc,comp.os.linux.networking
Subject: Do I need a username and password? 7110
Date: Wed, 8 Mar 2000 12:50:47 -0000
Brokers, Inc. Specializes in Sourcing Operating Systems and Application Software from
liquidators or Overstocked suppliers. We then offer these incredible findings to the
public at unbelievable savings...
============================================================================
New Microsoft Windows 2000 Professional
Web Software Brokers...New Just Released version, this is the real thing. You can get
it from us, here now!!! This Microsoft Windows 2000 Professional or NT 5.0 as it's
known to the industry is an OEM version of the OS and is distributed to manufacturers.
The combined features of Windows� 2000 Professional create the mainstream operating
system for desktop and notebook computing in all organizations. Microsoft took the
best business features of Windows 98-Plug and Play, easy-to-use user interface, and
power management-and made them better. Plus they integrated the strengths of Windows
NT�-standards-based security, manageability and reliability. Thinking of upgrading or
buying a new PC, don't wait upgrade now. Only $169.00 + P&H
New Microsoft Office 2000 Small Business
Web Software Brokers, Inc. ...New Version, this is the real thing. You can get it
from us, here now!!! Microsoft Office 2000 Small Business...Only $226.00 + P&H
New Microsoft Office 2000 Professional
Web Software Brokers, Inc. ...New Version, this is the real thing. You can get it
from us, here now!!! Microsoft Office 2000 Professional...Only $299.00 + P&H
=============================================================================
WE ACCEPT VISA, M/C, AMEX, DISCOVER OR CASHIERS CHECK.
Wayne Carson
Brokers, Inc. ~ Providing Affordable Software & PCs!
(800) 970-7866
ncdgvstvlubotsgrscokpqibc
------------------------------
From: Dieter Stueken <[EMAIL PROTECTED]>
Subject: disk IO performace tool
Date: Wed, 08 Mar 2000 14:33:37 +0100
I have 8 SCSI disks and 4 IDE disks connected and in use by an
ORACLE server. Is there a tool to monitor disk-IO for all disk?
I found statistics counters for the SCSI devices accessable via /proc.
Is there something equivalent for IDE, too? I think those counters
should be placed on the block-device or filesystem level, but I could
not find anything in the kernel source.
Does someone know about some prototype GUI for that like "xload" or so?
Dieter.
--
Dieter St�ken, con terra GmbH, M�nster
[EMAIL PROTECTED] [EMAIL PROTECTED]
http://www.conterra.de/ http://qgp.uni-muenster.de/~stueken
(0)251-980-2027 (0)251-83-334974
------------------------------
From: James Cownie <[EMAIL PROTECTED]>
Subject: Re: disk IO performace tool
Date: Wed, 08 Mar 2000 13:39:34 +0000
Dieter Stueken wrote:
> Does someone know about some prototype GUI for that like "xload" or so?
Try
http://www.gedanken.demon.co.uk/procmeter3/
as one example.
-- Jim
James Cownie <[EMAIL PROTECTED]>
Etnus, Inc. +44 117 9071438
http://www.etnus.com
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Creating VB RAD Style Application to Linux
Reply-To: [EMAIL PROTECTED]
Date: Wed, 08 Mar 2000 13:42:12 GMT
Centuries ago, Nostradamus foresaw a time when Kaz Kylheku would say:
>On Mon, 6 Mar 2000 14:18:57 -0000, EiNet <[EMAIL PROTECTED]> wrote:
>>Hi dear Linux Developers,
>>
>>I come from MS Windows and when I started long time ago we can only develop
>>to windows with complicated languages like C. And there were not so much
>>developers for MS Windows. Then one day Microsoft had the great idea of
>>developing a really simple environment using a easy to understand and low
>>learning curve language called Visual Basic.
>>
>>Well. Windows development blast off, and I believe that this was the way
>>that Microsoft could fight Mac best environment.
>>
>>I challenge you to create and easy to use IDE just like this. It can be
>>called LinuxBasic.
>
>There already are GUI scripting languages for UNIX like environments. Tcl/Tk
>comes to mind, plus tools like Python with bolted on GUI support.
Indeed.
>>I think a IDE like this will be important for the future of Linux. It can
>>attract many people used to develop to Windows with VisualBasic to port
>>their applications to Linux.
>
>There exists at least one commercial VB workalike for UNIX systems.
>Do a web search for VBVM and VBIX.
Note also:
<http://www.multimania.com/sxpert/gnuvb/> GNU Visual BASIC
<http://wcnet.org/~mtrausch/> The UBasic Project - Multiplatform
BASIC
<http://script.basic.hu> ScriptBasic
>Anyway, nobody develops serious Windows applications with VB, just toys and
>customizations of existing applications which are themselves written in C or
>C++.
Indeed. The problem is that it provides an application framework that
is not terribly scalable, along with a language model that is not
terribly scalable.
>The VB language itself is an abomination in the face of computer science.
>Your suggested project would require people who are intelligent enough to
>complete the project, yet at the same time sufficiently excited about Visual
>Basic to take it on in the first place.
>
>If it weren't for the WINE project, I would tend to believe that such people
>cannot possibly exist.
Well, it sorta looks like the GNOME folks are planning to build some
such thing, particularly to support Gnumeric's emulation of Excel...
Today's BASIC is neither the same language as:
a) The Microsoft Level II BASIC that many of us "grew up with" nor is it
b) The original design of Kemeny and Kurtz, complete with matrix ops.
The top choices for scripting in applications probably ought to be
Python and Scheme...
--
LISP car-and-cdr worlds are a more reasonable representation of the things
that make life interesting than fixed decimal(15) or FILE OLDMSTR RECORD IS
PAYROLL.
-- Bernie Greenberg.
[EMAIL PROTECTED] - - <http://www.hex.net/~cbbrowne/lsf.html>
------------------------------
From: [EMAIL PROTECTED] (Wolfgang Weisselberg)
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Absolute failure of Linux dead ahead?
Date: 8 Mar 2000 14:15:19 GMT
Reply-To: [EMAIL PROTECTED]
On 07 Mar 2000 20:54:46 +0000,
Nix <$}xinix{[email protected]> wrote:
> [EMAIL PROTECTED] (Wolfgang Weisselberg) writes:
> > Also the 2038-problem differs because it is Not There on 64bit
> > machines
> Filesystems use time_t too.
Semi-sane Fs use version-numbers. So use a different one (or a
flag) when you compile it for 64 bits.
Or do you use dd to transfer raw partitions between different
architectures?
-Wolfgang
------------------------------
Crossposted-To: comp.os.linux.hardware,comp.os.linux.setup,alt.os.linux.caldera
Subject: Re: Impasse with 2 SCSI controllers, kernel mods required?
From: John Belew <[EMAIL PROTECTED]>
Date: 08 Mar 2000 06:16:39 -0800
I have a similar problem (Adaptec 7880 and 2940UW adapters) with a
RedHat 6.1 installation.
RedHat describes the problem at:
http://www.redhat.com/support/docs/gotchas/6.1/gotchas-6.1-6.html#ss6.27
with the words
Systems with multiple SCSI cards will find that the SCSI modules
have been loaded in the opposite order than specified. This can
cause drives letters to change due to Linux's SCSI way of dealing
with drives.
but I followed their suggested fix, without solving the problem.
--
< John Belew >
------------------------------
From: [EMAIL PROTECTED] (Mike Dowling)
Subject: Re: Swapping HDs... how best to do it?
Date: 8 Mar 2000 14:23:27 GMT
On 07 Mar 2000 15:15:08 -0500, Paul D. Smith <[EMAIL PROTECTED]> wrote:
>So... I have this crusty old 2G drive that contains all my Linux
>partitions.
>
>It's getting stuffy on there, and really, HD space is _so_ cheap, so I
>went out and got a new 15G HD.
Wow! I cannot get my 2GB disk even half full. My system is around 640
MB, just big enough to back up to a CD.
>Now I want to put my current Linux install on the new disk and get rid
>of the old one (it's 4 years old or so, and I don't really have the
>slots to keep it around anyway).
What I think you are saying is that you want to copy your old system
onto the new disks. No worries.
1. Put new disk into computer with a SCSI id large enough to ensure
that your old system is booted.
2. Boot.
3. Create partitions on /dev/sdb as desired.
4. Mount the partitions. For example, a partition on the new disk for
for /usr/local could be mounted on /mnt.
5. cp -a /usr/local /mnt. This will even copy /dev files. Ah, the
glories of GNU! (But yes, tar will do the job, too.)
6. Do likewise with all partitions.
7. Put floppy into box and cp /boot/vmlinux /dev/fd0
8. shutdown now
9. Remove old disk, and adjust scsi id for new one.
10. reboot after adjested BIOS to boot from floppy.
11. Login as root and enter "lilo" on the command line.
12. Bob's your uncle.
Cheers,
Mike
--
My email address [EMAIL PROTECTED] above is a valid email address.
It is, in fact, a sendmail alias; the digit 'N' is incremented regularly.
Spammed aliases will be deleted. Currently, mike[12,15,22+]
are valid. If email to mikeN bounces, try mikeN+1.
------------------------------
From: Verena Vanessa Hafner <[EMAIL PROTECTED]>
Subject: frame grabber card
Date: 8 Mar 2000 14:40:49 GMT
Hi,
I've got an ACER 314T laptop with frame grabber card (PCMCIA) 'Capture-To-Go'
from margi. Does anybody know of any existing drivers? Which other frame
grabber cards suitable for laptops are supported under linux?
Cheers.
Verena
--
"The number you have dialed is imaginary.
Rotate phone 90 degrees and try again."
------------------------------
From: Max <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.m68k,comp.os.linux.misc
Subject: Re: Do I need a username and password? 7110
Date: Wed, 08 Mar 2000 16:44:31 +0200
[EMAIL PROTECTED] wrote:
>
> Brokers, Inc. Specializes in Sourcing Operating Systems and Application Software
>from liquidators or Overstocked suppliers. We then offer these incredible findings
>to the public at unbelievable savings...
>
> ----------------------------------------------------------------------------
>
> New Microsoft Windows 2000 Professional
> Web Software Brokers...New Just Released version, this is the real thing. You can
>get it from us, here now!!! This Microsoft Windows 2000 Professional or NT 5.0 as
>it's known to the industry is an OEM version of the OS and is distributed to
>manufacturers. The combined features of Windows� 2000 Professional create the
>mainstream operating system for desktop and notebook computing in all organizations.
>Microsoft took the best business features of Windows 98-Plug and Play, easy-to-use
>user interface, and power management-and made them better. Plus they integrated the
>strengths of Windows NT�-standards-based security, manageability and reliability.
>Thinking of upgrading or buying a new PC, don't wait upgrade now. Only $169.00 + P&H
>
> New Microsoft Office 2000 Small Business
> Web Software Brokers, Inc. ...New Version, this is the real thing. You can get it
>from us, here now!!! Microsoft Office 2000 Small Business...Only $226.00 + P&H
>
> New Microsoft Office 2000 Professional
> Web Software Brokers, Inc. ...New Version, this is the real thing. You can get it
>from us, here now!!! Microsoft Office 2000 Professional...Only $299.00 + P&H
>
> -----------------------------------------------------------------------------
>
> WE ACCEPT VISA, M/C, AMEX, DISCOVER OR CASHIERS CHECK.
>
> Wayne Carson
>
> Brokers, Inc. ~ Providing Affordable Software & PCs!
> (800) 970-7866
>
> ncdgvstvlubotsgrscokpqibc
nice place to advertise M$ products, mister... hope you keep
reading GPL's of their products well.
------------------------------
From: "Bernard Beauchamp" <[EMAIL PROTECTED]>
Subject: Re: disk IO performace tool
Date: Wed, 08 Mar 2000 15:12:30 GMT
The major problem lies in the kernel itself (ll_rw_block.c).
The /proc interface provides crude statistics (nmbers of read/write IOs ,
numbers of read/write blocks) for 4 "disks drives" (and no service time
information).
Therefore you will not be able to monitor your 4 last SCSI drives.
Also you will be very surprised to notice that your 4 IDE disks statistics
will be merged in the same cells than the 4 first SCSI drives
(Linux does not seem to like mixing IDE and SCSI).
The only currently available solution is to recompile the kernel with
symbolic patches (like the sard patch).
Bernard Beauchamp
www.systar.com
Dieter Stueken <[EMAIL PROTECTED]> a �crit dans le message :
[EMAIL PROTECTED]
> I have 8 SCSI disks and 4 IDE disks connected and in use by an
> ORACLE server. Is there a tool to monitor disk-IO for all disk?
> I found statistics counters for the SCSI devices accessable via /proc.
> Is there something equivalent for IDE, too? I think those counters
> should be placed on the block-device or filesystem level, but I could
> not find anything in the kernel source.
>
> Does someone know about some prototype GUI for that like "xload" or so?
>
> Dieter.
> --
> Dieter St�ken, con terra GmbH, M�nster
> [EMAIL PROTECTED] [EMAIL PROTECTED]
> http://www.conterra.de/ http://qgp.uni-muenster.de/~stueken
> (0)251-980-2027 (0)251-83-334974
------------------------------
From: d s f o x @ c o g s c i . u c s d . e d u (David Fox)
Subject: Re: Why a file system ?
Date: 08 Mar 2000 07:12:56 -0800
Nicolas Boulay <[EMAIL PROTECTED]> writes:
> I know it's look like a very odd question.
You are right, a database would be a big improvement over the current
organization. Consider that in a Unix heirarchical file system each
file is identified by a pathname. In database parlance, this is an
ordered collection of boolean attributes. In a system designed in the
`database style' those attributes would be unordered, and the file
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cc1
would be the same file as
/gcc-lib/egcs-2.91.66/lib/i386-redhat-linux/usr/cc1
as well as all other permutations of pathnames. Now what is the
significance of having each ordering of these attributes refer to a
distinct set of files? Well, none that I can think of, except to
cause confusion. If we select these attributes we should find the
file cc1, regardbless of the order - the collection of attributes is a
description of cc1 (and its companions), the order adds nothing. The
cd command becomes the `change query' command, which adds attributes
to our selection criteria and narrows the current selection of files.
Once we eliminate the bogus ordering of we can add attribute/value
pairs, so instead of identifying files with bogus extensions we give
them attributes like `language=c' or `format=mp3'.
I've heard of several projects to implement this type of thing, but
they tend to become overly ambitious and get bogged down.
--
David Fox http://hci.ucsd.edu/dsf xoF divaD
UCSD HCI Lab baL ICH DSCU
------------------------------
From: Fabrice Peix <[EMAIL PROTECTED]>
Subject: Re: How can I map kernel space to user space ??
Date: Wed, 08 Mar 2000 16:21:56 +0100
Fabrice Peix wrote:
>
> Kevin Shao wrote:
> >
> > Is there any way to map kernel space (which is allocated in the driver)
> > to user space, or vice versa, so that both driver and the application
> > can simultaneously access to the same buffer ?
> >
> > Kevin
> For kernel 2.2.x I think is not possible for 2.3.x i think the same
> thing but i am not sure...
In fact you can do that with device,and mmap or with the method read and
write of the device.
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: Why a file system ?
Date: 8 Mar 2000 10:25:14 -0500
In article <[EMAIL PROTECTED]>,
David Fox <d s f o x @ c o g s c i . u c s d . e d u> wrote:
>as well as all other permutations of pathnames. Now what is the
>significance of having each ordering of these attributes refer to a
>distinct set of files? Well, none that I can think of, except to
>cause confusion.
IOW, you can't think...
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
** 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
******************************