OBS-URL: https://build.opensuse.org/package/show/server:monitoring/acctail?expand=0&rev=1
41 lines
1.8 KiB
Diff
41 lines
1.8 KiB
Diff
--- acctail.cpp.orig 2009-05-04 21:48:16.000000000 +0200
|
|
+++ acctail.cpp 2009-05-04 21:48:51.000000000 +0200
|
|
@@ -11,36 +11,13 @@
|
|
#include <string.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
+#include <sys/acct.h>
|
|
|
|
#include "array.h"
|
|
#include "error.h"
|
|
|
|
int sig_abort = 0;
|
|
|
|
-/* included in the source as this definition doesn't seem to be exported anywhere */
|
|
-struct acct_v3
|
|
-{
|
|
- char ac_flag; /* Flags */
|
|
- char ac_version; /* Always set to ACCT_VERSION */
|
|
- u_int16_t ac_tty; /* Control Terminal */
|
|
- u_int32_t ac_exitcode; /* Exitcode */
|
|
- u_int32_t ac_uid; /* Real User ID */
|
|
- u_int32_t ac_gid; /* Real Group ID */
|
|
- u_int32_t ac_pid; /* Process ID */
|
|
- u_int32_t ac_ppid; /* Parent Process ID */
|
|
- u_int32_t ac_btime; /* Process Creation Time */
|
|
- float ac_etime; /* Elapsed Time */
|
|
- comp_t ac_utime; /* User Time */
|
|
- comp_t ac_stime; /* System Time */
|
|
- comp_t ac_mem; /* Average Memory Usage */
|
|
- comp_t ac_io; /* Chars Transferred */
|
|
- comp_t ac_rw; /* Blocks Read or Written */
|
|
- comp_t ac_minflt; /* Minor Pagefaults */
|
|
- comp_t ac_majflt; /* Major Pagefaults */
|
|
- comp_t ac_swaps; /* Number of Swaps */
|
|
- char ac_comm[ACCT_COMM]; /* Command Name */
|
|
-};
|
|
-
|
|
char *gen_temp_fname(int f_nr)
|
|
{
|
|
char *buffer = (char *)malloc(128);
|