This project is a Linux diagnostics controller daemon that monitors system performance and runs diagnostics based on specified anomalies. It is designed to be packaged for easy installation on Debian and RPM-based systems.
src/linux_diagnostics_controller
: Contains the main logic for the Linux diagnostics controller daemon, handling configuration and diagnostics execution.config/config.yaml
: Configuration file for the daemon. Users can customize the behavior of the diagnostics controller here.packages/debian/
: Contains files necessary for building the DEB package.control
: Package metadata including name, version, maintainer, dependencies, and description.postinst
: Script executed after the DEB package is installed to enable and start the systemd service.prerm
: Script executed before the DEB package is removed to stop and disable the systemd service.rules
: Defines the build process for the DEB package.
packages/rpm/
: Contains files necessary for building the RPM package.linux_diagnostics.spec
: RPM package specification including name, version, release, summary, license, and installation/uninstallation scripts.postinstall.sh
: Script executed after the RPM package is installed to enable and start the systemd service.preuninstall.sh
: Script executed before the RPM package is removed to stop and disable the systemd service.
README.md
: Documentation for the project.Makefile
: Defines the build commands for creating the DEB and RPM packages.
- Navigate to the project root directory:
cd /path/to/linux_diagnostics
- Run the following command to build the DEB package:
make debian
- The DEB package will be created in the parent directory of
packages/debian
.
- Navigate to the project root directory:
cd /path/to/linux_diagnostics
- Run the following command to build the RPM package:
make rpm
- The RPM package will be created in the
~/rpmbuild/RPMS/noarch/
directory.
- Use
dpkg
to install the DEB package:sudo dpkg -i ../linux_diagnostics_1.0-1_all.deb
- If there are missing dependencies, resolve them using:
sudo apt-get install -f
- Use
rpm
to install the RPM package:sudo rpm -ivh ~/rpmbuild/RPMS/noarch/linux_diagnostics-1.0-1.noarch.rpm
After installation, the linux_diagnostics
service will be installed and managed by systemd
.
sudo systemctl start linux_diagnostics.service
sudo systemctl enable linux_diagnostics.service
sudo systemctl status linux_diagnostics.service
sudo systemctl stop linux_diagnostics.service
sudo dpkg -r linux_diagnostics
sudo rpm -e linux_diagnostics
To clean up build artifacts, run:
make clean
This project is licensed under the MIT License.