WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Process ID

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

228 tGetData Failed


PDH Error -2147481645

Question:

When I execute my script to check if a process is activate or not i got the error 228 tGetData Failed on the line :
	percentproctime = tGetData("\Processeur(0)\%%Temps processeur",1)
	

Answer:

Maybe see if you can detect extended error information using the following code....
ErrorMode(@off)
	percentproctime = tGetData(timestr,1)
	ErrorMode(@off)
	if LastError== 228
	  err=tGetLastError()
	  message("Last error",err)
	  exit
	endif
Post any information about the 'last error'

User reply:

The error number returned is -2147481645.

Question:

The -2147481645 error indicates:

PDH_CSTATUS_ITEM_NOT_VALIDATED 0x800007D3 The data item has been added to the query but has not been validated nor accessed. No other status information on this data item is available.

This error seems to occur when attempting to open the query.

User reply:

Sorry, That was my mistake. The path to the counter was not good. I mispelled the workstation' name.

PDH Error -1073738819

Question:

tGetData is not working considantly. It works some time and not other getting a error every so often EXTENDER ERROR SUPPRESSED =>228 (228: tGetData function failed.) . Here is my trace file:
	********** ErrorMode: @OFF **********
	
	Errormode(@Off) 
	(32) VALUE INT => 1
	
	IntControl(73, 0, 0, 0, 0) 
	(32) VALUE STRING => "1"
	
	fltdaterstring = IniReadPvt("WMI Report", "Queue Length", "", wmiini) 
	(32) VALUE STRING => ""
	
	fltdat = tGetData(fltdaterstring, 0) 
	(32) VALUE INT => 0
	
	EXTENDER ERROR SUPPRESSED =>228 (228: tGetData function failed.)
	
	If LastError()== 228 
	(32) IF DO==>TRUE
	
	err = tGetLastError() 
	(32) VALUE INT => -1073738819
	
	errorlist = @TRUE 
	(32) VALUE INT => 1
	
	EndIf 
	(32) END OPERATOR
	
	********** ErrorMode: @CANCEL ********** 
	

Answer:

tGetdata error 228 with extended error -1073738819 [0xC0000BBD] (PDH_INVALID_ARGUMENT) A required argument is missing or incorrect.

According to what I see, you're passing a null value to tGetData, which is what was returned by the IniReadPvt, but tGetData expects a fully-qualified path of a performance counter.

	fltdaterstring = IniReadPvt("WMI Report", "Queue Length", "", wmiini) 
	(32) VALUE STRING => ""
	
	fltdat = tGetData(fltdaterstring, 0) 
	(32) VALUE INT => 0
	
IniReadPvt is returning a null value , then trying to pass that null string to tGetData.

You will need to handle the possiblity that the iniReadPvt is returning the 'default string', if the desired item is not found in the ini file.


Article ID:   W15857
File Created: 2017:07:28:13:58:38
Last Updated: 2008:06:09:08:57:19