pxfuname
- Date:
10-20-2011
NAME
PXFUNAME - Retrieves the operating system name
SYNOPSIS
INTEGER junam, ierror
CALL PXFUNAME(junam, ierror)
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
IEEE Std 1003.9-1992 standard interface for FORTRAN 77
DESCRIPTION
The PXFUNAME routine uses the uname(2) system call to get the components of the operating system name.
The components of the utsname structure are:
- sysname
Name of the operating system.
- nodename
Name of node in the operating system.
- release
Current release level of the operating system.
- version
Current version level of the release.
- machine
Name of hardware type currently executing the program.
All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.
The following is a list of valid arguments for this routine:
- junam
An input integer variable or array element containing a handle for a utsname structure. This should have been created by a call to the PXFSTRUCTCREATE(3F) routine.
- ierror
An output integer variable that contains zero if PXFUNAME returned the structure successfully or nonzero if PXFUNAME was unable to return the structure.
EXAMPLES
program test
integer junam, ierror, ilen
character*15 sname, nname, rel, vers, mach
call pxfstructcreate('utsname',junam,ierror)
call pxfuname(junam,ierror)
IF (ierror.ne.0) then
print *,'FAIL: error from pxfuname = ',ierror
else
print *,'PASS: No error from pxfuname = '
endif
ilen = 0
call pxfstrget(junam,'sysname',sname,ilen,ierror)
ilen = 0
call pxfstrget(junam,'nodename',nname,ilen,ierror)
ilen = 0
call pxfstrget(junam,'release',rel,ilen,ierror)
ilen = 0
call pxfstrget(junam,'version',vers,ilen,ierror)
ilen = 0
call pxfstrget(junam,'machine',mach,ilen,ierror)
print *, 'sysname=',sname
print *, 'nodename=',nname
print *, 'release=',rel
print *, 'version=',vers
print *, 'machine=',mach
call pxfstructfree(junam,ierror)
SEE ALSO
uname(2)
PXFSTRUCTCREATE(3F)