Changeset 202

Show
Ignore:
Timestamp:
02/02/07 16:32:53 (2 years ago)
Author:
ludo
Message:

new processor added for the PXE inventory; bin/rotatelog used to rotate the logs (from r3986)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/admin/lrsd.c

    r175 r202  
    103103 
    104104        /* keep only the last 20 lines of the log */ 
    105         snprintf(buf, 1023, "mv -f %s %s.bak", path, path); 
    106         system(buf); 
    107         snprintf(buf, 1023, "tail -20 < %s.bak > %s", path, path); 
     105        snprintf(buf, 1023, "%s/bin/rotatelog %s", basedir, path); 
    108106        system(buf); 
    109107 
  • trunk/server/admin/perl/info

    r114 r202  
    187187        my @list=split(/[:,]/); 
    188188 
    189         if ($list[13] == '47') 
     189        # the current fields are extracted from cpuid level 1 
     190        # see http://www.sandpile.org/ia32/cpuid.htm 
     191        # family, model, stepping, brandid, cpuid level (4 bytes), cpu flags (4 bytes), vendorid (12 bytes) 
     192        if ($list[13] eq "47" && $list[20] eq "49") 
    190193        { 
    191194                print "CpuVendor=Intel\n"; 
     
    207210                    if (($list[2] eq 'a')) {print "Model=Pentium III Xeon\n";next;} 
    208211                    if (($list[2] eq 'b')) {print "Model=Pentium III 0.13u\n";next;} 
    209                     if (($list[2] eq 'd')) {print "Model=Pentium M 0.09u\n";next;} 
    210                     print "Model=Pentium Pro/II/III\n"; 
     212                    if (($list[2] eq 'd')) {print "Model=Pentium M 90nm 2MB cache\n";next;} 
     213                    if (($list[2] eq 'e')) {print "Model=Pentium Core Duo 65nm 2MB cache\n";next;} 
     214                    if (($list[2] eq 'f')) {print "Model=Pentium Core 2 Duo 65nm 4MB cache\n";next;} 
     215                    print "Model=Pentium Pro/II/III/M\n"; 
    211216                    next; 
    212217                  } 
     
    216221                    if ($list[2] == '1') {print "Model=Pentium 4 0.18u\n";next;} 
    217222                    if ($list[2] == '2') {print "Model=Pentium 4 0.13u\n";next;} 
    218                     if ($list[2] == '3') {print "Model=Pentium 4 0.09u\n";next;} 
    219                     if ($list[2] == '4') {print "Model=Pentium 4 0.09u\n";next;} 
     223                    if ($list[2] == '3') {print "Model=Pentium 4 90nm\n";next;} 
     224                    if ($list[2] == '4') {print "Model=Pentium 4 90nm\n";next;} 
     225                    if ($list[2] == '6') {print "Model=Pentium 4 65nm\n";next;} 
    220226                    print "Model=Pentium 4\n";next; 
    221227                } 
     
    223229                next; 
    224230        } 
    225         if ($list[13] == '41'
     231        if ($list[13] eq "41"
    226232        {        
    227233                print "CpuVendor=AMD\n"; 
     
    244250                next; 
    245251        } 
    246         if ($list[13] == '43'
     252        if ($list[13] eq "43"
    247253        {        
    248254                print "CpuVendor=Cyrix/Via\n"; 
     
    253259                } 
    254260                print "Model=???\n"; 
     261                next; 
     262        } 
     263        if ($list[13] eq "53") 
     264        {        
     265                print "CpuVendor=SiS\n"; 
     266                print "Model=SiS 55x\n"; 
     267                next; 
     268        } 
     269        if ($list[13] eq "47" && $list[15] eq "6f") 
     270        { 
     271                print "CpuVendor=Geode by NSC\n"; 
     272                print "Model=GX/LX\n"; 
     273                next; 
     274        } 
     275        if ($list[13] eq "47" && $list[20] eq "54") 
     276        { 
     277                print "CpuVendor=Transmeta\n"; 
     278                print "Model=Crusoe/Efficeon\n"; 
    255279                next; 
    256280        }