acct(2) System Calls Manual acct(2) acct - C (libc, -lc) #include int acct(const char *_Nullable path); glibc (. feature_test_macros(7)): acct(): glibc 2.21: _DEFAULT_SOURCE glibc 2.19 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) glibc 2.19, : _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) The acct() system call enables or disables process accounting. If called with the pathname of an existing file as its argument, accounting is turned on, and records for each terminating process are appended to the file as it terminates. An argument of NULL causes accounting to be turned off. 0. -1, errno . EACCES Write permission is denied for the specified file, or search permission is denied for one of the directories in the path prefix of path (see also path_resolution(7)), or path is not a regular file. EFAULT path . EIO Error writing to the file path. EISDIR path is a directory. ELOOP path . ENAMETOOLONG path was too long. ENFILE . ENOENT The specified path does not exist. ENOMEM . ENOSYS BSD , . CONFIG_BSD_PROCESS_ACCT. ENOTDIR A component used as a directory in path is not in fact a directory. EPERM . Linux CAP_SYS_PACCT. EROFS path refers to a file on a read-only filesystem. EUSERS . . SVr4, 4.3BSD. , . , . , , acct(5). acct(5) () Dmitry Bolkhovskikh , Yuri Kozlov Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.15 17 2025 . acct(2)