UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2008-08-13 10:22 AM

thinking
Member
Registered: 2005-09-15
Posts: 103

Re: get cpu usage for a process?

Offline

#2 2008-08-13 11:21 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: get cpu usage for a process?

I think the HZ constant is fixed to 100 for jiffies shown to userspace, even if the
kernel uses a higher value internally.

Ever looked at getrusage()?

Offline

#3 2008-08-13 02:16 PM

thinking
Member
Registered: 2005-09-15
Posts: 103

Re: get cpu usage for a process?

damn, i use such functions too rarely to know they exist ^^
ill use getrusage for my problem

thx for ur hint

Offline

Board footer

Powered by FluxBB