Changing files on a samba share triggers nothing

2007-02-13 Thread Ira Abramov
Evening,

I have a windows proggie that looks at a directory (a samba share in
this case) and subscribes to changes. as soon as a file is created there
it should pick it up, use it and delete it. I don't have the source of
the program to make it peridicly scan the directory, it's only set up to
request a callback.

I found very little info about samba supporting fam, and either way fam
was kicked out of Etch (or maybe earlier?) in favor of a package called
gamin on which the entire KDE package set depends. trying to install fam
will result in a complete removal of KDE...

so, what do I dig for? I must be using the wrong terminology (notify?
subscribe?) because Google gets me nowehere.

-- 
Better than the real thing
Ira Abramov
http://ira.abramov.org/email/

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Learning kernel modules development

2007-02-13 Thread Tzahi Fadida
Hi,
As you might guess from a previous thread, i am trying to learn modules 
development. I use kubuntu as my dist.
My first goal is to be able to run the hello world module example in the linux 
device drivers 3rd edition book.
Apparently in 2.6 you need to have the whole kernel compiled just to build one 
module, which is not a problem though i don't want to start spending days 
tuning it up to work correctly with my system.

What should be my workspace so i can start learning:
User mode linux? qemu? vmware? XEN :) ? 

P.s.: naturally i am impatient to start coding yesterday :)

10x.

-- 
Regards,
Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at 
http://members.lycos.co.uk/my2nis/spamwarning.html

To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Learning kernel modules development

2007-02-13 Thread guy keren


Tzahi Fadida wrote:

Hi,
As you might guess from a previous thread, i am trying to learn modules 
development. I use kubuntu as my dist.
My first goal is to be able to run the hello world module example in the linux 
device drivers 3rd edition book.
Apparently in 2.6 you need to have the whole kernel compiled just to build one 
module, which is not a problem though i don't want to start spending days 
tuning it up to work correctly with my system.


one nice thing in both Redhat RHES 4, and Suse SLES10 (their server 
editions), is that they have a package that allows compiling out-of-tree 
kernel modules, without having to recompile the entire kernel.


they only contain the build system (Makefiles and all) and header files.

if you're using a kubuntu system - check if it has a similar package - i 
imagine it does - my ubuntu (6.06) has a package named 'linux-headers' 
that appears to be meant for the same purpose.



What should be my workspace so i can start learning:
User mode linux? qemu? vmware? XEN :) ? 


i think you need to first work on your live system. after the first time 
you wipe out your root file-system - install user-mode-linux and work in 
that environment ;)


you need to have your module completely wipe your system at least once, 
in order to appreciate the difference between kernel-mode and user-mode 
development.


user-mode-linux is very good, because it allows you to run the kernel 
(and its module) under gdb - something that's not possible with the 
other virtualization options (at least not simply, and not safely).


i imagine it will take you 1-2-3 full days until you manage to setup a 
UML (user-mode-linux) environment that is optimal for modules 
development. note that even under UML - you'll need to have some 
compiled kernel tree.


by the way - you don't need to realy fully-compile the kernel. all you 
need to do is take the .config file of your currently running kernel 
(from /boot/config-*, at least on ubuntu and redhat and fedora), put it 
in the kernel source tree under the name '.config', run 'make oldconfig' 
and perhaps also 'make prepare' - and the kernel source tree will be 
configured enough to compile out-of-kernel-tree kernel modules.



P.s.: naturally i am impatient to start coding yesterday :)


then go to the supermarket and buy some patience - kernel development 
does not work without a _lot_ of patience.


--guy

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Learning kernel modules development

2007-02-13 Thread michael




On Tue, 13 Feb 2007, Tzahi Fadida wrote:


Hi,
As you might guess from a previous thread, i am trying to learn modules
development. I use kubuntu as my dist.
My first goal is to be able to run the hello world module example in the linux
device drivers 3rd edition book.
Apparently in 2.6 you need to have the whole kernel compiled just to build one
module, which is not a problem though i don't want to start spending days
tuning it up to work correctly with my system.

