Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tru64: looking for load average data from "C"

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, guys.

1 question.
Does anybody get "C"-source to "uptime" for Tru64 5.1?

In other word, I wanna get some performance info 'bout load average from "/dev/kmem" structures for monitoring purposes by calling this from "C".

Will somebody be so kind and help me?
Thanks.

Vlado
 
Vlado,

I usually (always actually) get this kind of information by running the utility itself and reading the data it supplies.

This has a couple of advantages:

1 - It's easy.

2 - It will work in the next version of whatever UNIX you are using.

Is there some particular reason you need to get the information directly from the kernel?
Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Hi Mike,

I agree. Because of possible changes in kernel from version to version and cross-unix portability of the program it will be better not to include "proprietary" functions in source code but to call something like "system" function and then utility output filter from file as it is needed.

Thank you for your help.
Have a nice day.

Vlado
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top