in reply to Aix "topas" command output redirection into a file
'top' command is used to get the list of latest CPU running processes . You can simply write:
system ("top >log"); [download]
You can then use sed to filter out unwanted characters if any.