Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appatalks/systemd-docker-startup-discovery
Uses journalctl, systemd-analyze blame and docker inspect to review start time and latency to complete sequence since last boot.
https://github.com/appatalks/systemd-docker-startup-discovery
Last synced: 28 days ago
JSON representation
Uses journalctl, systemd-analyze blame and docker inspect to review start time and latency to complete sequence since last boot.
- Host: GitHub
- URL: https://github.com/appatalks/systemd-docker-startup-discovery
- Owner: appatalks
- License: mit
- Created: 2024-02-10T16:39:59.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-10T17:02:34.000Z (9 months ago)
- Last Synced: 2024-02-11T17:46:18.304Z (9 months ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Startup Discovery Script
This script is designed to list and analyze the startup sequence of system services and Docker containers on ```systemd``` based systems. It provides insights into the startup duration, order, and start timestamp of each service and Docker container since the last boot. This can be useful for system administrators and developers looking to optimize startup times and understand service dependencies.
## Features
- Generates a detailed log file with timestamps, duration, and order of system service startups.
- Identifies Docker containers' startup details if Docker is installed and running.
- Outputs logs to a file with a dynamic name based on the current date and time.## Prerequisites
- Requires `sudo` privileges for execution.
- Docker (optional): To log startup details of Docker containers.## Usage
1. Download the script `startup_discovery.sh` to your local machine.
2. Make the script executable:
```bash
chmod +x startup_discovery.sh
```
3. Run the script with sudo to ensure it has the necessary permissions:
```bash
sudo /bin/bash startup_discovery.sh
```## Log File
After execution, the script generates a log file in the `/var/log` directory. The file name is `service_and_docker_startup_details_.log`, where the date and time reflect when the script was run. The log file includes:
- System service startup durations, order, and timestamps.
- Docker containers startup details, including start time and container names, if applicable.## Contributing
Feel free to fork this project and submit pull requests for improvements or bug fixes. For major changes, please open an issue first to discuss what you would like to change.