Needing to run an array in parallel does anyone know how i can get this done?
cpumodel[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i -E -m1 "model name" | sed 's&model name:&&Ig' | sed 's&(r)&&Ig'| sed 's&@.*&&Ig' | xargs );\
totalcores[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i "core(s)\|socket(s)" | sed 's&core.*:&&gI' | sed 's&socket.*:&&gI' | sed 's& &&gI' | xargs | awk '{print $1*$2}' | xargs );\
cpuuseallcores[$i]=$(ssh ${server[i]} -p ${sshport[i]} mpstat -P ALL | awk '{print "<td><font color=orange>"$6"</font color>""<font color=teal>%</font color></td>"}' | tail +4 | sed '1~4 s&^&<tr align=left>&gI' | sed '0~4 s&$&</tr>&gI' | sed '$s&$&</tr>&' | xargs );\
corespersocket[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i "core(s) per socket" | awk '{print $4}'|xargs);\
threadpercore[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i "thread(s) per core" | awk '{print $4}' | xargs);\
cpumhz[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i -E -m1 "max mhz" | sed 's&CPU max MHz:&&Ig' | sed 's&.0000&&Ig' | awk '{print "<font color=orange>"$1"</font color>""<font color=teal>MHz</font color>"}'| xargs );\
cpusockets[$i]=$(ssh ${server[i]} -p ${sshport[i]} lscpu | grep -i "socket(s)" | awk '{print $2}'| xargs);\
cpu1temp[$i]=$(ssh ${server[i]} -p ${sshport[i]} sensors | grep -i "package id 0" | awk '{print $4}' | sed 's&+&&gI' | xargs);\
cpu2temp[$i]=$(ssh ${server[i]} -p ${sshport[i]} sensors | grep -i "package id 1" | awk '{print $4}' | sed 's&+&&gI' | xargs);\
subnet[$i]=$(ssh ${server[i]} -p ${sshport[i]} hostname -I | sed 's& &\n&' | grep -v "${wanip[i]}" | awk -F'.' -vOFS='.' '{$NF=0}1;'| xargs );\
totalcpuusage[$i]=$(ssh ${server[i]} -p ${sshport[i]} grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}'| xargs );\
ramtotal[$i]=$(ssh ${server[i]} -p ${sshport[i]} free --giga -h |grep -i -v "swap" | grep -i "g" | awk '{print $2"B"}' | xargs );\
ramused[$i]=$(ssh ${server[i]} -p ${sshport[i]} free --giga -h |grep -i -v "swap" | grep -i "g" | awk '{print $3"B"}' | xargs );\
ramascache[$i]=$(ssh ${server[i]} -p ${sshport[i]} free --giga -h |grep -i -v "swap" | grep -i "g" | awk '{print $6"B"}' | xargs );\
ramfree[$i]=$(ssh ${server[i]} -p ${sshport[i]} free --giga -h | grep -i -v "swap" | grep -i "g" | awk '{print $4"B"}' | xargs );\
zfsarcram[$i]=$(ssh ${server[i]} -p ${sshport[i]} arc_summary | grep -i "arc size" | awk '{print "<font color=orange>"$6"</font color><font color=teal>"$7"</font color>"}' | xargs );\
zfsarchit[$i]=$(ssh ${server[i]} -p ${sshport[i]} arc_summary | grep -i "cache hit ratio" | awk '{print "<font color=orange>"$4"</font color><font color=teal>"$5"</font color>"}' | xargs );\
|