The perform commands returns the output in terms of key value pair. We could make use of the array variable to check whether the command was successful or not. Please see the below example for your reference, % array set status [stc::perform loadfromxml -filename D:/dummy.xml] % parray status status(-Active) = true status(-Config) = system1 status(-ElapsedTime) = 259 status(-EndTime) = 1399991343.95582 status(-FileName) = D:/dummy.xml status(-InputConfigString) = 0 status(-Name) = LoadFromXmlCommand 27 status(-ParentConfig) = status(-ProgressCancelled) = false status(-ProgressCurrentStep) = 1 status(-ProgressCurrentStepName) = status(-ProgressCurrentValue) = 0 status(-ProgressDisplayCounter) = true status(-ProgressMaxValue) = 0 status(-ProgressStepsCount) = 1 status(-StartTime) = 1399991343.69681 status(-State) = COMPLETED status(-Status) = status(-TargetConfig) = status(-UseDefaultName) = false % % % puts $status(-State) COMPLETED If these command causes any error then it would return the appropriate error messages. Note: The status returned here would indicate the status on the command and nothing else. For example, when we use stc::perform dhcpv4startserver command, it would return the status as completed (i.e., the action is performed) but it doesn’t indicate that the server is already up or not, for this we may need to go to respective emulated device and retrieve the status.