DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using the UDK

What system is this?

An application compiled using the UnixWare and OpenServer Development Kit for UnixWare or SCO OpenServer may need to know which system it is running on.

Modifications have been made to the following interfaces to allow UnixWare and OpenServer Development Kit-compiled applications (together with the Binary Compatibility Module, if the application is running on SCO OpenServer Release 5 or SCO UnixWare 2.1.X) to determine the system on which they are running:

The UnixWare 7 uname command is included in the BCM modules for both SCO OpenServer Release 5 and SCO UnixWare 2.1.X. On SCO OpenServer Release 5, it is installed as /udk/bin/uname. On SCO UnixWare 2.1.X, it replaces the standard uname command in /bin/uname.

Applications (shell scripts) that need to know on which of these systems they are being executed should include the /udk/bin directory in the PATH environment variable list before /bin. This way, the application will execute the UnixWare 7 uname command on all systems that support the UDK.

So, in shell scripts, you should use:

   PATH=/udk/bin:$PATH uname
to get the UDK version of uname on all systems.

To check whether a system has the UDK installed, an application can use uname to check for the value of os_provider; if it equals ``SCO'', then the system supports the UDK. For example:

   if [ `PATH=/udk/bin:$PATH uname os_provider 2>/dev/null` = Caldera ]
   then
   	echo "UDK environment present."
   fi

From a C program, the confstr(3C) function is used instead:

   confstr(_CS_OS_PROVIDER)

If the return value equals ``SCO'', then the system supports the UDK.

Additionally, there are some UnixWare 7 features that are supported on SCO UnixWare 2.1.X and UnixWare 7, but not SCO OpenServer Release 5. Applications that want to take advantage of a UnixWare-only feature can test to see if they are running on UnixWare by using:

   uname sysname
in a shell script, or
   confstr(_CS_SYSNAME)
in a C program, and see if it equals ``UnixWare''. If so, the application is on SCO UnixWare 2.1.X (with the BCM installed), or UnixWare 7; if not, the application is running on SCO OpenServer (with the BCM installed).

Note that all the above commands and function calls would fail on an SCO OpenServer system without the UDK installed.

uname -- new and legacy parameters/values

new-style
parameter
-X name legacy option confstr native OSR5 native UW2
architecture     _CS_ARCHITECTURE   x86at
bus_types BusType   _CS_BUSTYPES MCA
EISA
ISA
AT
MCA
EISA
ISA
AT
hostname Node -n _CS_HOSTNAME local hostname local hostname
hw_provider   -p
-c
_CS_HW_PROVIDER i386 Caldera
x86at
hw_serial Serial -i _CS_HW_SERIAL OS serial #  
kernel_stamp KernelID   _CS_KERNEL_STAMP yy/mm/dd yy/mm/dd
machine Machine -m _CS_MACHINE i386 i386
num_cpu NumCPU     #CPUs 1
os_base     _CS_OS_BASE    
os_provider     _CS_OS_PROVIDER    
release Release -r _CS_RELEASE 3.2 4.2MP
srpc_domain   -d _CS_SRPC_DOMAIN    
sysname System -s _CS_SYSNAME SCO_SV UNIX_SV
user_limit Users -A
-l
_CS_USER_LIMIT nnn-user
nnnnnnnn
unlim
 
version   -v _CS_VERSION 2 2.x

UDK uname -- parameters and values on Caldera platforms

new-style
parameter
UnixWare 7 UDK on OSR5 UDK on UW2 notes
architecture IA32 IA32 IA32 13
bus_types comma list of:
EISA
ISA
MCA
PCIm.n
PnPm.n
MCA
EISA
ISA
AT
MCA
EISA
ISA
AT
9,16
hostname fully-qualified hostname fully-qualified hostname fully-qual hostname 12
hw_provider Generic AT
Generic MP
Compaq Proliant
Compaq SystemPro
DG NUMALiiNE
...
Generic AT
Generic MP
Generic AT
Generic MP!
13,15
hw_serial HW serial # OS serial #   4,7,8
kernel_stamp yy/mm/dd yy/mm/dd yy/mm/dd 9
machine 486
Pentium
Pentium Pro
Pentium II
5x86
6x86
Am5x86
AMD-K5
AMD-K6
386
486
Pentium
Pentium Pro
Pentium II
5x86
6x86
Am5x86
AMD-K5
AMD-K6
386
486
Pentium
Pentium Pro
Pentium II
5x86
6x86
Am5x86
AMD-K5
AMD-K6
2,11
num_cpu #CPUs #CPUs #CPUs 3
os_base UNIX_SVR5 UNIX_SVR3 UNIX_SVR4 9
os_provider SCO SCO SCO 9
release 5 3.2 4.2MP 10
srpc_domain       15
sysname UnixWare SCO_SV UnixWare 5
user_limit #users
unlimited
#users
unlimited
#users
unlimited
1,6,9
version 7
7.0.1
7.1.0
7.1.1
5.0.x 2.x 10,14

