Next: Inline Assembly Code
Up: Linux System Calls
Previous: sysinfo: Obtaining System Statistics
Contents
- The uname system call fills a structure with various system information, including the computer's network name and domain name, and the operating system version it's running.
- The call to uname fills in these fields:
- sysname The name of the operating system (such as Linux).
- release, version The Linux kernel release number and version level.
- machine Some information about the hardware platform running Linux. For x86 Linux, this is i386 or i686, depending on the processor.
- node The computer's unqualified hostname.
- __domain The computer's domain name.
- The small http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/print-uname program in Fig. 8.9 prints the Linux release and version number and the hardware information.
Figure 8.9:
Print Linux Version Number and Hardware Information.
|
Cem Ozdogan
2007-05-16