Re: watchdog pet in kernel module

2013-12-03 Thread Peter Teoh
Hi Vipul, I have seen this in a number of commercial software running on RHEL, and on other realtime OS as well. The watchdog mechanism is always working in pair: userspace "feeding" the dog (in the kernel). (btw, feed the dog is a more usually used term than "pet" the dog. sorry for that.

Re: watchdog pet in kernel module

2013-12-03 Thread Vipul Jain
On Tue, Dec 3, 2013 at 2:31 PM, wrote: > On Tue, 03 Dec 2013 13:15:32 -0800, Vipul Jain said: > > > currently we configure/pet the watchdog from user space via /dev/ipmi0 > > device interface and I would like to do the pet part from kernel module. > > That's actually defeating the purpose. If yo

Re: watchdog pet in kernel module

2013-12-03 Thread Valdis . Kletnieks
On Tue, 03 Dec 2013 13:15:32 -0800, Vipul Jain said: > currently we configure/pet the watchdog from user space via /dev/ipmi0 > device interface and I would like to do the pet part from kernel module. That's actually defeating the purpose. If you do it from the kernel, you keep the watchdog from

Re: watchdog pet in kernel module

2013-12-03 Thread Vipul Jain
On Mon, Dec 2, 2013 at 11:32 PM, anish singh wrote: > On Mon, Dec 2, 2013 at 10:34 PM, Vipul Jain wrote: > > Hi, > > > > I would like to move the hardware watchdog pet code from user space to > > kernel space inside the ipmi module and would like to know how to go > about > > pet the hardware wat

Re: How can I 'getchar()' in module code?

2013-12-03 Thread Bernd Petrovitsch
On Die, 2013-12-03 at 08:38 -0500, valdis.kletni...@vt.edu wrote: > On Tue, 03 Dec 2013 20:35:41 +0800, said: > > For debugging purpose, I want something like 'getchar()' that can pause > > execution in the module code. Do any candidates I can choose? You do not want that - there is way too much

Re: How can I 'getchar()' in module code?

2013-12-03 Thread Valdis . Kletnieks
On Tue, 03 Dec 2013 20:35:41 +0800, 乃宏周 said: > For debugging purpose, I want something like 'getchar()' that can pause > execution in the module code. Do any candidates I can choose? The problem is that pausing execution in module code is dangerous, as if you hold any locks or anything lik

Re: How can I 'getchar()' in module code?

2013-12-03 Thread Daniel Baluta
On Tue, Dec 3, 2013 at 2:35 PM, 乃宏周 wrote: > For debugging purpose, I want something like 'getchar()' that can pause > execution in the module code. Do any candidates I can choose? No. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http

How can I 'getchar()' in module code?

2013-12-03 Thread 乃宏周
For debugging purpose, I want something like 'getchar()' that can pause execution in the module code. Do any candidates I can choose? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewb

Re: Issue while unloading modules via modprobe

2013-12-03 Thread Mandeep Sandhu
> echo $? show 1 (EPERM? most probably, operation not permitted for common > module). > Hmmm...strange. What does 'dmesg' show when this happens? Is anything related to an error printed there? -mandeep ___ Kernelnewbies mailing list Kernelnewbies@kerne

Re: Issue while unloading modules via modprobe

2013-12-03 Thread Chetan Nanda
On Tue, Dec 3, 2013 at 2:17 PM, Mandeep Sandhu wrote: > > > > error = system("modprobe -rv A"); > > > > This returns an error = 256. > > Hi Mandeep, thanks for your mail What does 'perror' show (if anything) ? > > Also, if you try the same via a shel, whats the return value ('echo > $?') printe

Re: Issue while unloading modules via modprobe

2013-12-03 Thread Mandeep Sandhu
> > error = system("modprobe -rv A"); > > This returns an error = 256. What does 'perror' show (if anything) ? Also, if you try the same via a shel, whats the return value ('echo $?') printed? BTW, why are you using the '-v' option when invoking modprobe programatically? -mandeep

Issue while unloading modules via modprobe

2013-12-03 Thread Chetan Nanda
Hi, I am getting an error while unloading modules via modprobe. Here is the description of issue. I have a module 'A' that depends on Module 'C' and 'D'. And another module 'B' that depends on Module 'C' and 'E' I loaded these modules from code via 'system' function as error = system("modprobe