From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f4e933467220b0f2,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-11-04 02:14:09 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: saurabhbhatt@fastmail.fm (Saurabh Bhatt) Newsgroups: comp.unix.tru64 Subject: CPU load Date: 4 Nov 2003 02:14:09 -0800 Organization: http://groups.google.com Message-ID: <6d7d74c1.0311040214.10c6b139@posting.google.com> NNTP-Posting-Host: 194.133.58.60 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1067940849 31227 127.0.0.1 (4 Nov 2003 10:14:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Nov 2003 10:14:09 +0000 (UTC) Xref: archiver1.google.com comp.unix.tru64:10885 System - COMPAQ tru64 (ES45) with 4 CPUs Objective - To calculate the CPU utilisation of each CPU separately. Current Progress Level ====================== Using the table() system call with TBL_SYSINFO flag, I get certain value for CPU utilisation (after some calculation with usr/nice/idle etc). I assume that this is the net CPU utilization for all 4 CPUs. I also tried table() function with TBL_PROCESSOR_INFO flag, but it returns me a value greater than 100 for "load_avg" (in struct tbl_processor). Is my above assumption for net CPU utilisation correct? Please help me find out a system call for calculating utilisation of each individual CPU on my machine. Please do not respond with user commands such as iostat/sar/aux etc. because due to a system limitation we cannot execute these commands from C code using "system" or "popen".