Originally posted by: higby
You could imbed 'ps auxw' in a script that runs every few minutes. The script would simply select the line that contains your process and, within that, pick out the 3rd column (CPU%). If you know the pid, it's easy with awk:
-
assume you pid is 962656
cpu_pct=$(ps auxw|awk ' ($2 == 962656) {print $3}')
echo $cpu_pct >> fileout
Then upload fileout to Windows and graph it.
If your script doesn't know the pid, you would have to be able to identify the line associated with the process by either looking at the 'COMMAND' column and/or the STIME (start time) and/or the USER column. Hopefully your script could then grep out or awk out the one process line you need somehow.
#AIX-Forum