Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In Raspberry Pi the functionality of self-heal feature is provided by systemd.


Code Flow

Image Added



Resource Monitoring - resource_monitor.sh

Image Added

  • resource_monitor.sh monitors the Memory and CPU usage
  • Average memory and CPU thresholds will be obtained from syscfg.db (default avg_cpu_threshold:100, avg_memory_threshold:100)


  • Memory Usage Monitor
    • Gets the total, free and used memory details using free command
    • AvgMemUsed = usedMem*100 / totalMem
    • if AvgMemUsed > memory_threshold, device will be rebooted
  • CPU Usage Monitor
    • Active CPU is considered as sum of user, system, iowait, irq, softirq, steal cpu
    • CPU usage difference in every 30 seconds for a period of 5 mins, is considered as an Curr_CPULoad_Avg.
    • If Curr_CPULoad_Avg > cpu_threshold, corrective action will be taken



Process Monitoring - task_health_monitor.sh

Image Added

  • task_health_monitor.sh monitors the status of various taks periodically and takes the corrective action
  • Default monitoring interval is 15mins and can be modified using resource_monitor_interval in syscfg.db
  • Monitors
    • Health of peer processor, in case of dual core processors
    • Other tasks added as part of the script
  • New tasks can be added by editing the script