forked from affanse/sosreport-analyzer-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Analyze sosreport including sar files in many different ways
License
uyefe/sosreport-analyzer-ng
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
sosreport-analyzer-ng This is the next version of 'sosreport-analyzer' or 'sar-analyzer'. This program includes both 'sosreport-analyzer' and 'sar-analyzer'. Enjoy! # sosreport-analyzer Analyze sosreport in many different ways This software installs 1 binary file, 'sosreport-analyzer' linked with libsar-analyzer.so and libsosreport-analyzer.so. You can check linkage with '$ ldd /usr/local/bin/sosreport-analyzer'. How to build: $ ./autogen.sh $ ./configure $ make # make install It will install 1 program, 'sosreport-analyzer' in '/usr/local/bin'. 1. sosreport-analyzer Program Name: sosreport-analyzer Binary path: /usr/local/bin/sosreport-analyzer For sosreport New version of config is found in /usr/share/sosreport-analyzer/sosreport-analyzer.conf.example. Copy it as /etc/sosreport-analyzer.conf. Echo date file. Echo lsb-release file. Echo uname file. Echo hostname file. Echo uptime file. Analyze proc/cpuinfo file. Echo root/anaconda-ks.cfg file. Analyze dmidecode file. Analyze lsmod file. Echo files in etc/modprobe.d/. Analyze lspci file. Analyze etc/udev/ file. Analyze sos_commands/devices/udevadm_info_--export-db file. Echo sos_commands/scsi/lsscsi file. Analyze installed-rpms file. Analyze df file. Echo vgdisplay file. Echo free file. Echo files etc/host*. Echo ip_addr file. Echo route file. Analyze last file. Analyze ps file. Analyze lsof file. Analyze netstat file. Echo files in etc/systemd/. Echo files in etc/systemd/system/. Echo files in usr/lib/systemd/. Echo files in sos_commands/sar. Echo files in sos_commands/virsh. Echo files in sos_commands/usb. Echo files in etc/default. Analyze etc/kdump.conf. Analyze etc/sysctl.conf. Echo etc/rsyslog.conf. Echo etc/yum.conf file. Echo files in etc/yum.repos.d/. Echo files etc/sysconfig/network-scripts/ifcfg-*. Analyze proc/meminfo file. Echo proc/interrupts file. Analyze files in sos_commands/boot/. Echo proc/net/dev file. Echo proc/net/sockstat file. Echo etc/logrotate.conf file. Echo files in etc/logrotate.d/. Echo files in etc/pki/. Echo files in etc/cron.d/. Echo var/log/dmesg file. Analyze var/log/messages* files. Echo files in var/crash/ if the directory exists. Analyze var/log/secure* files. Analyze files in var/log/audit/. Analyze sos_commands/kernel/sysctl_-a file. Analyze sos_commands/logs/journalctl_--no-pager files. Analyze sos_commands/networking/ethtool_-S files. Analyze sos_commands/networking/ethtool_-i files. Echo files under etc/httpd/. Analyze files under proc/. For mcinfo New version of config is found in /usr/share/sosreport-analyzer/sosreport-analyzer-mcinfo.conf.example. Copy it as /etc/sosreport-analyzer-mcinfo.conf. Analyze proc/cpuinfo file. Analyze boot/grub/ files. Echo files in cmdlog/. Echo etc/host*. Echo files etc/sysconfig/network-scripts/ifcfg-*. Analyze proc/meminfo file. Echo proc/interrupts file. Echo var/log/dmesg file. Analyze var/log/messages* files. Echo files in var/crash/. Analyze files under proc/. 2. sar-analyzer Presently, it gives -ZM option to usual sar-analyzer functionality. There are seven features. Show highest and lowest average value to a file with a report. Show highest spike value to a file with a report. Show highest value in given time-span to a file with a report. Show highest spike value in given time-span to a file with a report. Show possible thrashing. Show network down. Generate graphs as postscript files. When the file sanity check fails, program stops echoing the reason. In that case, move the very file to other than <sosreport-dir>/var/log/sa and run the program again. Or you may reading file including japanese although machine locale is not JP. In that case, edit libsar-analyzer/Makefile.am to use common_jp.c and sar_analyzer_jp.c. ## Getting "sar file" Note that "sar file" should be basically, written in English or Japanese. It may be good to convert binary 'sa' file to text 'sar' file. Because, sometimes, text 'sar' file is not made yet but binary 'sa' file exists. Here is a way converting 'sa' file to 'sar' file. example: $ LC_ALL=C sar -f /var/log/sa/sa01 -A -t > ./sar01 how to remove ^@ Sometimes, ^@ will appear in 'sar' file. In those cases, remove with this command. example: $ sed -i 's/\x00//g' ./sar01 When you did above, check 'sar' file is written in Ascii text and clear. example: $less sar01 ## Before using - sosreport Check /etc/sosreport-analyzer.conf You can set analyzing word for each analyzing member. If you are not sure, consult /usr/share/sosreport-analyzer/sosreport-analyzer.conf.example. New version will not override the conf file. When you build new version, be sure to copy file or at least, copy lines needed. - mcinfo Check /etc/sosreport-analyzer-mcinfo.conf You can set analyzing word for each analyzing member. If you are not sure, consult /usr/share/sosreport-analyzer/sosreport-analyzer-mcinfo.conf.example. New version will not override the conf file. When you build new version, be sure to copy file or at least, copy lines needed. ## Usage - sosreport $ sosreport-analyzer -D <sosreport-dir> It writes a file to './sosreport-analyzer-results/<sosreport-dir>/<sosreport-dir>_<time>.txt', './sosreport-analyzer-results/<sosreport-dir>/<sosreport-dir>_sar_<time>.txt'. and, './sosreport-analyzer-results/<sosreport-dir>/graphs/<sosreport-dir>-<item>-<no>.ps'. - mcinfo $ sosreport-analyzer -M -D <mcinfo-dir> It writes a file to './sosreport-analyzer-results/<mcinfo-dir>/<mcinfo-dir>_<time>.txt', './sosreport-analyzer-results/<mcinfo-dir>/<mcinfo-dir>_sar_<time>.txt'. and, './sosreport-analyzer-results/<mcinfo-dir>/graphs/<mcinfo-dir>-<item>-<no>.ps'. - sar-only $ sosreport-analyzer -S -D <sa-dir-path> It writes a file to './sosreport-analyzer-results/<dir>/<dir>_sar_<time>.txt'. and, './sosreport-analyzer-results/<dir>/graphs/<dir>-<item>-<no>.ps'. - time-span for sar ex. $ sosreport-analyzer -T 09:00-13:00 -D <sosreport-dir> $ sosreport-analyzer -T 09:00-13:00 -M -D <mcinfo-dir> $ sosreport-analyzer -T 09:00-13:00 -S -D <sa-dir-path> You can't redirect to a file. ## Is this program safe to execute? You can execute this program as an ordinary user not root ( you need to be root when editting conf file, though ). Creating directory unconditionally in the current directory for the analyzed files, with no harm. No memory leakage. Checked with 'valgrind --leak-check=full -v sosreport-analyzer -D <sosreport-dir>'. ## Uninstall # make uninstall
About
Analyze sosreport including sar files in many different ways
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- C 93.5%
- Objective-C 5.2%
- Other 1.3%