Re: dumping large buffers to file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 24, 2015 at 1:30 AM, Ramon Fried <ramon.fried@xxxxxxxxxxx> wrote:
> Hi.
>
> I'm currently debugging a ISP DMA issue in a kernel module.
>
> For debugging, I would like to dump buffers to a file on run time.
>
> The buffers are quite big, 1MB at least.
>
> As saving a file directly from kernel is discouraged, is there any available
> framework for doing such a thing ?
>
> I can think of numerous ways of transferring the buffer to user space and
> saving it by a dedicated user process (Netlink, sysfs, char device, etc.)
>

>
> I just don't want to invent the wheel. How do you do it ?
>
>
>
> Thanks.
>
> Ramon
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
If you can use printk just switch the log level to a log level that
prints to the syslog buffer
for kernel messages. If you have enough space on your partition for
root this shouldn't
be a problem, however if it is them I would recommend sysfs or procfs
exporting as
there better suited for debugging as the others are for user space
applications needing
access to kernel resources indirectly  or device driver user space interaction.
Hope this Helps,
Nick

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux