The watchdog package provides a user-space application which can be configured to provide updates to a hardware or software watchdog timer via the Linux kernel’s watchdog interface.
In addition to the standard provisions of watchdog timer behavior, the watchdog package can be configured to voluntarily cease operation based on a number of administrator-defined heuristics.
[root@dev ~]# ps -ef | grep watchdog root 6 2 0 Oct17 ? 00:00:00 [watchdog/0] root 10 2 0 Oct17 ? 00:00:00 [watchdog/1] root 14 2 0 Oct17 ? 00:00:00 [watchdog/2] root 18 2 0 Oct17 ? 00:00:00 [watchdog/3] root 22 2 0 Oct17 ? 00:00:00 [watchdog/4] root 26 2 0 Oct17 ? 00:00:00 [watchdog/5] root 30 2 0 Oct17 ? 00:00:00 [watchdog/6] root 34 2 0 Oct17 ? 00:00:00 [watchdog/7] root 38 2 0 Oct17 ? 00:00:00 [watchdog/8] root 42 2 0 Oct17 ? 00:00:00 [watchdog/9] root 46 2 0 Oct17 ? 00:00:00 [watchdog/10] root 50 2 0 Oct17 ? 00:00:00 [watchdog/11] root 16881 16304 0 11:23 pts/1 00:00:00 grep watchdog
[root@dev ~]# cat /proc/sys/kernel/nmi_watchdog [root@dev ~]# echo 0 > /proc/sys/kernel/nmi_watchdog [root@dev ~]# ps -ef | grep watchdog root 16894 16304 0 11:24 pts/1 00:00:00 grep watchdog
To start monitoring the system with OProfile, execute the following command as root:
~]# opcontrol --start
Output similar to the following is displayed:
Using log file /var/lib/oprofile/oprofiled.log Daemon started. Profiler running. The settings in /root/.oprofile/daemonrc are used. The OProfile daemon, oprofiled, is started; it periodically writes the sample data to the /var/lib/oprofile/samples/ directory. The log file for the daemon is located at /var/lib/oprofile/oprofiled.log. Disable the nmi_watchdog registers
On a Red Hat Enterprise Linux 6 system, the nmi_watchdog registers with the perf subsystem. Due to this, the perf subsystem grabs control of the performance counter registers at boot time, blocking OProfile from working.
To resolve this, either boot with the nmi_watchdog=0 kernel parameter set, or run the following command to disable nmi_watchdog at run time:
~]# echo 0 > /proc/sys/kernel/nmi_watchdog
To re-enable nmi_watchdog, use the following command:
~]# echo 1 > /proc/sys/kernel/nmi_watchdog
To stop the profiler, execute the following command as root:
~]# opcontrol --shutdown
blog comments powered by Disqus