File: uname.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (163 lines) | stat: -rw-r--r-- 4,814 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
.\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" 2007-07-05 mtk: Added details on underlying system call interfaces
.\"
.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
.\"         all rights reserved.
.\" Translated Thu Jun 26 21:23:19 JST 1997
.\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
.\" Updated & Modified Thu Feb 14 21:53:41 JST 2002
.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
.\" Updated 2007-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
				    .\"
.TH UNAME 2 2007-07-05 "Linux" "Linux Programmer's Manual"
.SH ̾
uname \- ߲ƯΥͥˤĤƤ̾Ⱦ
.SH 
.B #include <sys/utsname.h>
.sp
.BI "int uname(struct utsname *" buf );
.SH 
.BR uname ()

.I buf
ǻؤ빽¤Τ˥ƥ֤
.I utsname
¤Τ
.I <sys/utsname.h>
ǰʲΤ褦Ƥ롣
.in +4n
.nf

struct utsname {
    char sysname[];
    char nodename[];
    char release[];
    char version[];
    char machine[];
#ifdef _GNU_SOURCE
    char domainname[];
#endif
};

.fi
.in
.I struct utsname
ˤĹϻꤵƤʤ
եɤ NULL Х ('\\0') ǽü롣
.SH ֤
 0 ֤롣Ԥ \-1 ֤ꡢ
.I errno
顼Ƥ˽äꤵ롣
.SH 顼
.TP
.B EFAULT
.I buf
ͭǤʤ
.SH 
SVr4, POSIX.1-2001.
4.3BSD ˤ
.BR uname ()
뤬ʤ
.PP
.I domainname
С (NIS ޤ YP ɥᥤ̾)  GNU γĥǤ롣
.SH 
ϥƥॳǤꡢOS ̾꡼Сʤɤ
֤ʬäƤ
ˤ줬ƯƤϡɥʬäƤ
äƹ¤Τ 4 ĤΥեɤˤϰ̣롣
\fInodename\fP եɤˤϰ̣ʤ:
ΥեɤϸߤΥޥ (Ƥʤ)
ɤΥͥåȥˤ̾Ϳ뤬
̾ޥʣΥͥåȥ°ʣ̾ġ
ˡͥϤΤ褦ʾΤѤʤΤǡ
ǤäƶƤʤФʤʤ
ɲåեɤǤ \fIdomainname\fP ˤĤƤƱͤǤ롣
.LP
Τ Linux Ǥϥƥॳ
.BR sethostname (2)

.BR setdomainname (2)
Ȥ롣
.RB  sethostname (2)
ꤵۥ̾ϡ
.BR uname ()
֤빽¤Τ \fInodename\fP եɤƱʸǤ
ȵꤷƤɸ൬ʤϤʤ
(ºݡ256 ХȤΥۥ̾ 8 ХȤΥΡ̾ĤƤ륷ƥ⤢)
Linux ǤƱʸ֤롣
.BR setdomainname (2)
 \fIdomainname\fP եɤˤĤƤƱȤΩġ
.LP
¤ΤΥեɤĹϤޤޤǤ롣
OS 饤֥ˤϡ
ϡɥɤ줿 9, 33, 65, 257 ʤɤͤȤäƤΤ⤢롣
ޤ
.BR SYS_NMLN ,
.BR _SYS_NMLN ,
.BR UTSLEN ,
.B _UTSNAME_LENGTH
ʤɤȤäƤ륷ƥ⤢롣
ϤääơȤΤϰͤǤꡢ
sizeof(...) Ȥ٤Ǥ롣
󥿡ͥåȥۥ̾ǻȤΰ뤿ˡ
257 Ф뤳Ȥ¿
.LP
utsname ξϡ
.BR sysctl ()

.IR /proc/sys/kernel/ { ostype ,
.IR hostname ,
.IR osrelease ,
.IR version ,
.IR domainname }
Ȥäƥ뤳ȤǤ롣
.SS ظΥͥ롦󥿥ե
.LP
֤ηвȤȤˡ
.I utsuname
¤ΤΥ礭ʤꡢαƶ
.BR uname ()
ˤ 3ĤΥС¸ߤ:
.IR sys_olduname ()
(åȤ
.IR __NR_oldolduname )
.IR sys_uname ()
(åȤ
.IR __NR_olduname )
.IR sys_newuname ()
(åȤ
.IR __NR_uname )
ǽΤΤϤ٤ƤΥեɤĹ 9 ȤäƤ
ΤΤĹ 65 ȤäƤ
ܤΤΤĹ 65 ȤäƤ뤬
\fIdomainname\fP եɤɲäƤ롣
glibc 
.BR uname ()
åѡؿϡξܺ٤򥢥ץꥱ󤫤鱣ä
ͥ뤬󶡤Ƥ륷ƥॳΤǿΥСư롣
.SH Ϣ
.BR uname (1),
.BR getdomainname (2),
.BR gethostname (2)