cancel
Showing results for 
Search instead for 
Did you mean: 

uptime system call ??

SOLVED
Go to solution
Ali Humaidan
Occasional Advisor

uptime system call ??

How to find the uptime value from a tru64 unix server using a C program.

NOTE: without using shell commands I just want a pure system call.
4 REPLIES
Michael Schulte zur Sur
Honored Contributor
Solution

Re: uptime system call ??

Hi,

here is a small c programme, where you find, what you need.

greetings,

Michael
Ali Humaidan
Occasional Advisor

Re: uptime system call ??

Thanks for the help, it works, but I have just one little question. Why there is 3 values for load average, shouldn't it be only one ??
Ali Humaidan
Occasional Advisor

Re: uptime system call ??

and what is all this I hear about Mach factor ??
thank you in advance
Michael Schulte zur Sur
Honored Contributor

Re: uptime system call ??

Hi,

there are three because they are measured in 1min, 5min and 15min intervals.

mach is the name of a kernel architecture. I think, it represent a micro kernel, consisting of just the basic routines and where the rest communicates with message passing, compared to a kernel, which has more or less everything in one piece.

mach factor:
The Mach factor is the processing resource available to a new thread. The Mach factor is a variant of the load average, given for the same intervals; the closer its value to 0
(zero), the higher the load.

It is interesting, what you can find with a little research in the internet. ;-)

greetings,

Michael