---
name: "libnutclient_misc"
section: "3"
platform: "linux"
package: "nut"
version: "2.8.5-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnutclient_misc"
---

# libnutclient\_misc(3)

Miscellaneous functions in Network UPS Tools high-level client access library

## NAME

libnutclient\_misc, nutclient\_authenticate, nutclient\_logout, nutclient\_device\_login, nutclient\_get\_device\_num\_logins, nutclient\_device\_master, nutclient\_device\_forced\_shutdown - Miscellaneous functions in Network UPS Tools high-level client access library

## SYNOPSIS

```
        #include <nutclient.h>
        typedef void* NUTCLIENT_t;
        void nutclient_authenticate(
                NUTCLIENT_t client,
                const char* login, const char* passwd);
        void nutclient_logout(NUTCLIENT_t client);
        void nutclient_device_login(NUTCLIENT_t client, const char* dev);
        int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
        void nutclient_device_primary(NUTCLIENT_t client, const char* dev);
        /* OBSOLETED name: */
        void nutclient_device_master(NUTCLIENT_t client, const char* dev);
        void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
```

## DESCRIPTION

• The **nutclient\_authenticate()** function authenticates the user.

• *login* is the user name.

• *passwd* is the user password.

• The **nutclient\_logout()** function disconnects gracefully from the server.

• The **nutclient\_device\_login()** function logs the fact that a system is drawing power from this UPS.

• The **nutclient\_get\_device\_num\_logins()** function retrieves the number of clients which have been logged for this device.

• The **nutclient\_device\_master()** and **nutclient\_device\_primary()** (note: the former is obsoleted since NUT v2.8.0 in favor of the latter) functions make sure that primary-mode functions like FSD are available if necessary.

• The **nutclient\_device\_forced\_shutdown()** function sets the "forced shutdown" (FSD) flag on the device.

Common arguments:

• *dev* is the device name.

## SEE ALSO

[**libnutclient**(3)](/libnutclient/3.md)
