Use custom environment variables for CPU information
This commit is contained in:
parent
2a582a23f3
commit
9c12e3d800
1 changed files with 2 additions and 2 deletions
4
agent.sh
4
agent.sh
|
@ -99,8 +99,8 @@ i*86)
|
|||
esac
|
||||
|
||||
# CPU details
|
||||
cpu_name=$(prep "$(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }')")
|
||||
cpu_cores=$(prep "$(($(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }' | sed -e :a -e '$!N;s/\n/\|/;ta' | tr -cd \| | wc -c)+1))")
|
||||
cpu_name=$(env | grep CPU_NAME | grep -oe '[^=]*$');
|
||||
cpu_cores=$(env | grep CPU_CORE | grep -oe '[^=]*$');
|
||||
|
||||
if [ -z "$cpu_name" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue