* Accessing kernel information from a module @ 2006-03-21 11:02 Anand SVR 2006-03-21 11:12 ` Arjan van de Ven 0 siblings, 1 reply; 6+ messages in thread From: Anand SVR @ 2006-03-21 11:02 UTC (permalink / raw) To: linux-kernel Hi, I am in the process of writing a module that collects kernel information of various kernel subsytems and pass this on to a remote monitoring/management node. The information could be statistical data maintained in data structures of memory, process, network and so on. Or it could be any kernel variables that are of interest. Can you let me know to what extent I can realise my goal ? I have hit the stumbling block already because the scope of information that is accessible from the module is restricted only to the exported symbols. Is there a way of accessing proc information from the module ? Any input from you would be of great help to my project. Regards Anand ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Accessing kernel information from a module 2006-03-21 11:02 Accessing kernel information from a module Anand SVR @ 2006-03-21 11:12 ` Arjan van de Ven [not found] ` <48a4d13c0603210338s4cd1f120k80e1bbe6ac70669c@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Arjan van de Ven @ 2006-03-21 11:12 UTC (permalink / raw) To: Anand SVR; +Cc: linux-kernel On Tue, 2006-03-21 at 16:32 +0530, Anand SVR wrote: > Hi, > > I am in the process of writing a module that collects kernel > information of various kernel subsytems and pass this on to a remote > monitoring/management node. The information could be statistical data > maintained in data structures of memory, process, network and so on. > Or it could be any kernel variables that are of interest. you forgot to attach your source code ;) > Is there a way of accessing proc information from the module ? eh why on earth is your code in the kernel then? Shouldn't your code be in userspace if you want to send such information to a remote system??? ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <48a4d13c0603210338s4cd1f120k80e1bbe6ac70669c@mail.gmail.com>]
* Fwd: Accessing kernel information from a module [not found] ` <48a4d13c0603210338s4cd1f120k80e1bbe6ac70669c@mail.gmail.com> @ 2006-03-21 11:40 ` Anand SVR 2006-03-21 16:09 ` Anand SVR 1 sibling, 0 replies; 6+ messages in thread From: Anand SVR @ 2006-03-21 11:40 UTC (permalink / raw) To: linux-kernel ---------- Forwarded message ---------- From: Anand SVR <anand.svr@gmail.com> Date: Mar 21, 2006 5:08 PM Subject: Re: Accessing kernel information from a module To: Arjan van de Ven <arjan@infradead.org> Hi, The code is not yet ready :) I have a basic version that gives part of memory statistics. Why I want to do it in kernel ? Following are the reasons. - Not all the information is available to the user space. There may be situations where kernel developers, carrier grade server mainatainers, and the like might want to access some internal run-time information for debugging, fine-tuning and so on. - Keep it light weight, and least intrusive to the run-time behavior of the system. No need for tcp/udp socket communication. - There could be impending catastrophic situations where in kernel cannot schedule user level processes, perhaps due to lack of memory or whatever. - Ability for the remote node to change/control certain kernel parameters by interacting with the module. This paves way for both diagnosing and controlling kernel. Regards Anand On 3/21/06, Arjan van de Ven <arjan@infradead.org> wrote: > On Tue, 2006-03-21 at 16:32 +0530, Anand SVR wrote: > > Hi, > > > > I am in the process of writing a module that collects kernel > > information of various kernel subsytems and pass this on to a remote > > monitoring/management node. The information could be statistical data > > maintained in data structures of memory, process, network and so on. > > Or it could be any kernel variables that are of interest. > > you forgot to attach your source code ;) > > > Is there a way of accessing proc information from the module ? > > eh why on earth is your code in the kernel then? Shouldn't your code be > in userspace if you want to send such information to a remote system??? > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Accessing kernel information from a module [not found] ` <48a4d13c0603210338s4cd1f120k80e1bbe6ac70669c@mail.gmail.com> 2006-03-21 11:40 ` Fwd: " Anand SVR @ 2006-03-21 16:09 ` Anand SVR 2006-03-22 1:36 ` Sumit Narayan [not found] ` <1142958503.3077.98.camel@laptopd505.fenrus.org> 1 sibling, 2 replies; 6+ messages in thread From: Anand SVR @ 2006-03-21 16:09 UTC (permalink / raw) To: Arjan van de Ven; +Cc: linux-kernel Hi, I forgot to mention one more context. In the embedded environment where one is memory constrained, the lightweight and low memory foot-print module I am referring to becomes relevant. In addition, since it is highly reliable, and remotely manageable as listed below I feel it is worth pursuing. Thanks for your time. Regards Anand On 3/21/06, Anand SVR <anand.svr@gmail.com> wrote: > Hi, > > The code is not yet ready :) I have a basic version that gives part of > memory statistics. > > Why I want to do it in kernel ? Following are the reasons. > > - Not all the information is available to the user space. There may be > situations where kernel developers, carrier grade server mainatainers, > and the like might want to access some internal run-time information > for debugging, fine-tuning and so on. > > - Keep it light weight, and least intrusive to the run-time behavior > of the system. No need for tcp/udp socket communication. > > - There could be impending catastrophic situations where in kernel > cannot schedule user level processes, perhaps due to lack of memory or > whatever. > > - Ability for the remote node to change/control certain kernel > parameters by interacting with the module. This paves way for both > diagnosing and controlling kernel. > > Regards > Anand > > On 3/21/06, Arjan van de Ven <arjan@infradead.org> wrote: > > On Tue, 2006-03-21 at 16:32 +0530, Anand SVR wrote: > > > Hi, > > > > > > I am in the process of writing a module that collects kernel > > > information of various kernel subsytems and pass this on to a remote > > > monitoring/management node. The information could be statistical data > > > maintained in data structures of memory, process, network and so on. > > > Or it could be any kernel variables that are of interest. > > > > you forgot to attach your source code ;) > > > > > Is there a way of accessing proc information from the module ? > > > > eh why on earth is your code in the kernel then? Shouldn't your code be > > in userspace if you want to send such information to a remote system??? > > > > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Accessing kernel information from a module 2006-03-21 16:09 ` Anand SVR @ 2006-03-22 1:36 ` Sumit Narayan [not found] ` <1142958503.3077.98.camel@laptopd505.fenrus.org> 1 sibling, 0 replies; 6+ messages in thread From: Sumit Narayan @ 2006-03-22 1:36 UTC (permalink / raw) To: Anand SVR; +Cc: Arjan van de Ven, linux-kernel You can use kernel probes (kprobe & jprobe) for accessing any variables in the kernel. But ofcourse, this would be running-kernel specific. Link http://www.redhat.com/magazine/005mar05/features/kprobes/ Changing the kernel parameters is gonna be a very dangerous act, unless you are sure of what you are doing. -- Sumit On 3/22/06, Anand SVR <anand.svr@gmail.com> wrote: > Hi, > > I forgot to mention one more context. In the embedded environment where > one is memory constrained, the lightweight and low memory foot-print > module I am referring to becomes relevant. In addition, since it is > highly reliable, and remotely manageable as listed below I feel it is > worth pursuing. > > Thanks for your time. > > Regards > Anand > On 3/21/06, Anand SVR <anand.svr@gmail.com> wrote: > > Hi, > > > > The code is not yet ready :) I have a basic version that gives part of > > memory statistics. > > > > Why I want to do it in kernel ? Following are the reasons. > > > > - Not all the information is available to the user space. There may be > > situations where kernel developers, carrier grade server mainatainers, > > and the like might want to access some internal run-time information > > for debugging, fine-tuning and so on. > > > > - Keep it light weight, and least intrusive to the run-time behavior > > of the system. No need for tcp/udp socket communication. > > > > - There could be impending catastrophic situations where in kernel > > cannot schedule user level processes, perhaps due to lack of memory or > > whatever. > > > > - Ability for the remote node to change/control certain kernel > > parameters by interacting with the module. This paves way for both > > diagnosing and controlling kernel. > > > > Regards > > Anand > > > > On 3/21/06, Arjan van de Ven <arjan@infradead.org> wrote: > > > On Tue, 2006-03-21 at 16:32 +0530, Anand SVR wrote: > > > > Hi, > > > > > > > > I am in the process of writing a module that collects kernel > > > > information of various kernel subsytems and pass this on to a remote > > > > monitoring/management node. The information could be statistical data > > > > maintained in data structures of memory, process, network and so on. > > > > Or it could be any kernel variables that are of interest. > > > > > > you forgot to attach your source code ;) > > > > > > > Is there a way of accessing proc information from the module ? > > > > > > eh why on earth is your code in the kernel then? Shouldn't your code be > > > in userspace if you want to send such information to a remote system??? > > > > > > > > > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1142958503.3077.98.camel@laptopd505.fenrus.org>]
* Re: Accessing kernel information from a module [not found] ` <1142958503.3077.98.camel@laptopd505.fenrus.org> @ 2006-03-22 6:09 ` Anand SVR 0 siblings, 0 replies; 6+ messages in thread From: Anand SVR @ 2006-03-22 6:09 UTC (permalink / raw) To: Arjan van de Ven; +Cc: linux-kernel Hi, The module is going to be "memory less" in the sense that it only fetches data of interest that is already maintained in the kernel, forms a message and send it. In terms of memory, may be few skbs might be consumed for sending the data across for remote monitoring. This is the main objective of the project. Yes, for controlling the kernel parameters one may have to add logic, but I would presume that is not going to be too complex and big. Regards Anand On 3/21/06, Arjan van de Ven <arjan@infradead.org> wrote: > On Tue, 2006-03-21 at 21:39 +0530, Anand SVR wrote: > > Hi, > > > > I forgot to mention one more context. In the embedded environment where > > one is memory constrained, the lightweight and low memory foot-print > > module I am referring to becomes relevant. > > that is a questionable argument; kernel memory is non-pagable while > userspace memory is, so for me the tradeoff isn't immediately a clear > win for doing it in the kernel.. > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-03-22 6:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-21 11:02 Accessing kernel information from a module Anand SVR
2006-03-21 11:12 ` Arjan van de Ven
[not found] ` <48a4d13c0603210338s4cd1f120k80e1bbe6ac70669c@mail.gmail.com>
2006-03-21 11:40 ` Fwd: " Anand SVR
2006-03-21 16:09 ` Anand SVR
2006-03-22 1:36 ` Sumit Narayan
[not found] ` <1142958503.3077.98.camel@laptopd505.fenrus.org>
2006-03-22 6:09 ` Anand SVR
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®