octave: System Information

 
 36.11 System Information
 ========================
 
  -- : computer ()
  -- : C = computer ()
  -- : [C, MAXSIZE] = computer ()
  -- : [C, MAXSIZE, ENDIAN] = computer ()
  -- : ARCH = computer ("arch")
      Print or return a string of the form CPU-VENDOR-OS that identifies
      the type of computer that Octave is running on.
 
      If invoked with an output argument, the value is returned instead
      of printed.  For example:
 
           computer ()
              ⊣ i586-pc-linux-gnu
 
           mycomp = computer ()
              ⇒ mycomp = "i586-pc-linux-gnu"
 
      If two output arguments are requested, also return the maximum
      number of elements for an array.  This will depend on whether
      Octave has been compiled with 32-bit or 64-bit index vectors.
 
      If three output arguments are requested, also return the byte order
      of the current system as a character ("B" for big-endian or "L" for
      little-endian).
 
      If the argument "arch" is specified, return a string indicating the
      architecture of the computer on which Octave is running.
 
DONTPRINTYET       See also: Seeisunix XREFisunix, Seeismac XREFismac, *noteDONTPRINTYET       See also: Seeisunix XREFisunix, Seeismac XREFismac, See
      ispc XREFispc.
 
  -- : [UTS, ERR, MSG] = uname ()
      Return system information in the structure.
 
      For example:
 
           uname ()
              ⇒ {
                    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
                 }
 
      If successful, ERR is 0 and MSG is an empty string.  Otherwise, ERR
      is nonzero and MSG contains a system-dependent error message.
 
  -- : nproc ()
  -- : nproc (QUERY)
      Return the current number of available processors.
 
      If called with the optional argument QUERY, modify how processors
      are counted as follows:
 
      ‘all’
           total number of processors.
 
      ‘current’
           processors available to the current process.
 
      ‘overridable’
           same as ‘current’, but overridable through the
           ‘OMP_NUM_THREADS’ environment variable.
 
  -- : ispc ()
      Return true if Octave is running on a Windows system and false
      otherwise.
 
      See also: Seeisunix XREFisunix, Seeismac XREFismac.
 
  -- : isunix ()
      Return true if Octave is running on a Unix-like system and false
      otherwise.
 
      See also: Seeismac XREFismac, Seeispc XREFispc.
 
  -- : ismac ()
      Return true if Octave is running on a Mac OS X system and false
      otherwise.
 
      See also: Seeisunix XREFisunix, Seeispc XREFispc.
 
  -- : isieee ()
      Return true if your computer _claims_ to conform to the IEEE
      standard for floating point calculations.
 
      No actual tests are performed.
 
  -- : isdeployed ()
      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.
 
  -- : isstudent ()
      Return true if running in the student edition of MATLAB.
 
      ‘isstudent’ always returns false in Octave.
 
      See also: Seefalse XREFfalse.
 
  -- : OCTAVE_HOME ()
      Return the name of the top-level Octave installation directory.
 
DONTPRINTYET       See also: SeeEXEC_PATH XREFEXEC_PATH, *noteIMAGE_PATH:
DONTPRINTYET       See also: SeeEXEC_PATH XREFEXEC_PATH, SeeIMAGE_PATH

      XREFIMAGE_PATH.
 
  -- : matlabroot ()
      Return the name of the top-level Octave installation directory.
 
      This is an alias for the function ‘OCTAVE_HOME’ provided for
      compatibility.
 
      See also: SeeOCTAVE_HOME XREFOCTAVE_HOME.
 
  -- : OCTAVE_VERSION ()
      Return the version number of Octave as a string.
 
      See also: Seever XREFver, Seeversion XREFversion.
 
  -- : V = version ()
  -- : [V, D] = version ()
  -- : V = version (FEATURE)
      Get version information for Octave.
 
      If called without input argument, the first return value V gives
      the version number of Octave as a string.  The second return value
      D holds the release date as a string.
 
      The following options can be passed for FEATURE:
 
      "-date"
           for the release date of the running build,
 
      "-description"
           for a description of the release (always an empty string),
 
      "-release"
           for the name of the running build (always an empty string),
 
      "-java"
           for version information of the Java VM,
 
      "-fftw"
           for version information for the linked FFTW,
 
      "-blas"
           for version information for the linked BLAS (not implemented),
 
      "-lapack"
           for version information for the linked LAPACK (not
           implemented).
 
      The variant with no input and output argument is an alias for the
      function ‘OCTAVE_VERSION’ provided for compatibility.
 
