File: System-Information.html

package info (click to toggle)
octave 3.8.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 84,396 kB
  • ctags: 45,547
  • sloc: cpp: 293,356; ansic: 42,041; fortran: 23,669; sh: 13,629; objc: 7,890; yacc: 7,093; lex: 3,442; java: 2,125; makefile: 1,589; perl: 1,009; awk: 974; xml: 34
file content (457 lines) | stat: -rw-r--r-- 17,452 bytes parent folder | download | duplicates (3)
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Octave: System Information</title>

<meta name="description" content="GNU Octave: System Information">
<meta name="keywords" content="GNU Octave: System Information">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="System-Utilities.html#System-Utilities" rel="up" title="System Utilities">
<link href="Hashing-Functions.html#Hashing-Functions" rel="next" title="Hashing Functions">
<link href="Group-Database-Functions.html#Group-Database-Functions" rel="prev" title="Group Database Functions">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="System-Information"></a>
<div class="header">
<p>
Next: <a href="Hashing-Functions.html#Hashing-Functions" accesskey="n" rel="next">Hashing Functions</a>, Previous: <a href="Group-Database-Functions.html#Group-Database-Functions" accesskey="p" rel="prev">Group Database Functions</a>, Up: <a href="System-Utilities.html#System-Utilities" accesskey="u" rel="up">System Utilities</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="System-Information-1"></a>
<h3 class="section">36.11 System Information</h3>

<a name="XREFcomputer"></a><dl>
<dt><a name="index-computer"></a>Function File: <em>[<var>c</var>, <var>maxsize</var>, <var>endian</var>] =</em> <strong>computer</strong> <em>()</em></dt>
<dt><a name="index-computer-1"></a>Function File: <em><var>arch</var> =</em> <strong>computer</strong> <em>(&quot;arch&quot;)</em></dt>
<dd><p>Print or return a string of the form <var>cpu</var>-<var>vendor</var>-<var>os</var>
that identifies the kind of computer Octave is running on.  If invoked
with an output argument, the value is returned instead of printed.  For
example:
</p>
<div class="example">
<pre class="example">computer ()
   -| i586-pc-linux-gnu

x = computer ()
   &rArr; x = &quot;i586-pc-linux-gnu&quot;
</pre></div>

<p>If two output arguments are requested, also return the maximum number
of elements for an array.
</p>
<p>If three output arguments are requested, also return the byte order
of the current system as a character (<code>&quot;B&quot;</code> for big-endian or
<code>&quot;L&quot;</code> for little-endian).
</p>
<p>If the argument <code>&quot;arch&quot;</code> is specified, return a string
indicating the architecture of the computer on which Octave is
running.
</p></dd></dl>


<a name="XREFuname"></a><dl>
<dt><a name="index-uname"></a>Built-in Function: <em>[<var>uts</var>, <var>err</var>, <var>msg</var>] =</em> <strong>uname</strong> <em>()</em></dt>
<dd><p>Return system information in the structure.  For example:
</p>
<div class="example">
<pre class="example">uname ()
   &rArr; {
         sysname = x86_64
         nodename = segfault
         release = 2.6.15-1-amd64-k8-smp
         version = Linux
         machine = #2 SMP Thu Feb 23 04:57:49 UTC 2006
      }
</pre></div>

<p>If successful, <var>err</var> is 0 and <var>msg</var> is an empty string.
Otherwise, <var>err</var> is nonzero and <var>msg</var> contains a
system-dependent error message.
</p></dd></dl>


<a name="XREFnproc"></a><dl>
<dt><a name="index-nproc"></a>Built-in Function: <em></em> <strong>nproc</strong> <em>()</em></dt>
<dt><a name="index-nproc-1"></a>Built-in Function: <em></em> <strong>nproc</strong> <em>(<var>query</var>)</em></dt>
<dd><p>Return the current number of available processors.
</p>
<p>If called with the optional argument <var>query</var>, modify how processors
are counted as follows:
</p>
<dl compact="compact">
<dt><code>all</code></dt>
<dd><p>total number of processors.
</p>
</dd>
<dt><code>current</code></dt>
<dd><p>processors available to the current process.
</p>
</dd>
<dt><code>overridable</code></dt>
<dd><p>likewise, but overridable through the <code><span class="nolinebreak">OMP_NUM_THREADS</span></code><!-- /@w --> environment
variable.
</p></dd>
</dl>
</dd></dl>


