The PICOS Monitor process is a daemon service managed by systemd, it starts before PICOS, and is responsible for the following functions.
- Monitor PICOS Process
Restart PICOS if any key process crashs. If restart cannot recover the system, the system will be rebooted.
When a system failure happens, the system LED will enter the warning state.
- Backup and Restore the Monitored Files
Backup and restore the monitored files when the system starts up again from a power down. Monitored files are mainly the configurations that could have under updation when a power cycle happened. User application files can be protected as well.
- Monitor CPU Usage Rate
Generate a log message if the CPU rate is higher than maximum threshold and stays there for some time period. A log message will be recorded when the CPU usage recovers to the normal rate.
- Monitor the Memory Usage of PICOS and User Applications
The memory usage monitored is the physical memory used, not including any system cache of file system.
- Monitor Disk Usage
Monitor disk usage, including free space of rootfs, tmpfs, ramdisk and user data partition.
- Take Care of Watchdog
PICOS Monitor initializes and feeds the watchdog register to make sure monitor itself is alive. If monitor process fails, the watchdog will trigger to reset the whole system and load the system again.
View Monitor Log
Log messages generated during Monitor process can be found at any of the following two paths. The log entries will have the keyword [PICOS_MONITOR].
Monitor Process Management
We can use systemctl status picos-monitor command to check the status of monitor process, where ”Active: ” could be active or inactive, indicating the status of monitor process.
The following commands can be used to start/stop picos-monitor process.