Re: mounted partitions and use

2007-09-18 Thread Erik Mouw
On Tue, Sep 18, 2007 at 10:01:36AM -0300, Alan Menegotto wrote:
 David Santos escreveu:
 Hi, im triying to make a lkm that check mounted partitions and if anyone
 of this partitios hace 90% used send a signal to dmesg (printk...).
 Someone know any api or library from where i would take this info from
 the system?
   
 Why code this in kernelspace when you have all the tools in userspace to do 
 this?

Hear, hear. Nagios is very good at this. It's a pig to configure, but
once that's done you can have fancy signals everywhere you want.


Erik

-- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery


signature.asc
Description: Digital signature


Re: mounted partitions and use

2007-09-18 Thread Alan Menegotto

David Santos escreveu:

Hi, im triying to make a lkm that check mounted partitions and if anyone
of this partitios hace 90% used send a signal to dmesg (printk...).
Someone know any api or library from where i would take this info from
the system?

Thanks.

  
Why code this in kernelspace when you have all the tools in userspace to 
do this?


--


--
Best Regards

Alan Menegotto


--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: compilng and booting new kernel

2007-09-18 Thread Alan McKinnon
On Tuesday 18 September 2007, Onkar wrote:
 I am new to Linux Kernel. I have complied the kernel ;I have created
 a initrd.img-2.6.22-6-686 file of size 43MB. I am unable to boot the
 kernel.Please help me !!.  Can anyone please give me some reliable
 documentation as to how to compile and boot the system with the new
 kernel ?

read the README file and the contents of the Documentation directory, 
both in the top directory of the kernel source tree.

Greg Kroah-Hartman's book is probably what you are after:
http://www.kroah.com/lkn/

What errors are you getting? The common mistake is a mis-configured 
kernel with no support compiled for your root filesystem or the 
hardware it sits on.

If you want answers on how to do these things, you will need to supply 
some information. The text of the error message is a good place to 
start

alan


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: compilng and booting new kernel

2007-09-18 Thread Erik Mouw
On Tue, Sep 18, 2007 at 08:27:21PM +0530, Onkar wrote:
 I am new to Linux Kernel. I have complied the kernel ;I have created a
 initrd.img-2.6.22-6-686 file of size 43MB. I am unable to boot the
 kernel.Please help me !!.  Can anyone please give me some reliable
 documentation as to how to compile and boot the system with the new kernel ?

Something like http://kernelnewbies.org/FAQ/KernelCompilation ?

And be sure to read the README file in your kernel source directory.


Erik

-- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery


signature.asc
Description: Digital signature


Re: mounting usb endpoints

2007-09-18 Thread Greg KH
On Fri, Sep 14, 2007 at 10:58:11AM +0530, Sendhilraj T wrote:
 ls /dev |grep usb
 shows the below one after i insert my usb device
 
 usbdev1.1_ep00
 usbdev1.1_ep81
 usbdev1.4_ep00
 usbdev1.4_ep05
 usbdev1.4_ep87
 usbdev2.1_ep00
 usbdev2.1_ep81
 
 ls /dev |grep usb
 shows the below one after i remove my usb device
 
 usbdev1.1_ep00
 usbdev1.1_ep81
 usbdev2.1_ep00
 usbdev2.1_ep81
 
 I would like to know how I can mount these endpoints?

You can not mount them, they are device nodes in /dev that are
accessed like any other character device.

But please realize, for now, they are not hooked up to anything in the
kernel, so you can not use them :)

Patches gladly accepted to fix this issue...

thanks,

greg k-h

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Inserting module into running kernel

2007-09-18 Thread Sachin Gaikwad
Hi all,

I have built my kernel from source, installed and booted in it.

Now I have written a small module. Can I insert this module into the
runningn kernel ?

Is there anything which I should take care of while compiling this
module, as we have to insert it into the running kernel ?

Thanks in advance,

Sachin

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Hi

2007-09-18 Thread Sachin Gaikwad
Hi all,

I have built my kernel from source, installed and booted in it.

Now I have written a small module. Can I insert this module into the
runningn kernel ?

Is there anything which I should take care of while compiling this
module, as we have to insert it into the running kernel ?

Thanks in advance,
Sachin

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Problem regarding copy_to_user

2007-09-18 Thread Rajendra Stalekar
Hi,

I am encountering problem while using copy_to_user in my program pasted
below. Can you tell me where I am going wrong?

My objective here is to pass the values of  page_address(bvec-bv_page),
bvec-bv_len,  bvec-bv_offset, bio_sectors(bio) to the user application
above. Right now I am just trying it with simple char *buffer. Once this is
successful , I have encapsulated the page_address etc in a structure and
will be using to pass onto the user application.

Need your help asap.

TIA.

 

My user -space application is 

 

char *message = How r u?

char buffer[100];

int fd = open(/dev/sga,O_RDWR);

if (fd  0)

{

printf(open failed\n);

exit(1);

}

memset(buffer,0,100);

write(fd, message, strlen(message) +1 );

bytes = read(fd,buffer,100);

write(1,buffer,100);

 

My kernel level function is  :-

 

static int block_dev_random_transfer(struct block_dev *dev, struct bio *bio)

{

int segno;

struct bio_vec *bvec;

sector_t sector = bio-bi_sector;

 

bio_for_each_segment(bvec,bio,segno)

{

char *buffer = __bio_kmap_atomic(bio,segno,KM_USER0);

 

printk(KERN_ALERT  virtual address = %x ,bvec-bv_len = %u
, bvec-bv_offset = %d , data transferred in sectors = %u and segno = %d\n,
page_address(bvec-bv_page), bvec-bv_len,  bvec-bv_offset,
bio_sectors(bio), segno);

 



 
block_transfer(dev,sector,bio_cur_sectors(bio),buffer,bio_data_dir(bio) ==
WRITE);

 

sector += bio_cur_sectors(bio);

 

__bio_kunmap_atomic(bio,KM_USER0);

 

 bio-bi_private = vmalloc(strlen(buffer) +1);

 

if (copy_to_user((unsigned char *)bio-bi_private, (unsigned
char *)buffer, strlen(buffer)+1))

{

printk(KERN_ALERT copy_to_user failed\n);

return -EFAULT;

}

  }

   return 0;

}






http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_


Re:Inserting module into running kernel

2007-09-18 Thread jiayinjia1983116
just  run the command modeprobe module-name   
在2007-09-19,Sachin Gaikwad [EMAIL PROTECTED] :
Hi all, I have built my kernel from source, installed and booted in it. Now I 
have written a small module. Can I insert this module into the runningn kernel 
? Is there anything which I should take care of while compiling this module, as 
we have to insert it into the running kernel ? Thanks in advance, Sachin -- To 
unsubscribe from this list: send an email with unsubscribe kernelnewbies to 
[EMAIL PROTECTED] Please read the FAQ at http://kernelnewbies.org/FAQ