Skip to content
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

Adding dmidecode support in server-info for better view of memory subsystem #178

Merged
merged 18 commits into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added(server-info): reminder about installation pcituils and dmidecode.
  • Loading branch information
strizhechenko committed Dec 17, 2017
commit 304c1b60c9f67db5c38457bfcf3b3c084e378f51
2 changes: 1 addition & 1 deletion utils/server-info
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ "$1" != 'show' ] && [ "$1" != 'rate' ]; then
echo "Usage $0 [show|rate]"
exit 1
fi
server-info-collect server &>/dev/null
server-info-collect server
cd /root/
tar xfz server.tar.gz
cd /root/server/
Expand Down
10 changes: 8 additions & 2 deletions utils/server-info-collect
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ server_info() {
cat /proc/scsi/scsi > $TMPDIR/scsi
LANG= lsblk -d --output=NAME,MODEL > $TMPDIR/lsblk_models
LANG= lsblk -nlb --output SIZE,MOUNTPOINT,NAME > $TMPDIR/lsblk_sizes
LANG= lspci > $TMPDIR/lspci || true
if ! LANG= lspci 2>/dev/null > $TMPDIR/lspci; then
echo "Consider install lspci" >&2
echo " yum -y install pciutils" >&2
fi
LANG= lscpu > $TMPDIR/lscpu_info
LANG= lscpu -p | grep -v '^#' | awk -F ',' '{print $1" "$3}' > $TMPDIR/lscpu_layout
if ! LANG= dmidecode --type memory 2>/dev/null > $TMPDIR/dmidecode; then
echo "Consider installing dmidecode:" >&2
echo " yum -y install dmidecode" >&2
fi
fgrep -H '' /sys/block/*/queue/rotational | egrep -v '[0-9]+/' > $TMPDIR/disks_types || true
}

Expand Down Expand Up @@ -60,7 +67,6 @@ make_archive() {
cd /tmp/
tar cfz "$output" "$1"
rm -rf $TMPDIR
echo "$output"
}

main() {
Expand Down