Update BonjourGrid archive, Upgrade BonjourGrid-Client
[slapos.git] / software / bonjourgrid-client / templates / machineinfo.worker.sh.in
1 #!/bin/sh
2
3 # This script generates a file (with the name `hostname`) of the characteristics of the machine
4 Mhz=`grep -i Mhz /proc/cpuinfo | cut -d : -f2 | head -1 | cut -f2 -d " "`
5 mem=`grep -i MemTotal /proc/meminfo | cut -f2 -d :`
6 Ram=`echo $mem | cut -f1 -d " "`
7 Cpu=`uname -a | cut -f3 -d " "`
8 H=`hostname`
9 Nbproc=`grep processor /proc/cpuinfo |wc -l`
10 Ip=${:ip_address}
11
12 c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\"}"
13 filename=`hostname`
14 echo $c > $filename