2011年8月25日 星期四

sys/utsname.h 平台型號


DESCRIPTION

The  header shall define the structure utsname which shall include at least the following members:
char  sysname[]  Name of this implementation of the operating system. 
char  nodename[] Name of this node within the communications 
                 network to which this node is attached, if any. 
char  release[]  Current release level of this implementation. 
char  version[]  Current version level of this release. 
char  machine[]  Name of the hardware type on which the system is running. 



Example

#include
#include
int main()
{
                struct utsname buf;
                uname (&buf);
                printf ("sysname: %s\n", buf.sysname);
                printf ("nodename: %s\n", buf.nodename);
                printf ("release: %s\n", buf.release);
                printf ("version: %s\n", buf.version);
                printf ("machine: %s\n", buf.machine);
                printf ("domainname: %s\n", buf.__domainname);
                return 0;
}

沒有留言:

張貼留言

How to use simple speedtest in RaspberryPi CLI

  pi@ChunchaiRPI2:/tmp $  wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py --2023-06-26 10:4...