GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
NN_GET_STATISTIC(3) nanomsg 1.1.5 NN_GET_STATISTIC(3)

nn_get_statistic - retrieve statistics from nanomsg socket

#include <nanomsg/nn.h>

uint64_t nn_get_statistic (int s, int statistic);

Retrieves the value of a statistic from the socket.


Caution

While this API is stable, these statistics are intended for
human consumption, to facilitate observability and debugging. The actual statistics themselves as well as their meanings are unstable, and subject to change without notice. Programs should not depend on the presence or values of any particular statistic.

The following statistics are maintained by the nanomsg core framework; others may be present. As those are undocumented, no interpretration should be made from them. Not all statistics are relevant to all transports. For example, the nn_inproc(7) transport does not maintain any of the connection related statistics.

NN_STAT_ESTABLISHED_CONNECTIONS

The number of connections successfully established that were initiated from this socket.

NN_STAT_ACCEPTED_CONNECTIONS

The number of connections successfully established that were accepted by this socket.

NN_STAT_DROPPED_CONNECTIONS

The number of established connections that were dropped by this socket.

NN_STAT_BROKEN_CONNECTIONS

The number of established connections that were closed by this socket, typically due to protocol errors.

NN_STAT_CONNECT_ERRORS

The number of errors encountered by this socket trying to connect to a remote peer.

NN_STAT_BIND_ERRORS

The number of errors encountered by this socket trying to bind to a local address.

NN_STAT_ACCEPT_ERRORS

The number of errors encountered by this socket trying to accept a a connection from a remote peer.

NN_STAT_CURRENT_CONNECTIONS

The number of connections currently estabalished to this socket.

NN_STAT_MESSAGES_SENT

The number messages sent by this socket.

NN_STAT_MESSAGES_RECEIVED

The number messages received by this socket.

NN_STAT_BYTES_SENT

The number of bytes sent by this socket.

NN_STAT_BYTES_RECEIVED

The number of bytes received by this socket.

On success, the value of the statistic is returned, otherwise (uint64_t)-1 is returned.

EINVAL
The statistic is invalid or unsupported.

EBADF

The provided socket is invalid.

ETERM

The library is terminating.

val = nn_get_statistic (s, NN_STAT_MESSAGES_SENT);
if (val == 0)
    printf ("No messages have been sent yet.\n");

nn_errno(3) nn_symbol(3) nanomsg(7)

Garrett D’Amore <garrett@damore.org>
2018-10-15  

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.