What should be my workspace so i can start learning:
User mode linux? qemu? vmware? XEN :) ?

P.s.: naturally i am impatient to start coding yesterday :)


The Vmware website has an image (called something like network appliance)
which is a pre-installed Ubunut virtual machine, all ready to go. Except for
the time it takes to download the image, this would save you the time of
having to install the guest OS.

I have only used Vmware. If such pre-installed images are available for the
other virtualization tools, then I don't know which is best.

(Re your project: I for one would be interested to hear how your learning
goes. Later, perhaps it would make a nice HOWTO or wiki page or something.)

Michael

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Learning kernel modules development

2007-02-13 Thread Gilboa Davara
On Tue, 2007-02-13 at 18:54 +0200, Tzahi Fadida wrote:
 Hi,
 As you might guess from a previous thread, i am trying to learn modules 
 development. I use kubuntu as my dist.
 My first goal is to be able to run the hello world module example in the 
 linux 
 device drivers 3rd edition book.
 Apparently in 2.6 you need to have the whole kernel compiled just to build 
 one 
 module, which is not a problem though i don't want to start spending days 
 tuning it up to work correctly with my system.

You don't.
You just need the skeleton kernel-devel package. (A cut down kernel
image that includes the kernel configuration, headers and kbuild
environment)

 
 What should be my workspace so i can start learning:
 User mode linux? qemu? vmware? XEN :) ? 

In general, I use both VMWare server and an NFS-root-mounted machine.
Xen: At least in Fedora-land, it tends to be very sensitive to kernel
updates - a very frequent event.
QEMU: Too slow. (Even with now-GPL'ed kernel module.)
KVM: No hardware support. (Old[er] dual core Opterons @work/home)
UML: it has been a while since I used it - but even with the SKAS
host-patch, performance is less then staggering and it was -very-
sensitive to the base (read: un-patched) kernel versions.

NFS-root:
The NFS-root is also an interesting option. (If you can spare a second
machine/SBC/embedded board)
A. You don't risk the host machine. (I did crash vmware/Xen a couple of
times - risking the integrity of the host machine)
B. The guest machine is booting from a network FS - no matter how
painful your crash is (Read: doing memset with a negative size) you
won't damage the guest OS image.
C. Super fast boot. My NFS test machine (with a modified stripped-down
Slackware) boot in less then 15 seconds.

 
 P.s.: naturally i am impatient to start coding yesterday :)

Yep... Debugging kernel OOPs is pure joy ;)

- Gilboa


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Quickest way to list content of directory(s)

2007-02-13 Thread Ehud Karni
On Mon, 12 Feb 2007 20:21:46 Peter wrote:

 Is there some utility that can do this very simple search efficiently?
 
 
  Why not use a find predicate for that?

 Why not write a COBOL application that uses a FORTRAN subroutine to do
 that ?

Actually (and I'm speaking with a LOT of experience) a COBOL program
(with or without FORTRAN or C subs) runs at exactly same speed as a C
program. BTW, you can call systemcall (like readdir()) directly from
COBOL, you don't need any wrapping subroutines.

You can try it with the free (and incomplete) GNU tiny COBOL (see:
http://tinycobol.org/ ) or with an old (one that compiles to standalone
program) MicroFucos COBOL.

Ehud.


--
 Ehud Karni   Tel: +972-3-7966-561  /\
 Mivtach - Simon  Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D http://www.keyserver.net/Better Safe Than Sorry

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Learning kernel modules development

2007-02-13 Thread Peter


On Tue, 13 Feb 2007, Tzahi Fadida wrote:


Hi,
As you might guess from a previous thread, i am trying to learn modules
development. I use kubuntu as my dist.
My first goal is to be able to run the hello world module example in the linux
device drivers 3rd edition book.
Apparently in 2.6 you need to have the whole kernel compiled just to build one
module, which is not a problem though i don't want to start spending days
tuning it up to work correctly with my system.

What should be my workspace so i can start learning:
User mode linux? qemu? vmware? XEN :) ?

P.s.: naturally i am impatient to start coding yesterday :)


