"Fossies" - the Fresh Open Source Software Archive

Member "linux_logo-6.0/libsysinfo-0.3.0/sysinfo.h" (8 May 2020, 1724 Bytes) of package /linux/misc/linux_logo-6.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1      /* */
    2 char *get_sysinfo_version(char *version);
    3 int get_numeric_sysinfo_version(void);
    4 
    5 #define SYSINFO_OS_NAME_SIZE     32
    6 #define SYSINFO_OS_VERSION_SIZE  32
    7 #define SYSINFO_OS_REVISION_SIZE 64
    8 #define SYSINFO_HOSTNAME_SIZE    64
    9 #define SYSINFO_DOMAIN_SIZE      64
   10 #define SYSINFO_CHIP_VENDOR_SIZE 32
   11 #define SYSINFO_CHIP_TYPE_SIZE   64
   12 #define SYSINFO_HARDWARE_STRING_SIZE 64
   13 
   14 struct os_info_type {
   15     char os_name[SYSINFO_OS_NAME_SIZE+1];
   16     char os_version[SYSINFO_OS_VERSION_SIZE+1];
   17     char os_revision[SYSINFO_OS_REVISION_SIZE+1];
   18 };
   19 
   20 int get_os_info(struct os_info_type *os_info);
   21 
   22 
   23 /* host name */
   24 char *get_host_name(char *hostname,char *domain);
   25 
   26  /* uptime  (seconds the system has been up) */
   27 int get_uptime(void);
   28 
   29 /* load average  ( average load across 1, 5 and 15 minutes) */
   30 int get_load_average(float *load_1,float *load_5,float *load_15);
   31 
   32 struct cpu_info_type {
   33     int num_cpus;
   34     int family,model,stepping;
   35     float megahertz;
   36     float bogomips;
   37     char chip_vendor[SYSINFO_CHIP_VENDOR_SIZE+1];
   38     char chip_type[SYSINFO_CHIP_TYPE_SIZE+1];
   39 };
   40 
   41 int get_cpu_info(struct cpu_info_type *cpu_info);
   42 
   43     /* Hardware info string */
   44 int get_hardware_info(char *hardware_string);
   45 
   46 #define MEM_USE_SYSINFO -1
   47 #define MEM_USE_MEMINFO -2
   48 
   49     /* mem_size (in megabytes)  (will this work on > 4Gig systems?) */
   50 long long get_mem_size(void);
   51 
   52     /* Use if the generic mem_size routines don't work for your arch */
   53 long long get_arch_specific_mem_size(void);
   54 long long get_mem_size_sysinfo(void);
   55 long long get_mem_size_meminfo(void);
   56 long long get_mem_size_iomem(void);
   57 long long get_mem_size_stat(void);
   58 
   59 double get_cpu_mhz(void);
   60 
   61 /* Debugging */
   62 int set_cpuinfo_file(char *filename);
   63 void set_pretty_printing(int value);
   64