-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurelinux-sysinfo: package to deploy systemd service that writes system info to log #8696
Merged
amritakohli
merged 20 commits into
microsoft:3.0-dev
from
amritakohli:amritakohli-azlsysinfo
Apr 4, 2024
Merged
azurelinux-sysinfo: package to deploy systemd service that writes system info to log #8696
amritakohli
merged 20 commits into
microsoft:3.0-dev
from
amritakohli:amritakohli-azlsysinfo
Apr 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jperrin
reviewed
Apr 3, 2024
jperrin
reviewed
Apr 3, 2024
jperrin
reviewed
Apr 3, 2024
Note: will update signatures and date at the end |
amritakohli
force-pushed
the
amritakohli-azlsysinfo
branch
from
April 4, 2024 15:48
dd1c5d2
to
d0450c3
Compare
romoh
approved these changes
Apr 4, 2024
To fix the cgmanifest error you can add this new spec to the ignore list here: https://github.com/microsoft/azurelinux/blob/3.0-dev/.github/workflows/validate-cg-manifest.sh#L24 |
12 tasks
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-static
subpackages, etc.) have had theirRelease
tag incremented../cgmanifest.json
,./toolkit/scripts/toolchain/cgmanifest.json
,.github/workflows/cgmanifest.json
)./SPECS/LICENSES-AND-NOTICES/data/licenses.json
,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md
,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON
)*.signatures.json
filessudo make go-tidy-all
andsudo make go-test-coverage
passSummary
Adds azurelinux-sysinfo package. Deploys a systemd service that gathers system information related to the device, operating system, cloud-init, boot time, resource utilization, installed packages, and SELinux mode. Collected information is written in JSON format to a log file on the user's system for easy access and analysis. The systemd service runs at boot time if installed during image creation.
Change Log
Does this affect the toolchain?
NO
Test Methodology
Example output:
mariner_user@mariner-vm [ ~ ]$ sudo journalctl -u azurelinux-sysinfo
Apr 04 21:27:09 mariner-vm systemd[1]: Started Azure Linux Sysinfo Service.
Apr 04 21:27:09 mariner-vm python3[692]: Running azurelinux sysinfo collection...
Apr 04 21:27:09 mariner-vm python3[692]: Collecting asset id...
Apr 04 21:27:09 mariner-vm python3[692]: Collecting os info...
Apr 04 21:27:09 mariner-vm python3[692]: Collecting cloud-init info...
Apr 04 21:27:10 mariner-vm python3[692]: Collecting boot info...
Apr 04 21:27:10 mariner-vm python3[692]: Collecting disk and memory usage...
Apr 04 21:27:10 mariner-vm python3[692]: Collecting package info...
Apr 04 21:27:10 mariner-vm python3[692]: Collecting system info...
Apr 04 21:27:10 mariner-vm python3[692]: {'$schema': 'v1', 'source': 'azurelinux-sysinfo-service', 'asset_id': '71edd3a5-725e-42e7-a797-6f7994e4662f', 'os_info': {'kernel_version': '5.15.148.2-2.cm2', 'release_version': '2.0.20240301', 'release_version_id': '2.0'}, 'cloud_init_info': {'hostname': 'mariner-vm', 'longest_running_processes': [{'time': '41.90600s', 'process': '(modules-final/config-package_update_upgrade_install)'}, {'time': '00.50100s', 'process': '(init-network/config-users_groups)'}, {'time': '00.34500s', 'process': '(init-network/config-ssh)'}, {'time': '00.26800s', 'process': '(modules-final/config-scripts_user)'}, {'time': '00.06900s', 'process': '(init-local/search-NoCloud)'}]}, 'boot_info': {'boot_time': {'kernel_boot_time_secs': 1.289, 'initrd_boot_time_secs': 1.146, 'userspace_boot_time_secs': 4.972, 'total_boot_time_secs': 7.408}, 'longest_running_processes': [{'systemd-networkd-wait-online.service': 1.848}, {'cloud-init-local.service': 0.983}, {'initrd-switch-root.service': 0.832}]}, 'resource_utilization': {'disk_usage': {'disk_size_gib': '3.85', 'disk_usage_gib': '0.55'}, 'memory_usage': {'total_memory_gib': 3, 'available_memory_gib': 3}, 'cpu_usage': {'physical_cpu_count': 2, 'logical_cpu_count': 4, 'cpu_percent': 27.8}}, 'package_info': {'package_count': 236}, 'system_info': {'selinux_mode': 'Permissive'}}
Apr 04 21:27:10 mariner-vm python3[692]: Azure Linux sysinfo collection completed successfully.
Apr 04 21:27:10 mariner-vm systemd[1]: azurelinux-sysinfo.service: Deactivated successfully.
Known Issues