Shopping cart    |      
Results 1 to 6 of 6

Thread: SETCOMPUTERNAME variable

  1. #1
    Join Date
    May 2008
    Posts
    10

    Default SETCOMPUTERNAME variable

    Is there a way to use the SETCOMPUTERNAME to pull the name from the computer or something else that is unique to the computer? It would be nice to be able to create just one script and have it run and not have to worry about going back and renaming the files that it exports.

  2. #2
    Join Date
    Feb 2004
    Posts
    742

    Default

    Log file name prefixes using an environment variable, %COMPUTERNAME%, %USERNAME%, %OS%, %PROCESSOR_ARCHITECTURE% are supported. So, if for example you wanted to prefix log files with a computer’s name, just enter the following in Preferences->Logging, Prefix,
    %COMPUTERNAME%_

    If you want to change the COMPUTERNAME, you could set the %COMPUTERNAME% environment variable for example in a batch file, that also starts BurnInTest:
    eg.
    SET COMPUTERNAME=abc123
    c:
    cd "\Program Files\BurnInTest"
    bit.exe -r -p

    Regards,
    Ian

  3. #3
    Join Date
    May 2008
    Posts
    10

    Default Performance Test 6.1

    I'm running Performance test 6.1 not Burn-in. Below is the script I'm running. I'm wanting to know if the first line SETCOMPUTERNAME can use a variable so that it pick up the real name of the computer and not just what I put in there like "My Test Machine" I tried to use "%COMPUTERNAME%" but it only put in what was in the quotes. I'm wanting it to pick up the name of the computer. Is that possible?


    SETCOMPUTERNAME "My Test Machine"
    SETDURATION 20
    RUN CPU_ALL
    RUN ME_ALL
    RUN DI_ALL

    EXPORTHTML "C:\baseline\results.html"
    EXPORTCSV "C:\baseline\results.csv"
    EXPORTTEXTF "C:\baseline\resultsF.txt"

  4. #4
    Join Date
    Feb 2004
    Posts
    742

    Default

    Sorry, my mind was clearly thinking BurnInTest when I answered this.

    No, the PerformanceTest 6.1 SETCOMPUTERNAME can only have fixed values. We are thinking of adding dynamic log names in the next major release of PerformanceTest.

    Regards,
    Ian

  5. #5
    Join Date
    Aug 2009
    Posts
    1

    Default Workaround

    For a workaround try this:

    set FileName=E:\PerformanceTest\bench.pts

    If Exist %FileName% del %FileName%

    echo SETCOMPUTERNAME "%computername%" >> %FileName%
    echo SUPPRESSWARNINGS ON >> %FileName%
    echo SETDISK "C:" >> %FileName%
    echo SETPCPUTESTPROCESSES 5 >> %FileName%
    echo RUN CPU_ALL >> %FileName%
    echo RUN G2D_ALL >> %FileName%
    echo RUN ME_ALL >> %Filename%
    echo RUN DI_ALL >> %Filename%
    echo EXPORTCSV "<export location>" >> %Filename%
    E:\PerformanceTest\pt.exe /s bench.pts

    It dynamically rebuilds the script that runs to insert the computername. Works great for me, hope this helps.

  6. #6
    Join Date
    Feb 2004
    Posts
    742

    Default

    Thanks for the feedback.
    Regards,
    Ian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •