File: adjtimex.2

package info (click to toggle)
manpages-de 0.7-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,188 kB
  • ctags: 9
  • sloc: makefile: 83; perl: 61
file content (138 lines) | stat: -rw-r--r-- 4,167 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
.\" USA.
.\"
.\" Translated to German Sun Oct 06 13:00:00 1996 by Patrick Rother <krd@gulu.net>
.\"
.TH ADJTIMEX 2 "6. Oktober 1996" "Linux 1.2.4" "Systemaufrufe"
.SH NAME
adjtimex \- Einstellen der Kerneluhr
.SH ÜBERSICHT
.B #include <sys/timex.h>
.sp
.BI "int adjtimex(struct timex *" "buf" ");"
.SH BESCHREIBUNG
Linux verwendet David Mills Algorithmus zur Justierung der Systemuhr.
.B adjtimex
liest und setzt auf Wunsch Einstellungsparameter für diesen Algorithmus.
.PP
.B adjtimex
nimmt einen Zeiger auf eine Struktur
.IR timex ,
aktualisiert Kernelparameter aus den Feldwerten, und gibt die gleiche Struktur
mit aktuellen Werten zurück.
Diese Struktur ist wie folgt deklariert:
.PP
.RS
.nf
struct timex
{
    int mode;            /* mode selector */
    long offset;         /* Zeitoffset (usek) */
    long frequency;      /* Frequenzoffset (skalierte ppm) */
    long maxerror;       /* maximaler Fehler (usek) */
    long esterror;       /* geschätzter Fehler (usek) */
    int status;          /* Uhrkommando/-status */
    long time_constant;  /* pll Zeitkonstante */
    long precision;      /* Uhrpräzision (usec) (nur lesbar) */
    long tolerance;      /* Uhrfrequenztoleranz (ppm) (nur lesbar) */
    struct timeval time; /* (nur lesbar) */
    long tick;           /* usek zwischen Uhrticks */
};
.fi
.RE
.PP
Das Feld
.I mode
bestimmt, welche Parameter, falls vorhanden, zu setzen sind.
Es darf eine bitweise
.IR Oder verknüpfung
von Null oder mehr der folgenden Bits enthalten:
.PP
.RS
.nf
#define ADJ_OFFSET            0x0001 /* Zeitoffset */
#define ADJ_FREQUENCY         0x0002 /* Frequenzoffset */
#define ADJ_MAXERROR          0x0004 /* maximaler Zeitfehler */
#define ADJ_ESTERROR          0x0008 /* geschätzter Zeitfehler */
#define ADJ_STATUS            0x0010 /* Uhrstatus */
#define ADJ_TIMECONST         0x0020 /* pll Zeitkonstante */
#define ADJ_TICK              0x4000 /* Tickwert */
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* altmodisches adjtime */
.fi
.RE
.PP
Gewöhnliche Benutzer sind eingeschränkt auf einen Nullwert für
.IR mode .
Nur der Superuser darf Parameter setzen.
.br
.ne 12v
.SH "RÜCKGABEWERT"
Bei Erfolg gibt
.B adjtimex
den Wert von
.IR buf.status
zurück:
.PP
.RS
.nf
#define TIME_OK  0 /* Uhr synchronisiert */
#define TIME_INS 1 /* füge Schaltsekunde ein */
#define TIME_DEL 2 /* lösche Schaltsekunde */
#define TIME_OOP 3 /* Schaltsekunde in Betrieb */
#define TIME_BAD 4 /* Uhr nicht synchronisiert */
.fi
.RE
.PP
Im Fehlerfall gibt
.B adjtimex
\-1 zurück und setzt
.IR errno .
.SH FEHLER
.TP
.B EFAULT
.I buf
zeigt nicht auf beschreibbaren Speicher.
.TP
.B EPERM
.I buf.mode
ist nicht Null und der Benutzer ist nicht der Superuser.
.TP
.B EINVAL
Ein Versuch wurde unternommen
.I buf.offset
zu setzen auf einen Wert außerhalb des Bereichs von \-131071 bis +131071,
oder
.I buf.status
auf einen Wert zu setzen, der nicht oben aufgeführt ist,
oder
.I buf.tick
auf einen Wert außerhalb des Bereichs von
.RB 900000/ HZ
bis 
.RB 1100000/ HZ
zu setzen, wobei
.B HZ
die Systemtimerinterupfrequenz ist.
.SH "SIEHE AUCH"
.BR settimeofday (2).