11-24-2010
Try psutil.process get_cpu_times which returns a tuple.
You can then get the sum of cpu speed x each element of the tuple. That gives you cycles. psutil does not return cpu speed AFAIK or so the docset says. You can read the /proc/cpuinfo "file" on linux to get that information.
10 More Discussions You Might Find Interesting
1. Programming
how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries
through a c program or java program
i want to store that data into database so i can show it graphically
thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
2. Programming
Please tell me solaris functions/api for getting following information
1- Function that tells how much memory used by current process
2- Function that tells how much memory used by all running processes
3- Function that tells how much CPU is used by current process
4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies
3. UNIX for Advanced & Expert Users
System FreeBSD.
Issue: I see that system idle = 0% in the same time top and other commands show that all process eat 0% of cpu.
System calls 98%
CPU states: 7.9% user, 0.0% nice, 91.8% system,<==!!!
But top does not show any process which eats more than 0%
Question: how can I see... (0 Replies)
Discussion started by: mirusnet
0 Replies
4. Programming
Hi all,
When I have a below while loop in my code (This observation is same for C and Perl)
i= 0;
while(1)
{
i++;
}
for above the CPU uses goes beyond 49% on hp-ux machine, why cpu usage increase at this level for just a simple while loop?
and if I have a single print statement... (2 Replies)
Discussion started by: zing_foru
2 Replies
5. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
6. Solaris
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies
7. Solaris
Hello Friends,
On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization.
=========================================================================
$ prstat -a
... (4 Replies)
Discussion started by: mahive
4 Replies
8. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
9. AIX
Hi Guys,
I am a newbie on the forum. This is my first post, so first of all I would like to introduce myself.
I am a SAS Analyst programmer working for an Health Insurance client. SAS is installed on a 16 CPU AIX Server with partitions running with shared processor. I have couple of... (2 Replies)
Discussion started by: saurabhiim2003
2 Replies
10. HP-UX
Hi Experts,
We encountered problem in one of the production system where some processes were taking higher CPU and after some time it came back to normal..
From system prespective, is there any way to check why processes took more cpu during that particular period. (16 Replies)
Discussion started by: sai_2507
16 Replies
LEARN ABOUT OPENSOLARIS
csx_parse_cistpl_date
csx_Parse_CISTPL_DATE(9F) Kernel Functions for Drivers csx_Parse_CISTPL_DATE(9F)
NAME
csx_Parse_CISTPL_DATE - parse the Card Initialization Date tuple
SYNOPSIS
#include <sys/pccard.h>
int32_t csx_Parse_CISTPL_DATE(client_handle_t ch, tuple_t *tu,
cistpl_date_t *cd);
INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI)
PARAMETERS
ch Client handle returned from csx_RegisterClient(9F).
tu Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F).
cd Pointer to a cistpl_date_t structure which contains the parsed CISTPL_DATE tuple information upon return from this function.
DESCRIPTION
This function parses the Card Initialization Date tuple, CISTPL_DATE, into a form usable by PC Card drivers.
The CISTPL_DATE tuple is an optional tuple. It indicates the date and time at which the card was formatted. Only one CISTPL_DATE tuple is
allowed per PC Card.
STRUCTURE MEMBERS
The structure members of cistpl_date_t are:
uint32_t time;
uint32_t day
The fields are defined as follows:
time This field indicates the time at which the PC Card was initialized.
day This field indicates the date the PC Card was initialized.
RETURN VALUES
CS_SUCCESS Successful operation.
CS_BAD_HANDLE Client handle is invalid.
CS_UNKNOWN_TUPLE Parser does not know how to parse tuple.
CS_NO_CARD No PC Card in socket.
CS_NO_CIS No Card Information Structure (CIS) on PC Card.
CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO
csx_GetFirstTuple(9F), csx_GetTupleData(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 20 Dec 1996 csx_Parse_CISTPL_DATE(9F)