The kernel compiles in about 10 minuts max. on any recent machine. What 
are you afraid of.


Peter

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Learning kernel modules development

2007-02-13 Thread Peter


And you only ned to do it once, Make is smart enough to recompile only 
changes after that (when you do make modules). Been there done that.


Peter


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Quickest way to list content of directory(s)

2007-02-13 Thread Peter



On Tue, 13 Feb 2007, Ehud Karni wrote:


On Mon, 12 Feb 2007 20:21:46 Peter wrote:

Why not write a COBOL application that uses a FORTRAN subroutine to do
that ?


Actually (and I'm speaking with a LOT of experience) a COBOL program
(with or without FORTRAN or C subs) runs at exactly same speed as a C
program. BTW, you can call systemcall (like readdir()) directly from
COBOL, you don't need any wrapping subroutines.

You can try it with the free (and incomplete) GNU tiny COBOL (see:
http://tinycobol.org/ ) or with an old (one that compiles to standalone
program) MicroFucos COBOL.


Damn I forgot the smiley again. I promise it won't happen again.

Peter

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Quickest way to list content of directory(s)

2007-02-13 Thread Dotan Cohen

On 12/02/07, Peter [EMAIL PROTECTED] wrote:

Why not write a COBOL application that uses a FORTRAN subroutine to do
that ?



He wants it to run fast. Write it in machine code!

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/643/talib_kweli.html
http://what-is-what.com/what_is/quicktime.html

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Quickest way to list content of directory(s)

2007-02-13 Thread Constantine Shulyupin

To be q... fastest ...   use cache!

locate -r $PWD/.*/blablabla$

or

locate blablabla | grep $PWD

On 2/13/07, Dotan Cohen [EMAIL PROTECTED] wrote:

On 12/02/07, Peter [EMAIL PROTECTED] wrote:
 Why not write a COBOL application that uses a FORTRAN subroutine to do
 that ?


He wants it to run fast. Write it in machine code!

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/643/talib_kweli.html
http://what-is-what.com/what_is/quicktime.html

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




--
Constantine Shulyupin
Embedded Linux Consultant
054-4234440
http://linuxdriver.co.il/

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Changing files on a samba share triggers nothing

2007-02-13 Thread Amos Shapira

On 14/02/07, Ira Abramov [EMAIL PROTECTED] wrote:


Evening,

I have a windows proggie that looks at a directory (a samba share in
this case) and subscribes to changes. as soon as a file is created there
it should pick it up, use it and delete it. I don't have the source of
the program to make it peridicly scan the directory, it's only set up to
request a callback.

I found very little info about samba supporting fam, and either way fam
was kicked out of Etch (or maybe earlier?) in favor of a package called
gamin on which the entire KDE package set depends. trying to install fam
will result in a complete removal of KDE...

so, what do I dig for? I must be using the wrong terminology (notify?
subscribe?) because Google gets me nowehere.



I'm not sure I follow the sequence of events that you expect - the
monitoring program runs on Windows and looks at a directory shared over the
network through Samba? Then why is FAM supposed to help here? FAM is a
Linux-side thing. Are you looking to create some sort of a proxy that will
receive notifications when the directory changes on the Samba server then
send an event to the Windows program over the net?

As for the linux-level of things - it looks like Gamin is just a subset
implementation of FAM  ( http://www.gnome.org/~veillard/gamin/) and is based
on inotify. So you can either use the FAM API with Gamin or go directly to
the system level and use inotify(7) (that would be my personal choice
between the two).

Cheers,

--Amos


Re: revoking old uid's

2007-02-13 Thread Amos Shapira

On 14/02/07, Peter [EMAIL PROTECTED] wrote:


revuid means 'revoke uid', as in, id. not the key. Try:

   gpg --edit-key somebody - key disable; list

or:

   gpg --delete-key signature --yes

Revocation is not deletion, it generates a revocation certificate for
use later. See man gpg option --gen-revoke . I had to look in the
manual. Why didn't  you ?



Thanks for taking the time to look at the manual. I also looked at the
manual before I came here to ask and learned that what I want is to REVOKE
an ID, from the manual:

 deluid Delete  a  user  id.   Note  that  it  is not possible
to
retract a user id, once it has been send  to  the
public
(i.e.  to  a  keyserver).   In  that  case you better
use
revuid.

I.e. Just deleting a uid from my local disk isn't going to help advertise to
the world the fact that this uid is no longer valid. I want to revoke the
UID (and not the entire key) because it shares the key with other uids which
I want to keep using.

I found the answer - when gpg --edit-key says select uid it means that I
have to type the uid n command before typing the command that uses that
uid. Same with selecting subkeys using the key command.

Thanks,

--Amos


Re: Quickest way to list content of directory(s)

2007-02-13 Thread Shachar Shemesh

 He wants it to run fast. Write it in machine code!
Just for the record, it is not at all clear that, on modern CPUs, code
you write in machine code (or even Assembly) will, in fact, run faster.
The compiler can be quite good at opimizing your code for machine
language expression, often much better than you would be.

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting ltd.
Have you backed up today's work? http://www.lingnu.com/backup.html


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Changing files on a samba share triggers nothing

2007-02-13 Thread Ira Abramov
Quoting Amos Shapira, from the post of Wed, 14 Feb:
 
 I'm not sure I follow the sequence of events that you expect - the
 monitoring program runs on Windows and looks at a directory shared over the
 network through Samba? Then why is FAM supposed to help here? FAM is a
 Linux-side thing. Are you looking to create some sort of a proxy that will

the windows filesystem layer supports callbacks. this means an
application can subscribe to a directory or a file, and get notified
if something in it changes, like a file is added. the windows-side
program is expecting the directory to call it back and so it does not
scan the directory repeatedly for new files dropped in

Samba, on the other hand, accepts the callback request and is supposed
to support this by using fam/gamin to detect changes, since the callback
feature is of course not available in the Linux VFS API, or whoever could
have been in charge of this. This means that when a file is dropped in a
directory that is shared, gamin would notify samba which would notify
the remote mounting party that the directory has changed, and the chain
is closed.

however, this does not seem to work, and I can't find how to turn it on,
even though I see that Samba is compiled on Debian with the FAM support.

-- 
Master of magnetism
Ira Abramov
http://ira.abramov.org/email/

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Quickest way to list content of directory(s)

2007-02-13 Thread Geoffrey S. Mendelson
On Wed, Feb 14, 2007 at 08:18:16AM +0200, Shachar Shemesh wrote:

 Just for the record, it is not at all clear that, on modern CPUs, code
 you write in machine code (or even Assembly) will, in fact, run faster.
 The compiler can be quite good at opimizing your code for machine
 language expression, often much better than you would be.

However, a good assembly langunage programer can write code the is leaner
and meaner than a compiler generates. In practical terms, a good C
programmer can often write code that is close, and parallel processing
CPUs where the order of instructions is critical a good compiler
can outdo an assembly language programmer.

I've kept out of that part of CPU design for a long time, I don't know if
anything found on a desktop does it. I think the P4, PPC, and current
SPARC chips do, but I would not bet on all of them.

It's not new technology, Control Data had it in around 1970. Their chief 
design engineer was Seymor Cray, who later became famous on his own.

It also depends upon the complexity of the intruction set. CISC computers
are easy to program in assembly language and get better code, RISC chips
become harder as many functions can not be done in machine code and have
to be combinations of instructions. Then you are dependent upon how good
your skill is at combining instructions or that of the author of your macro 
library.

From my experience good programing technique and logic are far better
at producing code effiency than writing in a specific language. I've seen
many cases where the order in which you do things effects the preformance
more than the languguage they were written in. 

Geoff.
-- 
Geoffrey S. Mendelson, Jerusalem, Israel [EMAIL PROTECTED]  N3OWJ/4X1GM
IL Voice: (07)-7424-1667  Fax ONLY: 972-2-648-1443 U.S. Voice: 1-215-821-1838 
Visit my 'blog at http://geoffstechno.livejournal.com/

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]