OPENSSL_LH_STATS(3ossl)
π OPENSSL_LH_STATS π
okay bestie, welcome to the OPENSSL_LH_STATS(3ossl) page β yes that's the manual name, it's giving "cryptic OpenSSL chapter title" but it's literally just the LHASH statistics girlies β¨
π¦ NAME π¦
OPENSSL_LH_stats, OPENSSL_LH_node_stats, OPENSSL_LH_node_usage_stats, OPENSSL_LH_stats_bio, OPENSSL_LH_node_stats_bio, OPENSSL_LH_node_usage_stats_bio β these are your LHASH statistics functions, no cap π
πΈ SYNOPSIS πΈ
#include <openssl/lhash.h>
so here's the tea, and it's a lil sad: the following functions have been deprecated since OpenSSL 3.1, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β peep openssl_user_macros(7) for the deets:
void OPENSSL_LH_node_stats(LHASH *table, FILE *out);
void OPENSSL_LH_node_usage_stats(LHASH *table, FILE *out);
void OPENSSL_LH_node_stats_bio(LHASH *table, BIO *out);
void OPENSSL_LH_node_usage_stats_bio(LHASH *table, BIO *out);
void OPENSSL_LH_stats(LHASH *table, FILE *out);
void OPENSSL_LH_stats_bio(LHASH *table, BIO *out);
β¨ DESCRIPTION β¨
The LHASH structure is out here recording statistics about, like, most aspects of accessing the hash table. it's keeping receipts π
OPENSSL_LH_stats() prints out statistics on the size of the hash table and how many entries are in it. but here's the messy part β for historical reasons, this function also outputs a number of additional statistics, and the tracking of those stats is no longer supported and they're always reported as zero. so like... zero, zero, zero, bye π
OPENSSL_LH_node_stats() prints the number of entries for each 'bucket' in the hash table. one bucket at a time, we love a per-bucket moment πͺ£
OPENSSL_LH_node_usage_stats() prints out a short summary of the state of the hash table. it prints the 'load' and the 'actual load'. so the 'load' is the average number of data items per 'bucket' in the hash table. and the 'actual load' is the average number of items per 'bucket', but only for buckets which contain entries. so basically β the 'actual load' is the average number of searches that will need to find an item in the hash table, while the 'load' is the average number that will be done to record a miss. it's giving "found it" vs "not found bestie, keep scrolling" π
OPENSSL_LH_stats_bio(), OPENSSL_LH_node_stats_bio() and OPENSSL_LH_node_usage_stats_bio() are the same as the above, except that the output goes to a BIO. same vibe, different output door πͺβ¨
and the final word: these functions are deprecated and should no longer be used. periodt. don't do it π«
π«Ά RETURN VALUES π«Ά
these functions do not return values. they just do their lil thing and dip π
π NOTE π
these calls should be made under a read lock. refer to "NOTE" in OPENSSL_LH_COMPFUNC(3) for more details about the locks required when using the LHASH data structure. lock it up, protect your peace π
π SEE ALSO π
bio(7), OPENSSL_LH_COMPFUNC(3) β go read those too, iykyk π
π HISTORY π
these functions were deprecated in version 3.1. that's the lore π°οΈ
π COPYRIGHT π
Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's a wrap, my love π this was 3.5.9, dated 2026-09-29, straight from the OPENSSL_LH_STATS(3ossl) page β go forth and read your locks before you peek at the buckets, mwah π§πΈ
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms