CogniOS is an AI-assisted Linux system observability and workload optimization platform that combines operating systems, machine learning, and systems engineering to provide intelligent performance monitoring, anomaly detection, workload-aware optimization, crash analysis, and scheduling researchβall without modifying the Linux kernel.
Modern operating systems expose a large amount of telemetry, but existing monitoring tools often present only raw statistics, leaving users to determine the root cause of performance issues themselves.
CogniOS bridges this gap by collecting real-time system telemetry, analyzing workload behavior, detecting anomalies, recommending optimizations, and enabling post-crash analysis through an integrated and modular architecture.
The project is designed as both:
- A practical system observability platform for Linux
- A research framework for experimenting with AI-assisted operating system scheduling
- π Real-time Linux system telemetry collection
- π©Ί Intelligent anomaly detection for performance degradation
- π― AI-based workload classification and optimization
- π¦ Rolling telemetry recording for crash replay
- π¬ Scheduling algorithm benchmarking and research
- π Interactive Streamlit dashboard
- ποΈ Centralized SQLite telemetry database
- π§© Modular architecture for independent development and testing
Linux System
β
βΌ
Telemetry Collectors
(/proc, psutil, process APIs)
β
βΌ
SQLite Database
β
βββββββββββββββββΌβββββββββββββββββ
β β β
βΌ βΌ βΌ
OS Doctor FocusOS BlackBox
β β β
βββββββββββββββββΌβββββββββββββββββ
βΌ
Research Engine
β
βΌ
Streamlit Dashboard
OS Doctor continuously monitors the system for abnormal behavior using machine learningβbased anomaly detection techniques.
- Detect abnormal CPU, memory and I/O behavior
- Explain possible reasons for system slowdowns
- Identify unusual workload patterns
- Provide interpretable diagnostics from live telemetry
FocusOS is responsible for intelligent workload classification and adaptive system optimization.
- Classify the current workload using machine learning
- Optimize process priorities
- Modify Linux scheduling parameters
- Improve overall system responsiveness
Future versions may also support dynamic CPU affinity optimization and workload-aware scheduling.
BlackBox acts as the system's flight recorder.
It continuously stores recent telemetry in a rolling buffer, allowing developers to replay system activity after crashes or freezes.
- Record recent system telemetry
- Preserve crash history
- Replay workload traces
- Assist in post-mortem debugging
The Research Engine provides an experimentation platform for scheduling algorithms.
- Compare classical scheduling algorithms
- Evaluate AI-based schedulers
- Replay collected workloads
- Benchmark scheduling performance
- Support reinforcement learning experiments
Supported scheduling algorithms include:
- FCFS
- Shortest Job First
- Round Robin
- Priority Scheduling
Future versions may include reinforcement learning schedulers.
The Streamlit dashboard serves as the unified visualization layer of CogniOS.
- Visualize system telemetry
- Display anomaly alerts
- Monitor workload classifications
- Compare scheduling results
- Provide a centralized monitoring interface
Collectors gather telemetry directly from Linux using lightweight system interfaces.
- CPU monitoring
- Memory monitoring
- Disk monitoring
- Process monitoring
- Network statistics
- I/O statistics
These collectors act as the data source for every other module.
The data layer stores all telemetry generated by the collectors.
- Store real-time telemetry
- Maintain workload traces
- Persist crash recordings
- Provide data for ML training
- Support benchmarking experiments
SQLite is used as the centralized storage backend.
CogniOS/
β
βββ blackbox/ # Rolling telemetry recorder and crash replay engine
βββ collectors/ # System telemetry collectors using /proc and psutil
βββ dashboard/ # Streamlit-based monitoring dashboard
βββ data/
β βββ datasets/ # Labeled workload datasets for ML training
β βββ telemetry/ # Raw telemetry snapshots
β βββ sqlite/ # SQLite database files
βββ focusos/ # AI workload classifier and adaptive optimization engine
βββ os_doctor/ # Real-time anomaly detection module
βββ research_engine/ # Scheduling simulator and benchmarking framework
βββ utils/ # Shared helper utilities used across modules
β
βββ cognios_as_daemon.py # Runs CogniOS as a background monitoring daemon
βββ config.py # Global project configuration
βββ db.py # SQLite database interface and helper functions
βββ main.py # Main application entry point
βββ overhead.py # Measures runtime overhead introduced by monitoring
βββ requirements.txt # Python dependencies
βββ README.md
| Category | Technology |
|---|---|
| Language | Python |
| System Monitoring | psutil, Linux /proc |
| Database | SQLite |
| Machine Learning | PyTorch |
| Data Processing | NumPy, Pandas |
| Anomaly Detection | Isolation Forest (scikit-learn) |
| Reinforcement Learning | Stable-Baselines3 |
| Dashboard | Streamlit |
git clone https://github.com/<your-org>/CogniOS.git
cd CogniOSpip install -r requirements.txtpython main.pyTo run CogniOS as a background service:
python cognios_as_daemon.pyEach major subsystem is designed as an independent module with its own documentation, enabling contributors to work on individual components without affecting the rest of the project.
Every module contains its own dedicated README.md describing:
- Module architecture
- Directory structure
- Components
- APIs
- Data flow
- Usage
- Future work
- Real-time Linux telemetry collection
- Intelligent anomaly detection
- AI-assisted workload optimization
- Crash replay and forensic analysis
- Scheduling benchmark suite
- Reinforcement learning scheduler
- GPU telemetry support
- Windows and macOS support
We welcome contributions from developers interested in:
- Operating Systems
- Machine Learning
- Systems Programming
- Linux Internals
- Performance Engineering
- Data Engineering
Before contributing, please read the documentation for the module you wish to work on.
This project is released under the MIT License.
CogniOS is developed as an educational and research-focused project exploring the intersection of Operating Systems, Artificial Intelligence, and Systems Engineering.
The project aims to provide a modular platform for learning, experimentation, and innovation in intelligent system observability and workload optimization.