DONTPRINTYET       See also: SeeOCTAVE_VERSION XREFOCTAVE_VERSION, *notever:
DONTPRINTYET       See also: SeeOCTAVE_VERSION XREFOCTAVE_VERSION, Seever

      XREFver.
 
  -- : ver
  -- : ver Octave
  -- : ver PACKAGE
  -- : v = ver (...)
 
      Display a header containing the current Octave version number,
      license string, and operating system.  The header is followed by a
      list of installed packages, versions, and installation directories.
 
      Use the package name PACKAGE or Octave to limit the listing to a
      desired component.
 
      When called with an output argument, return a vector of structures
      describing Octave and each installed package.  The structure
      includes the following fields.
 
      ‘Name’
           Package name.
 
      ‘Version’
           Version of the package.
 
      ‘Release’
           Release of the package.
 
      ‘Date’
           Date of the version/release.
 
      See also: Seeversion XREFversion, Seeusejava XREFusejava,
      Seepkg XREFpkg.
 
  -- : compare_versions (V1, V2, OPERATOR)
      Compare two version strings using the given OPERATOR.
 
      This function assumes that versions V1 and V2 are arbitrarily long
      strings made of numeric and period characters possibly followed by
      an arbitrary string (e.g., "1.2.3", "0.3", "0.1.2+", or
      "1.2.3.4-test1").
 
      The version is first split into numeric and character portions and
      then the parts are padded to be the same length (i.e., "1.1" would
      be padded to be "1.1.0" when being compared with "1.1.1", and
      separately, the character parts of the strings are padded with
      nulls).
 
      The operator can be any logical operator from the set
 
         • "==" equal
 
         • "<" less than
 
         • "<=" less than or equal to
 
         • ">" greater than
 
         • ">=" greater than or equal to
 
         • "!=" not equal
 
         • "~=" not equal
 
      Note that version "1.1-test2" will compare as greater than
      "1.1-test10".  Also, since the numeric part is compared first, "a"
      compares less than "1a" because the second string starts with a
      numeric part even though ‘double ("a")’ is greater than ‘double
      ("1").’
 
  -- : license
  -- : license inuse
  -- : license inuse FEATURE
  -- : license ("inuse")
  -- : RETVAL = license ("inuse")
  -- : RETVAL = license ("test", FEATURE)
  -- : RETVAL = license ("checkout", FEATURE)
  -- : [RETVAL, ERRMSG] = license ("checkout", FEATURE)
      Get license information for Octave and Octave packages.
 
      GNU Octave is free software distributed under the GNU General
      Public License (GPL), and a license manager makes no sense.  This
      function is provided only for MATLAB compatibility.
 
      When called with no extra input arguments, it returns the Octave
      license, otherwise the first input defines the operation mode and
      must be one of the following strings: ‘inuse’, ‘test’, and
      ‘checkout’.  The optional FEATURE argument can either be "octave"
      (core), or an Octave package.
 
      "inuse"
           Returns a list of loaded features, i.e., octave and the list
           of loaded packages.  If an output is requested, it returns a
           struct array with the fields "feature", and "user".
 
      "test"
           Return true if the specified FEATURE is installed, false
           otherwise.
 
           An optional third argument "enable" or "disable" is accepted
           but ignored.
 
      "checkout"
           Return true if the specified FEATURE is installed, false
           otherwise.  An optional second output will have an error
           message if a package is not installed.
 
DONTPRINTYET       See also: Seepkg XREFpkg, Seever XREFver, *noteversion:
DONTPRINTYET       See also: Seepkg XREFpkg, Seever XREFver, Seeversion

      XREFversion.
 
  -- : getrusage ()
      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:
 
      ‘idrss’
           Unshared data size.
 
      ‘inblock’
           Number of block input operations.
 
      ‘isrss’
           Unshared stack size.
 
      ‘ixrss’
           Shared memory size.
 
      ‘majflt’
           Number of major page faults.
 
      ‘maxrss’
           Maximum data size.
 
      ‘minflt’
           Number of minor page faults.
 
      ‘msgrcv’
           Number of messages received.
 
      ‘msgsnd’
           Number of messages sent.
 
      ‘nivcsw’
           Number of involuntary context switches.
 
      ‘nsignals’
           Number of signals received.
 
      ‘nswap’
           Number of swaps.
 
      ‘nvcsw’
           Number of voluntary context switches.
 
      ‘oublock’
           Number of block output operations.
 
      ‘stime’
           A structure containing the system CPU time used.  The
           structure has the elements ‘sec’ (seconds) ‘usec’
           (microseconds).
 
      ‘utime’
           A structure containing the user CPU time used.  The structure
           has the elements ‘sec’ (seconds) ‘usec’ (microseconds).