utmpx.h(0P)
π PROLOG π
okay bestie, real talk before we even start: this page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so go check the corresponding Linux manual page for the tea on Linux behavior specifically), or honestly the interface might just not be implemented on Linux at all. no cap. π
β¨ NAME β¨
utmpx.h β user accounting database definitions π«Ά
like, the whole header, the whole vibe. it's giving "who's logged in and what are they doing."
πΈ SYNOPSIS πΈ
#include <utmpx.h>
that's it. that's the whole thing. one include and you're in. π
π DESCRIPTION π
okay so. the <utmpx.h> header shall define the utmpx structure, and that struct shall include at least these members:
char ut_user[] User login name.
char ut_id[] Unspecified initialization process identifier.
char ut_line[] Device name.
pid_t ut_pid Process ID.
short ut_type Type of entry.
struct timeval ut_tv Time entry was made.
read it again, bestie, because there will be a quiz. π
the <utmpx.h> header shall also define the pid_t type through typedef, exactly as described in <sys/types.h>.
the <utmpx.h> header shall define the timeval structure as described in <sys/time.h>.
and heads up π β including <utmpx.h> may also make visible all the symbols from <sys/time.h>. so it's a little two-for-one situation. iconic behavior honestly.
π the ut_type constants (aka the main characters) π
the <utmpx.h> header shall define these symbolic constants as possible values for the ut_type member of the utmpx structure:
EMPTYβ no valid user accounting information. it's giving empty. ghost town. π»BOOT_TIMEβ identifies time of system boot. π₯Ύβ¨OLD_TIMEβ identifies time when system clock changed.NEW_TIMEβ identifies time after system clock changed.USER_PROCESSβ identifies a process.INIT_PROCESSβ identifies a process spawned by theinitprocess.LOGIN_PROCESSβ identifies the session leader of a logged-in user.DEAD_PROCESSβ identifies a session leader who has exited. π (literally.)
π¦ the functions π¦
the following shall be declared as functions, and may also be defined as macros. function prototypes shall be provided:
void endutxent(void);
struct utmpx *getutxent(void);
struct utmpx *getutxid(const struct utmpx *);
struct utmpx *getutxline(const struct utmpx *);
struct utmpx *pututxline(const struct utmpx *);
void setutxent(void);
look at those little pointer stars. obsessed. β
the following sections are informative. just so you know what you're getting into. π€
π APPLICATION USAGE π
None.
nothing. nada. zip. zero notes, bestie, we're all good here. π«Ά
π§ RATIONALE π§
None.
no explanation offered and honestly? valid. main character energy. periodt. π
β FUTURE DIRECTIONS β
None.
the future is... unspecified. slay, I guess. β¨
π SEE ALSO π
<sys_time.h><sys_types.h>- the System Interfaces volume of POSIX.1β2017,
endutxent()
go read those if you want the full lore. iykyk. π
π COPYRIGHT π
okay so legally I have to tell you this part and I'm gonna tell you it exactly:
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. so if something looks off, the original wins, no debate. π ββοΈ
the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie!! this one came from IEEE/The Open Group, 2017, and the original page title was utmpx.h(0P) β mwah, go forth and account for your users. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms