Jump to content
Sign in to follow this  

AutoIt + typeperf

Recommended Posts


Hello all.

Im trying to create a script that runs on the logon script of the network computers and logs some computer performance data.

Im using windows XP typeperf command.

The script creates a folder with the computer name in a network share, and then creates the log file there. also with the computer name and a serial number.

Heres the code:

$num = 0
$name = @ComputerName & "_perfmon_" & $num & ".csv"
$path = "\\\VOLXX\Usuarios\Publico\PerfLogs\" & @ComputerName

Local $pid = RunWait(@ComSpec & ' /c md ' & $path, "",@SW_HIDE)
$pathfull = $path & "\" & $name

$var = FileExists($pathfull)

While $var = 1
    $num += 1
    $name = @ComputerName & "_perfmon_" & $num & ".csv"
    $pathfull = $path & "\" & $name
    $var = FileExists($pathfull)

Local $pid = RunWait(@ComSpec & ' /c typeperf "\DiscoFísico(_Total)\E/S divididas por seg." "\Interfaz de red(*)\Total de bytes/s." "\Memoria\MBytes disponibles" "\Procesador(_Total)\% de tiempo de procesador" -si 10 -o "' & $pathfull & '"', "",@SW_HIDE)

It works great in my computer, problem is, ONLY in my computer.

In ALL other PCs it creates the folder and even create the .csv log file, with the proper header of the typeperf command, but after that NO data is logged. (it should write a line every 10 seconds.)

So im ruling out permission problems, cause it can create the file and even write in it. It has to be something with the typeperf command, dunno what.

any ideas??


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this