<a name="XREFispc"></a><dl>
<dt><a name="index-ispc"></a>Function File: <em></em> <strong>ispc</strong> <em>()</em></dt>
<dd><p>Return true if Octave is running on a Windows system and false otherwise.
</p>
<p><strong>See also:</strong> <a href="#XREFisunix">isunix</a>, <a href="#XREFismac">ismac</a>.
</p></dd></dl>


<a name="XREFisunix"></a><dl>
<dt><a name="index-isunix"></a>Function File: <em></em> <strong>isunix</strong> <em>()</em></dt>
<dd><p>Return true if Octave is running on a Unix-like system and false otherwise.
</p>
<p><strong>See also:</strong> <a href="#XREFismac">ismac</a>, <a href="#XREFispc">ispc</a>.
</p></dd></dl>


<a name="XREFismac"></a><dl>
<dt><a name="index-ismac"></a>Function File: <em></em> <strong>ismac</strong> <em>()</em></dt>
<dd><p>Return true if Octave is running on a Mac OS X system and false otherwise.
</p>
<p><strong>See also:</strong> <a href="#XREFisunix">isunix</a>, <a href="#XREFispc">ispc</a>.
</p></dd></dl>


<a name="XREFisieee"></a><dl>
<dt><a name="index-isieee"></a>Built-in Function: <em></em> <strong>isieee</strong> <em>()</em></dt>
<dd><p>Return true if your computer <em>claims</em> to conform to the IEEE standard
for floating point calculations.  No actual tests are performed.
</p></dd></dl>


<a name="XREFisdeployed"></a><dl>
<dt><a name="index-isdeployed"></a>Function File: <em></em> <strong>isdeployed</strong> <em>()</em></dt>
<dd><p>Return true if the current program has been compiled and is running
separately from the Octave interpreter and false if it is running in
the Octave interpreter.  Currently, this function always returns
false in Octave.
</p></dd></dl>


<a name="XREFOCTAVE_005fHOME"></a><dl>
<dt><a name="index-OCTAVE_005fHOME"></a>Built-in Function: <em></em> <strong>OCTAVE_HOME</strong> <em>()</em></dt>
<dd><p>Return the name of the top-level Octave installation directory.
</p>

<p><strong>See also:</strong> <a href="Controlling-Subprocesses.html#XREFEXEC_005fPATH">EXEC_PATH</a>, <a href="Loading-and-Saving-Images.html#XREFIMAGE_005fPATH">IMAGE_PATH</a>.
</p></dd></dl>


<a name="XREFmatlabroot"></a><dl>
<dt><a name="index-matlabroot"></a>Function File: <em></em> <strong>matlabroot</strong> <em>()</em></dt>
<dd><p>Return the name of the top-level Octave installation directory.
</p>
<p>This is an alias for the function <code><span class="nolinebreak">OCTAVE_HOME</span></code><!-- /@w --> provided
for compatibility.
</p>
<p><strong>See also:</strong> <a href="#XREFOCTAVE_005fHOME">OCTAVE_HOME</a>.
</p></dd></dl>


<a name="XREFOCTAVE_005fVERSION"></a><dl>
<dt><a name="index-OCTAVE_005fVERSION"></a>Built-in Function: <em></em> <strong>OCTAVE_VERSION</strong> <em>()</em></dt>
<dd><p>Return the version number of Octave, as a string.
</p></dd></dl>


<a name="XREFversion"></a><dl>
<dt><a name="index-version"></a>Function File: <em></em> <strong>version</strong> <em>()</em></dt>
<dd><p>Return the version number of Octave, as a string.
</p>
<p>This is an alias for the function <code><span class="nolinebreak">OCTAVE_VERSION</span></code><!-- /@w --> provided for
compatibility.
</p>
<p><strong>See also:</strong> <a href="#XREFOCTAVE_005fVERSION">OCTAVE_VERSION</a>.
</p></dd></dl>


<a name="XREFver"></a><dl>
<dt><a name="index-ver"></a>Function File: <em></em> <strong>ver</strong> <em>()</em></dt>
<dt><a name="index-ver-1"></a>Function File: <em>v =</em> <strong>ver</strong> <em>()</em></dt>
<dt><a name="index-ver-2"></a>Function File: <em>v =</em> <strong>ver</strong> <em>(&quot;Octave&quot;)</em></dt>
<dt><a name="index-ver-3"></a>Function File: <em>v =</em> <strong>ver</strong> <em>(<var>package</var>)</em></dt>
<dd>
<p>Display a header containing the current Octave version number, license
string, and operating system followed by a list of installed packages,
versions, and installation directories.
</p>
<p><code>v = ver ()</code>
</p>
<p>Return a vector of structures describing Octave and each installed package.
The structure includes the following fields.
</p>
<dl compact="compact">
<dt><code>Name</code></dt>
<dd><p>Package name.
</p>
</dd>
<dt><code>Version</code></dt>
<dd><p>Version of the package.
</p>
</dd>
<dt><code>Revision</code></dt>
<dd><p>Revision of the package.
</p>
</dd>
<dt><code>Date</code></dt>
<dd><p>Date of the version/revision.
</p></dd>
</dl>