The columns in the table are interpreted as follows:


new-style parameter
This is the name for the parameter in the new extensible uname(1) style, for the -f option and for uname arguments.

-X name
This is the name of the parameter when reported by the legacy (undocumented) -X option.

legacy option
This is the option letter(s), if any, that can be used to report the parameter.

confstr
This is the name of the parameter as given to the confstr routine. For each such name there shall be an exactly equivalent sysinfo parameter with the same name but with the ``_CS_'' prefix replaced by ``SI_''. These confstr and sysinfo parameters are not supported on native SCO OpenServer.

native OSR5
This is the result currently reported by native SCO OpenServer Release 5 systems.

native UW2
This is the result currently reported by native SCO UnixWare 2.1.X systems.

UnixWare
7
This is the result to be reported by the UnixWare 7 uname command and by confstr/sysinfo for UDK applications.

UDK on OSR5
This is the result to be reported by confstr/sysinfo for UDK applications running on SCO OpenServer.

UDK on UW2
This is the result to be reported by confstr/sysinfo for UDK applications running on SCO UnixWare 2.1.X.

notes
See the numbered notes below.

The notes column refers to the following numbered notes:

  1. SCO OpenServer provides the user_limit parameter with the -A option. For consistency with other versions of the UNIX system, user_limit will also be provided via the -l option. The UnixWare 7 uname, however, prints the number of users as a number alone with no suffix (as SCO OpenServer does only when the number is greater than 999). An unlimited user license is represented as unlimited, except for -A and the -X Users option, which prints unlim for SCO OpenServer compatibility.

  2. Native SCO UnixWare 2.1.X uname -X (no options) prints Machine = i386at. Native SCO OpenServer uname -X shows the specific CPU name (as does UnixWare 7), but uses the names i80386, i80486, Pentium, Pentium Pro, and others.

  3. Native SCO UnixWare 2.1.X uname -X shows NumCPU = 1 no matter how many CPUs are installed.

  4. Native SCO UnixWare 2.1.X uname -X shows blank Serial =.

  5. Native SCO UnixWare 2.1.X uname -X shows System = UNIX_Sys.

  6. Native SCO UnixWare 2.1.X uname -X shows blank Users =.

  7. The -i option is for compatibility with ksh and other versions of the UNIX system.

  8. UnixWare 7 prints the hardware serial number if available from the Platform Support Module (PSM); if not, it prints the operating system license serial number.

  9. These confstr and sysinfo commands are new for all SCO OpenServer and UnixWare: _CS_BUSTYPES, SI_BUSTYPES, _CS_KERNEL_STAMP, SI_KERNEL_STAMP, _CS_OS_BASE, SI_OS_BASE, _CS_OS_PROVIDER, SI_OS_PROVIDER, _CS_USER_LIMIT, SI_USER_LIMIT.

  10. Native SCO OpenServer uname -X shows Release = 3.2v5.0.x.

  11. SCO UnixWare 2.1.X and UnixWare 7 /system/processor (and psrinfo(1M)) use the names i386, i486, Pentium, Pentium_Pro.

  12. The new confstr/sysinfo APIs will return the fully-qualified name (for example, ralph.dev.brandx.com) and so will the new-style hostname parameter. For compatibility, uname -n and the Node parameter of uname -X will continue to return just the first part of the fully-qualified name (for example, ralph).

  13. Native SCO UnixWare 2.1.X returns SCO for _CS_HW_PROVIDER and SI_HW_PROVIDER, but reports SI_ARCHITECTURE (x86at) for -p. The ksh builtin uname also reports SI_ARCHITECTURE for -p.

  14. The UnixWare 7 version number will be the string 7.

  15. The -c and -d options exist in the ksh builtin uname, but are new to the /bin/uname command (see uname(1)).

  16. On UnixWare 7, uname -X will continue to report the old, single bus type for BusType, but the new bus_types parameter will reflect the full list of buses.

Next topic: UDK compilation modes
Previous topic: Setting your PATH

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004