---
name: "libkysysinfo"
section: "3"
platform: "linux"
package: "libkysdk-system"
version: "3.0.1.4-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/libkysysinfo"
---

# libkysysinfo(3)

获取操作系统基础信息

## NAME

kdk\_system\_get\_architecture, kdk\_system\_get\_systemName, kdk\_system\_get\_version, kdk\_system\_get\_activationStatus, kdk\_system\_get\_serialNumber, kdk\_system\_get\_kernelVersion, kdk\_system\_get\_eUser, kdk\_system\_get\_eUser\_login\_time, kdk\_system\_get\_projectName, kdk\_system\_get\_projectSubName, kdk\_system\_get\_productFeatures, kdk\_system\_get\_hostVirtType, kdk\_system\_get\_hostCloudPlatform, kdk\_system\_is\_zyj, kdk\_system\_get\_version\_detaile, kdk\_system\_get\_resolving\_power, kdk\_system\_get\_systemCategory, kdk\_system\_get\_startup\_time, kdk\_system\_get\_shutdown\_time, kdk\_get\_host\_vendor, kdk\_get\_host\_product,  kdk\_get\_host\_serial, kdk\_system\_get\_hostName, kdk\_system\_get\_word, kdk\_system\_get\_buildTime, kdk\_resolving\_freeall, kdk\_hw\_get\_pci\_info, kdk\_hw\_free\_pci\_info, kdk\_system\_get\_appScene - 获取操作系统基础信息

## SYNOPSIS

```
#include <libkysysinfo.h>

extern char* kdk_system_get_architecture();

extern char* kdk_system_get_systemName();

extern char* kdk_system_get_version(bool verbose);

extern int kdk_system_get_activationStatus(int *status_error_num, int *date_error_num);

extern char* kdk_system_get_serialNumber();

extern char* kdk_system_get_kernelVersion();

extern char* kdk_system_get_eUser();

extern char* kdk_system_get_eUser_login_time();

extern char* kdk_system_get_projectName();

extern char* kdk_system_get_projectSubName();

extern unsigned int kdk_system_get_productFeatures();

extern char* kdk_system_get_hostVirtType();

extern char* kdk_system_get_hostCloudPlatform();

extern bool kdk_system_is_zyj(void);

extern version_t kdk_system_get_version_detaile();

extern char** kdk_system_get_resolving_power();

extern char* kdk_system_get_systemCategory();

extern char** kdk_system_get_startup_time();

extern char** kdk_system_get_shutdown_time();

extern char *kdk_get_host_vendor();

extern char *kdk_get_host_product();

extern char *kdk_get_host_serial();

extern char *kdk_system_get_hostName();

extern int kdk_system_get_word();

extern char *kdk_system_get_buildTime();

extern inline void kdk_resolving_freeall(char **ptr);

extern struct KPci *kdk_hw_get_pci_info();

extern void kdk_hw_free_pci_info(struct KPci *info);

extern char *kdk_system_get_appScene();

Link with -lkysysinfo.
```

## Detailed Description

This library contains instantaneous information about the current system.

## DATA STRUCTURES

Structure **version\_t** contains information related to a system version number and patch version number information:

**typedef struct {**\
\
 	**char    \*os\_version;            //系统版本**\
     **char    \*update\_version;        //补丁版本**\
 **} version\_t;**

There are other members not documented here, which are only meant for libkysysinfo internal use.

Structure **KPci** contains information related to a pci bus information:

**struct KPci {**\
\
 	**char slot\_path\[16\];**\
     **char class\_name\[128\];**\
     **char product\_name\[128\];**\
     **unsigned char rev;**\
     **char ss\_name\[256\];**\
     **char driver\_use\[1024\];**\
     **char \*\*modules;**\
     **int module\_count;**\
     **struct KPci \*next;**\
 **};**

There are other members not documented here, which are only meant for libkysysinfo internal use.

## RETURN VALUE

The return value is generally specific to the individual function called.