<p><code>v = ver (&quot;Octave&quot;)</code>
</p>
<p>Return version information for Octave only.
</p>
<p><code>v = ver (<var>package</var>)</code>
</p>
<p>Return version information for <var>package</var>.
</p>

<p><strong>See also:</strong> <a href="#XREFversion">version</a>, <a href="#XREFoctave_005fconfig_005finfo">octave_config_info</a>.
</p></dd></dl>


<a name="XREFcompare_005fversions"></a><dl>
<dt><a name="index-compare_005fversions"></a>Function File: <em></em> <strong>compare_versions</strong> <em>(<var>v1</var>, <var>v2</var>, <var>operator</var>)</em></dt>
<dd><p>Compare two version strings using the given <var>operator</var>.
</p>
<p>This function assumes that versions <var>v1</var> and <var>v2</var> are
arbitrarily long strings made of numeric and period characters
possibly followed by an arbitrary string (e.g., <code>&quot;1.2.3&quot;</code>,
<code>&quot;0.3&quot;</code>, <code>&quot;0.1.2+&quot;</code>, or <code>&quot;1.2.3.4-test1&quot;</code>).
</p>
<p>The version is first split into numeric and character portions
and then the parts are padded to be the same length (i.e., <code>&quot;1.1&quot;</code>
would be padded to be <code>&quot;1.1.0&quot;</code> when being compared with
<code>&quot;1.1.1&quot;</code>, and separately, the character parts of the strings are
padded with nulls).
</p>
<p>The operator can be any logical operator from the set
</p>
<ul>
<li> <code>&quot;==&quot;</code>
equal

</li><li> <code>&quot;&lt;&quot;</code>
less than

</li><li> <code>&quot;&lt;=&quot;</code>
less than or equal to

</li><li> <code>&quot;&gt;&quot;</code>
greater than

</li><li> <code>&quot;&gt;=&quot;</code>
greater than or equal to

</li><li> <code>&quot;!=&quot;</code>
not equal

</li><li> <code>&quot;~=&quot;</code>
not equal
</li></ul>

<p>Note that version <code>&quot;1.1-test2&quot;</code> will compare as greater than
<code>&quot;1.1-test10&quot;</code>.  Also, since the numeric part is compared first,
<code>&quot;a&quot;</code> compares less than <code>&quot;1a&quot;</code> because the second string
starts with a numeric part even though <code>double (&quot;a&quot;)</code> is greater than
<code>double (&quot;1&quot;).</code>
</p></dd></dl>


<a name="XREFlicense"></a><dl>
<dt><a name="index-license"></a>Command: <em></em> <strong>license</strong></dt>
<dt><a name="index-license-1"></a>Function File: <em></em> <strong>license</strong> <em>(&quot;inuse&quot;)</em></dt>
<dt><a name="index-license-2"></a>Function File: <em><var>retval</var> =</em> <strong>license</strong> <em>(&quot;inuse&quot;)</em></dt>
<dt><a name="index-license-3"></a>Function File: <em><var>retval</var> =</em> <strong>license</strong> <em>(&quot;test&quot;, <var>feature</var>)</em></dt>
<dt><a name="index-license-4"></a>Function File: <em></em> <strong>license</strong> <em>(&quot;test&quot;, <var>feature</var>, <var>toggle</var>)</em></dt>
<dt><a name="index-license-5"></a>Function File: <em><var>retval</var> =</em> <strong>license</strong> <em>(&quot;checkout&quot;, <var>feature</var>)</em></dt>
<dd>
<p>Display the license of Octave.
</p>
<p><code>license (&quot;inuse&quot;)</code>
</p>
<p>Display a list of packages currently being used.
</p>
<p><code><var>retval</var> = license (&quot;inuse&quot;)</code>
</p>
<p>Return a structure containing the fields <code>feature</code> and <code>user</code>.
</p>
<p><code><var>retval</var> = license (&quot;test&quot;, <var>feature</var>)</code>
</p>
<p>Return 1 if a license exists for the product identified by the string
<var>feature</var> and 0 otherwise.  The argument <var>feature</var> is case
insensitive and only the first 27 characters are checked.
</p>
<p><code>license (&quot;test&quot;, <var>feature</var>, <var>toggle</var>)</code>
</p>
<p>Enable or disable license testing for <var>feature</var>, depending on
<var>toggle</var>, which may be one of:
</p>
<dl compact="compact">
<dt><code>&quot;enable&quot;</code></dt>
<dd><p>Future tests for the specified license of <var>feature</var> are conducted
as usual.
</p>
</dd>
<dt><code>&quot;disable&quot;</code></dt>
<dd><p>Future tests for the specified license of <var>feature</var> return 0.
</p></dd>
</dl>

