CPU usage event notification in C/C++? -


having hard time finding if there's system call receive notification when cpu usage reaches point? i'm looking call linux/bsd variants, if know windows version chime in know future reference.

something similar kqueue.

obviously check out /proc/cpuinfo or individual utimes periodically, hoping there system call me in more efficient way.

e.g. "let me know when average total cpu usage on last minute on 50%"

you can cpu usage information getrusage() , can use soft limits setrlimit() sigxcpu when exceed preset threshold (which can increase in signal handler).

more information: http://linux.about.com/library/cmd/blcmdl2_getrusage.htm


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -