Linux-Development-Sys Digest #873, Volume #7 Thu, 18 May 00 12:13:14 EDT
Contents:
Re: Why no defrag? ("Mark Tranchant")
Re: Ppp kernel support. What to do? ("Mark Tranchant")
Re: Why no defrag? (Harald Finster)
Re: Why no defrag? (Aki M Laukkanen)
Sync'ing fs before machine_restart() (Bhavesh Davda)
Re: does linux support RAMDISK??? (Lew Pitcher)
Re: does linux support RAMDISK??? (Josef Moellers)
#include <linux/sched.h> (Martin Alt)
Re: Signal in Linux? (Markus Pietrek)
Sony Serial port MemoryStick reader/writer ("Erik Tamminga")
Re: #include <linux/sched.h> (Fro-Man)
Re: #include <linux/sched.h> ("Christos D. Antonopoulos")
Re: Need ideas for university funded project for linux (JEDIDIAH)
Re: serial port RTS control ? (Grant Edwards)
Re: Finding the status of a process (Andreas Rottmann)
Re: serial port RTS control ? (Georg Acher)
Re: porting NT device drivers to linux (Mario Klebsch)
----------------------------------------------------------------------------
From: "Mark Tranchant" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Why no defrag?
Date: Thu, 18 May 2000 13:11:35 +0100
Reply-To: "Mark Tranchant" <[EMAIL PROTECTED]>
Peet Grobler wrote in message <39239f25$0$[EMAIL PROTECTED]>...
>Hello.
>
>I've seen the question posted to this group many times now, is there a
>defrag for linux? The conclusion is there is not. I'm sitting at my desk,
>thinking, why not?
>
>Is there any specific reason for defrag not being written? I mean, can
>anybody tell me something that would stop me from writing one?
It's not needed. You're probably coming from a DOS/Windows or MacOS
environment, where fragmentation got worse and worse and started affecting
performance. The consciencious user would defrag all filesystems regularly,
and feel "clean" after doing so!
Linux's default filesystem, ext2, in conjunction with the kernel, has much
better control over fragmentation and thus a defrag utility is not needed.
I'm sure one has been written despite this though - look around if you're
interested.
--
Mark.
http://www.tranchant.freeserve.co.uk/
------------------------------
From: "Mark Tranchant" <[EMAIL PROTECTED]>
Subject: Re: Ppp kernel support. What to do?
Date: Thu, 18 May 2000 13:14:57 +0100
Reply-To: "Mark Tranchant" <[EMAIL PROTECTED]>
Francisco Javier Alvarez Rabanal wrote in message
<8g0kv5$jmi$[EMAIL PROTECTED]>...
>I've got Red Hat 6.2 with 2.2.12-20 kernel version; it hasn't support for
ppp, so my question is:
>
>Is there an availabel kernel with ppp support or must I rebuild it?
I *think* you'll find it *does* have ppp support, but dial-up permission is
restricted to root by default, which gives the error messages you're seeing.
Try dialling up as root and see if that works.
If it does, you need to fiddle with the PAM setup of RH 6.2 - look in your
book or ask back here.
--
Mark.
http://www.tranchant.freeserve.co.uk/
------------------------------
From: Harald Finster <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Why no defrag?
Date: Thu, 18 May 2000 15:34:24 +0200
Frank wrote:
>
> Miquel van Smoorenburg <8g0kf3$mbv$[EMAIL PROTECTED]>...
> ^
> ^ Still someone wrote one. It's called e2defrag. There are at least
> ^ redhat and debian packages for it. I've never used it since there is
> ^ no need for it, but it does exist.
> ^
>
> I suppose anyone can write one:
>
> int main(void)
> {
> fprintf(stdout, "Defragmenting drives... ");
> sleep(900);
> fprintf(stdout, "done\n");
> return(0);
> }
No, no, absolutely insufficient:
You should at least add a few read/write operations causing
head-movements, so that the user has the impression, that
defrag is heavily working :-)
Harald
--
Harald Finster
-
Windoze can be used on the North-Pole without any problems,
... because a frozen computer can't freeze
------------------------------
From: [EMAIL PROTECTED] (Aki M Laukkanen)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Why no defrag?
Date: 18 May 2000 13:07:12 GMT
In article <39239f25$0$[EMAIL PROTECTED]>, Peet Grobler wrote:
>I've seen the question posted to this group many times now, is there a
>defrag for linux? The conclusion is there is not. I'm sitting at my desk,
>thinking, why not?
I've seen similar questions been posted and gotten the correct answer.
There is a ext2 defrag tool by Stephen Tweedie and it'll take you two
seconds where to find it on Freshmeat.
Btw. there is nowadays a ext2 resize (shrink/grow) tool too.
--
D.
------------------------------
From: Bhavesh Davda <[EMAIL PROTECTED]>
Subject: Sync'ing fs before machine_restart()
Date: Thu, 18 May 2000 07:36:16 -0600
Every place I saw in the kernel where machine_restart() is called, it
assumes that filesystems have been sync'ed in user mode before getting
there.
How would I achieve what the halt "rc" scripts do, as far as unmounting
all local filesystems, and mounting the root filesystem read-only,
before calling machine_restart() in kernel mode?
Specifically, how would I achieve this in a loadable module?
Thanks!
- Bhavesh
--
Bhavesh P. Davda
Lucent Technologies, Bell Labs
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: does linux support RAMDISK???
Reply-To: [EMAIL PROTECTED]
Date: Thu, 18 May 2000 13:57:59 GMT
On Thu, 18 May 2000 14:39:09 +0200, Josef Moellers
<[EMAIL PROTECTED]> wrote:
>Lew Pitcher wrote:
>> =
>
>> On Wed, 17 May 2000 20:11:41 +0800, "porsche" <[EMAIL PROTECTED]>
>> wrote:
>> =
>
>> >as title, and how large can it support (4GB for example?)
>> =
>
>> 1) Linux does support 'ramdisk' devices
>> 2) How much memory can you set aside for a ram disk? Remember, a _RAM_
>> disk uses your _RAM_, so if you want a 4G ramdisk, you had better have
>> more than 4G of _RAM_ in your system.
>
>Why, you can always swap out to disk what you can't keep in RAM!
I don't know about the Linux 2.2 implementation, but Linux 2.0 used
the kernel I/O buffer cache to build the ramdisk. AFAIK, the kernel
I/O buffer cache isn't swappable, and for ramdisks the pages are
explicitly marked as "BH_Protected". Additionally, for initrd
ramdisks, the space is directly allocated out of kernel
(non-swappable) memory via kmalloc() calls.
Thus, in Linux 2.0 kernels, ramdisks are limited to the size of
physical ram, minus the space for kernel and user programs.
Lew Pitcher
System Consultant
Toronto Dominion Financial Group
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: does linux support RAMDISK???
Date: Thu, 18 May 2000 16:03:32 +0200
Lew Pitcher wrote:
> =
> On Thu, 18 May 2000 14:39:09 +0200, Josef Moellers
> <[EMAIL PROTECTED]> wrote:
> >Why, you can always swap out to disk what you can't keep in RAM!
> =
> I don't know about the Linux 2.2 implementation, but Linux 2.0 used
> the kernel I/O buffer cache to build the ramdisk. AFAIK, the kernel
> I/O buffer cache isn't swappable, and for ramdisks the pages are
> explicitly marked as "BH_Protected". Additionally, for initrd
> ramdisks, the space is directly allocated out of kernel
> (non-swappable) memory via kmalloc() calls.
You chopped off the "SCNR", whcih I thought would indicate that I wan't
quite serious.
Obviously, swapping out a RAMDISK to a physical disk doesn't really make
sense.
You either have a ramdisk because you want the speed, then you really
don't want mechanical disk access or you have the ramdisk because you
don't have a functional disk at that time, in which case you can't swap
either.
I'll add more B-{) in the future. Sorry,
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: Martin Alt <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.software-eng,alt.os.linux
Subject: #include <linux/sched.h>
Date: Thu, 18 May 2000 16:10:20 +0200
Hi,
Maybe I am only blind but I only want to
#include <linux/sched.h>
to use the
request_irq(0x04, &ser_int, 0, "serial", NULL);
command and get only these error messages:
bash-2.03# gcc -O -o ser sertest.c
In file included from /usr/include/linux/fs.h:9,
from /usr/include/linux/capability.h:13,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:8,
from sertest.c:10:
/usr/include/linux/config.h:4: linux/autoconf.h: No such file or
directory
Does anybody knows this problem or thas an idee?
Regards
Martin
------------------------------
Date: Thu, 18 May 2000 16:18:56 +0200
From: Markus Pietrek <[EMAIL PROTECTED]>
Subject: Re: Signal in Linux?
Alger wrote:
>
> Hi,
> I would like to know about the signal handling in Linux.
> Can the daemon program recevie the signal (such as SIGTERM?).
> I try one daemon (written by me) and find it cannot work ?
> Do anyone have the same experience ?
When a program is running as a daemon, this means that it has closed
it stdin,stdout and stderr (it doesn't needs a console).
Of course it receives the signals.
E.g. SIGHUP (it has no console, so it can't hang up) is used to notify
a daemon that its configuration file has changed.
--
Markus Pietrek
Tel: +49-761-47094-13
Fax: +49-761-47094-29
Web: http://www.concept.de
Concept Engineering GmbH
Boetzinger Strasse 29
D-79111 Freiburg/Germany
------------------------------
From: "Erik Tamminga" <[EMAIL PROTECTED]>
Subject: Sony Serial port MemoryStick reader/writer
Date: Thu, 18 May 2000 16:54:00 +0200
Hi,
Does someone know of a driver (module) that allows me to mount the FAT
filesystem on a sony memory stick using the serial adapter sony delivers
with their camcorders?
Erik (h.tamminga @ net.hcc.nl)
------------------------------
From: Fro-Man <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.software-eng,alt.os.linux
Subject: Re: #include <linux/sched.h>
Date: Thu, 18 May 2000 11:03:15 -0400
> Maybe I am only blind but I only want to
> #include <linux/sched.h>
> to use the
> request_irq(0x04, &ser_int, 0, "serial", NULL);
> command and get only these error messages:
try:
gcc -O -o ser sertest.c -I/usr/src/linux -I/usr/src/linux/include
I am not sure, but I think this should work. You may have to also use a
-L option for the actual libraries also. I haven't tried using kernel
source before. One thing that you will want to do is actually copy the
files you need. Nothing in ther kernel is static and promised between
kernels. So, unless you actually want it to be portable between kernels
you will want to copy the files you need to your src dir for the project.
> bash-2.03# gcc -O -o ser sertest.c
> In file included from /usr/include/linux/fs.h:9,
> from /usr/include/linux/capability.h:13,
> from /usr/include/linux/binfmts.h:5,
> from /usr/include/linux/sched.h:8,
> from sertest.c:10:
> /usr/include/linux/config.h:4: linux/autoconf.h: No such file or
> directory
> Does anybody knows this problem or thas an idee?
> Regards
> Martin
>
>
# Aaron Day # [EMAIL PROTECTED] # http://www.csis.gvsu.edu/~daya #
The ultimate Dutch dilemma: Free Manure
------------------------------
From: "Christos D. Antonopoulos" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.software-eng,alt.os.linux
Subject: Re: #include <linux/sched.h>
Date: Thu, 18 May 2000 18:17:24 +0300
Martin Alt wrote:
>
> Hi,
>
> Maybe I am only blind but I only want to
> #include <linux/sched.h>
> to use the
> request_irq(0x04, &ser_int, 0, "serial", NULL);
> command and get only these error messages:
>
> bash-2.03# gcc -O -o ser sertest.c
> In file included from /usr/include/linux/fs.h:9,
> from /usr/include/linux/capability.h:13,
> from /usr/include/linux/binfmts.h:5,
> from /usr/include/linux/sched.h:8,
> from sertest.c:10:
> /usr/include/linux/config.h:4: linux/autoconf.h: No such file or
> directory
>
> Does anybody knows this problem or thas an idee?
> Regards
> Martin
It seems that you have made mrproper which has deleted some
automatically generated header files. Compile your kernel again (make
menuconfig dep clean bzImage bzlilo).
Christos Antonopoulos
------------------------------
From: [EMAIL PROTECTED] (JEDIDIAH)
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: Thu, 18 May 2000 15:28:54 GMT
On Thu, 18 May 2000 04:49:10 GMT, Mongoose <[EMAIL PROTECTED]> wrote:
>On Thu, 18 May 2000 01:00:45 GMT, [EMAIL PROTECTED] wrote:
>
>>> So what is the problem with doing this in the KDE desktop?
>>
>>KDE isn't free.
>
> uh what? I don't remember paying for KDE...
It's base library is "owned" by a corporation.
A good suggestion might be to replace libqt entirely with a
completely liberated clone. However, it's dubious whether or
not the KDE developers would actually take advantage of such
a thing.
--
In what language does 'open' mean 'execute the evil contents of' |||
a document? --Les Mikesell / | \
Need sane PPP docs? Try penguin.lvcm.com.
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: serial port RTS control ?
Date: Thu, 18 May 2000 15:30:16 GMT
In article <8g0gjj$nge$[EMAIL PROTECTED]>, Fred wrote:
>I need to force high RTS line of a serial port before sending data and
>return it into normal state after transmission.
>
>I don't want a real flow control with RTS / CTS handshaking though, but just
>RTS control !
I once hacked on the Linux 16x50 serial driver to do auto-RTS
half-duplex. Due to timing differences between UARTs it never
worked reliably cross-platform. It is possible that with more
fussing it would have worked better (I didn't want to do
polling, and that was the only reliable method I could come up
think of).
I finally gave up on the driver and resorted to two different
solutions:
1) I built a little RS-232 powered widget with a 4xxx series
one-shot that controlled RTS in hardware.
2) I bought serial boards that supported half duplex mode
automatically (I used a Cyclades 8Yo board, but others from
Comtol, Digi, etc. will work just as well -- disclaimer: I
now work for Comtrol).
--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
visi.com
------------------------------
From: Andreas Rottmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Finding the status of a process
Date: 17 May 2000 00:27:58 +0200
Doug Schulz <[EMAIL PROTECTED]> writes:
> I have a program that forks a process. I would like the process that
> did the forking to be able to get the status of the forked process.
> The parent process has the process ID of the forked process. How do I
> find what the exit status of the forked process is (if it has exited),
> or some piece of information that would allow me to conclude that the
> process is still running? Any help is appreciated.
>
man 2 wait
man 2 wait4
HTH, Andy
PS: Please set fup'2 on x-posts. Thx.
--
Andreas Rottmann (Dru@ICQ, 54523380@ICQ)
Pfeilgasse 4-6/725, A-1080 Wien, Austria, Europe
http://www.penguinpowered.com/~andy/
mailto:[EMAIL PROTECTED]
[one of 78,35% Austrians who didn�t vote for Haider!]
------------------------------
From: [EMAIL PROTECTED] (Georg Acher)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: serial port RTS control ?
Date: 18 May 2000 15:49:54 GMT
In article <8g0gjj$nge$[EMAIL PROTECTED]>,
"Fred" <[EMAIL PROTECTED]> writes:
|> Hi all,
|>
|> I need to force high RTS line of a serial port before sending data and
|> return it into normal state after transmission.
|>
|> I don't want a real flow control with RTS / CTS handshaking though, but just
|> RTS control !
I don'r know if this exactly what you want, bur maybe it is useful:
You can use RTS (and DTR...) as general purpose output pins:
int arg;
// Clearing RTS
arg=TIOCM_RTS;
ioctl(fd,TIOCMBIC,&arg);
// Setting RTS
arg=TIOCM_RTS;
ioctl(fd,TIOCMBIS,&arg);
--
Georg Acher, [EMAIL PROTECTED]
http://www.in.tum.de/~acher/
"Oh no, not again !" The bowl of petunias
------------------------------
From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: porting NT device drivers to linux
Date: Thu, 18 May 2000 12:07:38 +0200
[EMAIL PROTECTED] (Grant Edwards) writes:
>In article <[EMAIL PROTECTED]>, Mario Klebsch wrote:
>>>but I dont know how to port the dll - is there a similar concept in Linux
>>
>>It is called loadable module. :-)
>Not really, a DLL corresponds most closely with a Unix shared library --
>it's user-space code that is linked into user programs when they are
>executed.
I know, what shared libraries are. But shared libraries cannot be
loaded into the kernels address space. I assumed, that if an NT driver
needs a DLL, NT will be able to load the DLL into kernel space. The
only Linux equivalent, that can be loaded into kernel space, is a
lodable module.
However, if NT does not load the DLL into the kernel space, too, and
this DLL is only a user space support library, or course, a shared
library would be its equivalent.
But in this case, I probably would not use a ahared libary at all. I
would use a static library instead. The benefits of shared libraries
are only gained, if you have lots of programs all linked against the
same library (this can save a lot of space on disk) and a large subset
of these programs is executing simultaniously (this will save RAM
usage).
If there are only few executable using the library (like in the case
of libe2fs & Co), and these programs are only executed rarely and
almost never simultaniously (like mke2fs, fsck, dump, restore), shared
libraries can be the cause of serious trouble, without having any
benefits.
>>I would not make two modules, if I am not forced to do so. I would put it
>>all into a single module. If your drivers needs both modules to work
>>properly, you will gain nothing in splitting them. But you will have the
>>additional trouble of getting both modules loaded.
>It might be appropriate to split the functionality into an actual kernel
>driver module and a shared library that provides higher-level functionality
>on top of the driver-implimented system calls.
Yes, as much as possible sould be done in userland, the kernel driver
should be reduced, to what cannot be done in user space.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
------------------------------
** 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
******************************