---
name: "kdk_fan_get_information"
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/kdk_fan_get_information"
---

# kdk\_fan\_get\_information(3)

获取风扇的信息

## NAME

kdk\_fan\_get\_information - 获取风扇的信息

## SYNOPSIS

```
#include <libkyfan.h>

extern char** kdk_fan_get_information();

Link with -lkyfan.
```

## Detailed Description

The main function of the interface is to obtain the fan information.

## RETURN VALUE

On success, returns a list of fan information of type char\*, including name and speed, ending with a  **NULL** string; Generated by  *alloc* and needs to be recycled by  **kdk\_fan\_freeall**

On error, return **NULL.**

## EXAMPLES

```
#include "libkyfan.h"
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char **fan = kdk_fan_get_information();
    int index = 0;
    while (fan[index])
    {
        printf("%s0, fan[index]);
        index++;
    }
    kdk_fan_freeall(fan);
    return 0;
}
```

## CONFORMING TO

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: **kdk\_fan\_freeall**().

## SEE ALSO

[**kdk\_fan\_freeall**(3)](/man/kdk_fan_freeall/3.md).