<p><code><var>retval</var> = license (&quot;checkout&quot;, <var>feature</var>)</code>
</p>
<p>Check out a license for <var>feature</var>, returning 1 on success and 0
on failure.
</p>
<p>This function is provided for compatibility with <small>MATLAB</small>.
</p>
<p><strong>See also:</strong> <a href="#XREFver">ver</a>, <a href="#XREFversion">version</a>.
</p></dd></dl>


<a name="XREFoctave_005fconfig_005finfo"></a><dl>
<dt><a name="index-octave_005fconfig_005finfo"></a>Built-in Function: <em></em> <strong>octave_config_info</strong> <em>()</em></dt>
<dt><a name="index-octave_005fconfig_005finfo-1"></a>Built-in Function: <em></em> <strong>octave_config_info</strong> <em>(<var>option</var>)</em></dt>
<dd><p>Return a structure containing configuration and installation
information for Octave.
</p>
<p>If <var>option</var> is a string, return the configuration information for the
specified option.
</p>
</dd></dl>


<a name="XREFgetrusage"></a><dl>
<dt><a name="index-getrusage"></a>Built-in Function: <em></em> <strong>getrusage</strong> <em>()</em></dt>
<dd><p>Return a structure containing a number of statistics about the current
Octave process.  Not all fields are available on all systems.  If it is
not possible to get CPU time statistics, the CPU time slots are set to
zero.  Other missing data are replaced by NaN.  The list of possible
fields is:
</p>
<dl compact="compact">
<dt><code>idrss</code></dt>
<dd><p>Unshared data size.
</p>
</dd>
<dt><code>inblock</code></dt>
<dd><p>Number of block input operations.
</p>
</dd>
<dt><code>isrss</code></dt>
<dd><p>Unshared stack size.
</p>
</dd>
<dt><code>ixrss</code></dt>
<dd><p>Shared memory size.
</p>
</dd>
<dt><code>majflt</code></dt>
<dd><p>Number of major page faults.
</p>
</dd>
<dt><code>maxrss</code></dt>
<dd><p>Maximum data size.
</p>
</dd>
<dt><code>minflt</code></dt>
<dd><p>Number of minor page faults.
</p>
</dd>
<dt><code>msgrcv</code></dt>
<dd><p>Number of messages received.
</p>
</dd>
<dt><code>msgsnd</code></dt>
<dd><p>Number of messages sent.
</p>
</dd>
<dt><code>nivcsw</code></dt>
<dd><p>Number of involuntary context switches.
</p>
</dd>
<dt><code>nsignals</code></dt>
<dd><p>Number of signals received.
</p>
</dd>
<dt><code>nswap</code></dt>
<dd><p>Number of swaps.
</p>
</dd>
<dt><code>nvcsw</code></dt>
<dd><p>Number of voluntary context switches.
</p>
</dd>
<dt><code>oublock</code></dt>
<dd><p>Number of block output operations.
</p>
</dd>
<dt><code>stime</code></dt>
<dd><p>A structure containing the system CPU time used.  The structure has the
elements <code>sec</code> (seconds) <code>usec</code> (microseconds).
</p>
</dd>
<dt><code>utime</code></dt>
<dd><p>A structure containing the user CPU time used.  The structure has the
elements <code>sec</code> (seconds) <code>usec</code> (microseconds).
</p></dd>
</dl>
</dd></dl>


<hr>
<div class="header">
<p>
Next: <a href="Hashing-Functions.html#Hashing-Functions" accesskey="n" rel="next">Hashing Functions</a>, Previous: <a href="Group-Database-Functions.html#Group-Database-Functions" accesskey="p" rel="prev">Group Database Functions</a>, Up: <a href="System-Utilities.html#System-Utilities" accesskey="u" rel="up">System Utilities</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>