first commit
This commit is contained in:
13
scripts/tools/collect_info.sh
Normal file
13
scripts/tools/collect_info.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
#Roy Cohen :roy@proteon.com
|
||||
#Proteon B.V. :Zuid Hollandlaan 7, 2596 AL Den Haag
|
||||
#objective :colection script for run_collect_info.sh this script collects the Total Processors, Memory RAM Total Disk size per host.
|
||||
#First line of code :09/10/2019
|
||||
#last update :11/10/2019
|
||||
#version :0.1
|
||||
#synatx example of hostfile :<hostname,contract code> contract code must be in uppercase and my contain numbers
|
||||
echo -e "\tMemory(RAM) Info\t"`free -mt| awk '/Mem/{print " \tTotal, " $2 }'`
|
||||
echo -e "\t,Total Processor,\t"`grep -c 'processor' /proc/cpuinfo`
|
||||
TOTAL_HDD_SIZE=$(df |grep "^/dev" |awk '{print $2}'|paste -sd+)
|
||||
SUM_HDD=$(echo $(($TOTAL_HDD_SIZE)) | awk '{ byte =$1 /1024**2 ; print byte}')
|
||||
echo -e "\t,Disks size,\t "$(echo $SUM_HDD)
|
Reference in New Issue
Block a user