There are plenty of tools that do that already. Also a number of users logged in on the system does not necessarily say anything about performance.
"In one word" - what does that mean?
On AIX with multiple CPUs and often SMT turned on, an average on CPU load does also not help that much.
To get a first impression I recommend running vmstat to see any bottlenecks.
It contains for CPU load an average for all CPUs on sys user idle and wait, as well shows you if it's paging in or out and also if it scans memory so it can free pages.
For top of process you might want to use topas which can also display the other stuff mentioned above.
Is this meant as an excercise in scripting or programming?
Please refrain from formatting your whole posts in bold letters. Also start using code tags please. If you don't know code tags, I can send you a PM where it is explained, so let me know.
What do you want to write, a shell script/perl etc. parsing output of commands I already mentioned or a C program?
On AIX memory usage/load in % is kind of useless.
---------- Post updated at 03:25 PM ---------- Previous update was at 03:22 PM ----------
Also please refrain from asking technical questions via PM - you got an infraction for this. Please read the forum rules carefully - it might help for further posting here, ty:
I, like many of the other replies, am not fully understanding what you are trying to do here. This data is available via existing tools.
But... if you are interested in rolling your own* you can write against the PerfStat API. Virtually all the performance stats on AIX come from this source. It is really easy to write against and the documentation on InfoCenter should be sufficient for anyone who can read/write C.
[* Insert disclaimer here: "Those who do not know of a Unix utility are destined to re-write it, badly."]
There is some sample source for the (netinterface portion of) LibPerfStat API here: