cpuspeed.awk 753 Bytes
Newer Older
1
#!/usr/bin/awk -f
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
3
#
# EMULAB-COPYRIGHT
Mike Hibler's avatar
Mike Hibler committed
4
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
5
6
# All rights reserved.
#
7

8
/^cpu MHz.*(24[5-9][0-9]|25[0-4][0-9])\.[0-9]+$/ {
9
    print "2500";
10
    exit
11
}
12
13
14
15
16
/^cpu MHz.*(23[5-9][0-9]|24[0-4][0-9])\.[0-9]+$/ {
    print "2400";
    exit
}
/^cpu MHz.*(19[5-9][0-9]|20[0-4][0-9])\.[0-9]+$/ {
17
    print "2000";
18
    exit
19
}
20
/^cpu MHz.*(14[5-9][0-9]|15[0-4][0-9])\.[0-9]+$/ {
21
    print "1500";
22
    exit
23
}
24
25
/^cpu MHz.*8[0-9][0-9]\.[0-9]+$/ {
    print "850";
26
    exit
27
}
Mike Hibler's avatar
Mike Hibler committed
28
29
30
31
/^cpu MHz.*(72[0-9]|73[0-9])\.[0-9]+$/ {
    print "733";
    exit
}
32
33
/^cpu MHz.*6[0-9][0-9]\.[0-9]+$/ {
    print "600";
34
    exit
35
}
36
37
/^cpu MHz.*29[0-9]|30[0-9]\.[0-9]+$/ {
    print "300";
38
    exit
39
}
40
41
/^cpu MHz.*/ {
    print "0";
42
    exit
43
}