Content added Content deleted
imported>mutante mNo edit summary |
imported>Took No edit summary |
||
Line 14: | Line 14: | ||
found on [[Geekpeitsche]] / [http://www.geekpeitsche.de/shell.html] |
found on [[Geekpeitsche]] / [http://www.geekpeitsche.de/shell.html] |
||
$ ./schwanzersatzfaktor.sh |
|||
(standard_in) 1: parse error |
|||
:-( |
|||
[[Category:Programming]] |
[[Category:Programming]] |
Revision as of 01:26, 5 March 2006
Schwanzersatzfaktor-Berechnung
Das folgende Shell-Script (by unbekannt) errechnet den Schwanzersatz-Faktor eines Linux-Rechners:
#!/bin/sh LC_ALL=C echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; \ cat /proc/cpuinfo|grep MHz|awk '{print $4"/30 +";}'; free|grep '^Mem' \ |awk '{print $3"/1024/3+"}'; df -P -k -x nfs | grep -v 1k \ | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END \ {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/'
found on Geekpeitsche / [1]
$ ./schwanzersatzfaktor.sh (standard_in) 1: parse error :-(