[
https://issues.apache.org/jira/browse/METRON-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15821187#comment-15821187
]
ASF GitHub Bot commented on METRON-636:
---------------------------------------
Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/400#discussion_r95808285
--- Diff: metron-deployment/scripts/platform-info.sh ---
@@ -62,3 +62,39 @@ mvn --version
# operating system
echo "--"
uname -a
+
+# system resources
+echo "--"
+case "${OSTYPE}" in
+ linux*)
+ cat /proc/meminfo | grep -i MemTotal | awk '{print "Total System
Memory = " $2/1024 " MB"}'
+ cat /proc/cpuinfo | egrep 'model\ name' | uniq | cut -d: -f2 | awk
'{print "Processor Model:" $0}'
+ cat /proc/cpuinfo | egrep 'cpu\ MHz' | uniq | cut -d: -f2 | awk
'{print "Processor Speed:" $0 " MHz"}'
+ cat /proc/cpuinfo | grep -i '^processor' | wc -l | awk '{print "Total
Physical Processors: " $0}'
+ cat /proc/cpuinfo | grep -i cores | cut -d: -f2 | awk '{corecount+=$1}
END {print "Total cores: " corecount}'
+ echo "Disk information:"
+ df -h | grep "^/"
+ ;;
+ darwin*)
+ sysctl hw.memsize | awk '{print "Total System Memory = " $2/1048576 "
MB"}'
+ sysctl machdep.cpu | grep 'machdep.cpu.brand_string' | cut -d: -f2 |
cut -d\@ -f1 | awk '{print "Processor Model:" $0}'
+ sysctl machdep.cpu | grep 'machdep.cpu.brand_string' | cut -d: -f2 |
cut -d\@ -f2 | awk '{print "Processor Speed:" $0}'
+ sysctl hw.physicalcpu | cut -d: -f2 | awk '{print "Total Physical
Processors:" $0}'
+ sysctl machdep.cpu | grep 'machdep.cpu.core_count' | cut -d: -f2 | cut
-d\@ -f2 | awk '{print "Total cores:" $0}'
+ echo "Disk information:"
+ df -h | grep "^/"
+ ;;
+ bsd*)
+ echo "BSD is not currently supported, unable to detect system
resources"
+ ;;
--- End diff --
@anandsubbu This message might be a little misleading. Could a user
misinterpret this as meaning that Metron does not support the given OS, versus
just the platform-info.sh script does not support it?
You could just remove the conditionals for BSD, Windows and Solaris and let
it fall through to something like "Unable to detect system resources for
"${OSTYPE}".
> Capture memory and cpu details as a part of platform-info script
> ----------------------------------------------------------------
>
> Key: METRON-636
> URL: https://issues.apache.org/jira/browse/METRON-636
> Project: Metron
> Issue Type: Improvement
> Affects Versions: 0.3.0
> Reporter: Anand Subramanian
> Assignee: Anand Subramanian
> Priority: Minor
>
> The platform-info.sh script currently does not capture the system memory
> footprints.
> Many issues reported by users when deploying quick dev or full dev single
> node deployments are due to system constraints (low memory for e.g.). It
> would be good to enhance the platform-info script so that it can ease out
> finding potential resource issues.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)