-
Notifications
You must be signed in to change notification settings - Fork 1
License
ewk/parseoom
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
parseoom - A utility for parsing the output of an oom-kill message Usage: parseoom $LOGFILE Given a log file containing an oom-killer report, the 'parseoom' program will extract and format relevant data about memory usage at the time the oom-killer was invoked. For example, when run with the sample logs from the messages file included in this repository, 'parseoom' will generate the following output: % parseoom messages Memory total: Total RAM: 19.9 GiB Swap: Free swap: 0 KiB Huge Pages: Allocated 2 MiB huge pages: 0.0 GiB -- (0.1%) Allocated 1 GiB huge pages: 2.0 GiB -- (9.8%) Slab: Unreclaimable slab: 17.4 MiB -- (0.1%) Shared Memory: Shared memory: 0.6 MiB -- (0.0%) Top 10 unique commands using memory: clamd 1649.7 MiB rspamd 294.9 MiB mariadbd 30.0 MiB fail2ban-server 17.1 MiB redis-server 6.1 MiB unattended-upgr 5.8 MiB nginx 3.3 MiB config 1.5 MiB freshclam 1.4 MiB znc 1.1 MiB Processes using most memory: pid uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name MiB 517 111 517 590364 422324 4395008 107099 0 clamd 1649.7 1682 108 1682 67131 16509 421888 7811 0 rspamd 64.5 1680 108 1680 65038 14927 380928 8231 0 rspamd 58.3 584 108 584 64811 14737 393216 8513 0 rspamd 57.6 1677 108 1677 64811 14698 376832 8305 0 rspamd 57.4 1683 108 1683 64811 14614 376832 8614 0 rspamd 57.1 669 106 669 269508 7688 323584 12110 0 mariadbd 30.0 590 0 590 177664 4383 208896 343 0 fail2ban-server 17.1 581 112 581 16276 1567 110592 197 0 redis-server 6.1 587 0 587 27165 1488 110592 635 0 unattended-upgr 5.8 Total RSS utilized by user processes: 2020.6 MiB I wrote this program to improve my understanding of Rust by implementing a non-trivial utility in the language. I make no claims regarding its fitness of purpose. This program is capable of cleaning up or ignoring most log noise, but edge cases may still be lurking out there in the real world. This utility is not robust enough to handle corrupted logs (which are not unusual in the presence of memory pressure), unexpected linebreaks, or Murphy's law. Many variations of an omm-killer parsing utility already exist. Special thanks to John Siddle for sharing his version!
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published