PMC_GET_DRIVER_STATS(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to PMC_GET_DRIVER_STATS(3), aka the Library Functions Manual page for pmc_get_driver_stats(3) β€” the function that retrieves driver statistics. That’s the whole assignment. 🫢

πŸ“š LIBRARY πŸ“š

Performance Counters Library (libpmc, -lpmc) β€” yes, link it like that, slay. ✨

✨ SYNOPSIS ✨

#include <pmc.h>

int
pmc_get_driver_stats(struct pmc_driverstats *gms);

πŸ’– DESCRIPTION πŸ’–

The function pmc_get_driver_statistics() retrieves a snapshot of the usage statistics maintained by hwpmc(4) into the memory area pointed to by argument gms. (That’s the description’s spelling, bestie β€” don’t come for me πŸ’€.)

The returned structure includes the following fields, no skips:

  • pm_intr_ignored β€” the number of sampling interrupts ignored. πŸ™ˆ
  • pm_intr_processed β€” the number of sampling interrupts processed. βœ…
  • pm_intr_bufferfull β€” the number of sampling interrupts dropped due to lack of space in the sample buffer. 😭
  • pm_syscalls β€” the number of system calls into hwpmc(4). πŸ“ž
  • pm_syscalls_errors β€” the number of system calls into hwpmc(4) that failed. πŸ’€
  • pm_buffer_requests β€” the number of log buffer requests so far. 🧾
  • pm_buffer_requests_failed β€” the number of log buffer requests that failed due to lack of buffers. 🫠
  • pm_log_sweeps β€” the number of sample buffer processing sweeps. 🧹

πŸ” RETURN VALUES πŸ”

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. So: 0 = slay, -1 = check errno, periodt. πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

pmc(3), hwpmc(4) β€” go read those too, bestie. πŸ¦‹


xoxo, your Debian bestie β€” this page is from Debian, dated November 25, 2007. πŸ’–βœ¨

πŸ“¦ where this page comes from