## CONFORMING TO

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: **kdk\_system\_get\_architecture**(), **kdk\_system\_get\_systemName**(), **kdk\_system\_get\_version**(), **kdk\_system\_get\_serialNumber**(), **kdk\_system\_get\_kernelVersion**(), **kdk\_system\_get\_eUser**(), **kdk\_system\_get\_eUser\_login\_time**(), **kdk\_system\_get\_projectName**(), **kdk\_system\_get\_projectSubName**(), **kdk\_system\_get\_productFeatures**(), **kdk\_system\_get\_hostVirtType**(), **kdk\_system\_get\_hostCloudPlatform**(), **kdk\_system\_is\_zyj**(), **kdk\_system\_get\_version\_detaile**(), **kdk\_system\_get\_resolving\_power**(), **kdk\_system\_get\_systemCategory**(), **kdk\_system\_get\_startup\_time**(), **kdk\_system\_get\_shutdown\_time**(), **kdk\_get\_host\_vendor**(), **kdk\_get\_host\_product**(), **kdk\_get\_host\_serial**(), **kdk\_system\_get\_hostName**(), **kdk\_system\_get\_word**(), **kdk\_system\_get\_buildTime**(), **kdk\_resolving\_freeall**(), **kdk\_hw\_get\_pci\_info**(), **kdk\_hw\_free\_pci\_info**(), and **kdk\_system\_get\_appScene**().

## SEE ALSO

[**kdk\_system\_get\_architecture**(3)](/man/kdk_system_get_architecture/3.md), [**kdk\_system\_get\_systemName**(3)](/man/kdk_system_get_systemName/3.md), [**kdk\_system\_get\_version**(3)](/man/kdk_system_get_version/3.md), [**kdk\_system\_get\_activationStatus**(3)](/man/kdk_system_get_activationStatus/3.md), [**kdk\_system\_get\_serialNumber**(3)](/man/kdk_system_get_serialNumber/3.md), [**kdk\_system\_get\_kernelVersion**(3)](/man/kdk_system_get_kernelVersion/3.md), [**kdk\_system\_get\_eUser**(3)](/man/kdk_system_get_eUser/3.md), [**kdk\_system\_get\_eUser\_login\_time**(3)](/man/kdk_system_get_eUser_login_time/3.md), [**kdk\_system\_get\_projectName**(3)](/man/kdk_system_get_projectName/3.md), [**kdk\_system\_get\_projectSubName**(3)](/man/kdk_system_get_projectSubName/3.md), [**kdk\_system\_get\_productFeatures**(3)](/man/kdk_system_get_productFeatures/3.md), [**kdk\_system\_get\_hostVirtType**(3)](/man/kdk_system_get_hostVirtType/3.md), [**kdk\_system\_get\_hostCloudPlatform**(3)](/man/kdk_system_get_hostCloudPlatform/3.md), [**kdk\_system\_is\_zyj**(3)](/man/kdk_system_is_zyj/3.md), [**kdk\_system\_get\_version\_detaile**(3)](/man/kdk_system_get_version_detaile/3.md), [**kdk\_system\_get\_resolving\_power**(3)](/man/kdk_system_get_resolving_power/3.md), [**kdk\_system\_get\_systemCategory**(3)](/man/kdk_system_get_systemCategory/3.md), [**kdk\_system\_get\_startup\_time**(3)](/man/kdk_system_get_startup_time/3.md), [**kdk\_system\_get\_shutdown\_time**(3)](/man/kdk_system_get_shutdown_time/3.md), [**kdk\_get\_host\_vendor**(3)](/man/kdk_get_host_vendor/3.md), [**kdk\_get\_host\_product**(3)](/man/kdk_get_host_product/3.md), [**kdk\_get\_host\_serial**(3)](/man/kdk_get_host_serial/3.md), [**kdk\_system\_get\_hostName**(3)](/man/kdk_system_get_hostName/3.md), [**kdk\_system\_get\_word**(3)](/man/kdk_system_get_word/3.md), [**kdk\_system\_get\_buildTime**(3)](/man/kdk_system_get_buildTime/3.md), [**kdk\_resolving\_freeall**(3)](/man/kdk_resolving_freeall/3.md), [**kdk\_hw\_get\_pci\_info**(3)](/man/kdk_hw_get_pci_info/3.md), [**kdk\_hw\_free\_pci\_info**(3)](/man/kdk_hw_free_pci_info/3.md), and [**kdk\_system\_get\_appScene**(3)](/man/kdk_system_get_appScene/3.md).
