System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

what does this means table (TBL_SYSINFO, 0, &tb1, sizeof(tb1)) ?

SOLVED
Go to solution
Ali Humaidan
Occasional Advisor

what does this means table (TBL_SYSINFO, 0, &tb1, sizeof(tb1)) ?

struct tbl_sysinfo tb1;
table(TBL_SYSINFO, 0, &tb1, sizeof(tb1))

what does the following values means:
- tb1.si_user
- tb1.si_system
- tb1.si_idle
- tb1.si_boottime

Q1) Are these values measured in seconds ???
Q2) Why don't they get reset when I reboot the server ??
3 REPLIES
Michael Schulte zur Sur
Honored Contributor

Re: what does this means table (TBL_SYSINFO, 0, &tb1, sizeof(tb1)) ?

Hi,

si_boottime is measured in seconds after
the Epoch (00:00:00 UTC, January 1, 1970) and can be converted by ctime() to readable form.

Have you looked into table.h? I assume, that the other values, if not reset, are also absolute values.

greetings,

Michael
Joris Denayer
Respected Contributor
Solution

Re: what does this means table (TBL_SYSINFO, 0, &tb1, sizeof(tb1)) ?

From the table() manpage
TBL_SYSINFO
The system time information table. The index must be zero (0) and
exactly one element can be requested. The system information table con-
tains ticks of time accumulated in the various system states: user,
nice, system, and idle. The system tick frequency and profiling (if
configured) frequency are also provided for conversion from ticks to
time values. This table is examine only. It cannot be updated.

A1) The ticks of time are cpu_ticks.
A2) ??????

Joris
To err is human, but to really faul things up requires a computer
Ali Humaidan
Occasional Advisor

Re: what does this means table (TBL_SYSINFO, 0, &tb1, sizeof(tb1)) ?

Thanks guys for all your replies

measurement are in ticks of seconds, and they does get reset except for si_boottime .. it never get resetted

by the way .. why not all of table paramteres are well documented .. and I have to look in table.h file for more options for table() ????