"Fossies" - the Fresh Open Source Software Archive 
Member "atop-2.8.1/atopacctd.h" (7 Jan 2023, 2338 Bytes) of package /linux/misc/atop-2.8.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "atopacctd.h" see the
Fossies "Dox" file reference documentation and the last
Fossies "Diffs" side-by-side code changes report:
2.6.0_vs_2.7.0.
1 /*
2 ** ATOP - System & Process Monitor
3 **
4 ** The program 'atop' offers the possibility to view the activity of
5 ** the system on system-level as well as process-level.
6 ** ==========================================================================
7 ** Author: Gerlof Langeveld
8 ** E-mail: gerlof.langeveld@atoptool.nl
9 ** Date: September 2002
10 ** --------------------------------------------------------------------------
11 ** Copyright (C) 2000-2010 Gerlof Langeveld
12 **
13 ** This program is free software; you can redistribute it and/or modify it
14 ** under the terms of the GNU General Public License as published by the
15 ** Free Software Foundation; either version 2, or (at your option) any
16 ** later version.
17 **
18 ** This program is distributed in the hope that it will be useful, but
19 ** WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 ** See the GNU General Public License for more details.
22 **
23 ** You should have received a copy of the GNU General Public License
24 ** along with this program; if not, write to the Free Software
25 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 ** --------------------------------------------------------------------------
27 */
28
29 /*
30 ** keys to access the semaphores
31 */
32 #define PACCTPUBKEY 1071980 // # clients using shadow files
33 #define PACCTPRVKEY (PACCTPUBKEY-1) // # atopacctd daemons busy (max. 1)
34
35 /*
36 ** name of the PID file
37 */
38 #define PIDFILE "/var/run/atopacctd.pid"
39
40 /*
41 ** directory containing the source accounting file and
42 ** the subdirectory (PACCTSHADOWD) containing the shadow file(s)
43 ** this directory can be overruled by a command line parameter (atopacctd)
44 ** or by a keyword in the /etc/atoprc file (atop)
45 */
46 #define PACCTDIR "/var/run"
47
48 /*
49 ** accounting file (source file to which kernel writes records)
50 */
51 #define PACCTORIG "pacct_source" // file name in PACCTDIR
52
53 #define MAXORIGSZ (1024*1024) // maximum size of source file
54
55 /*
56 ** file and directory names for shadow files
57 */
58 #define PACCTSHADOWD "pacct_shadow.d" // directory name in PACCTDIR
59 #define PACCTSHADOWF "%s/%s/%010ld.paf" // file name of shadow file
60 #define PACCTSHADOWC "current" // file containining current
61 // sequence and MAXSHADOWREC
62
63 #define MAXSHADOWREC 10000 // number of accounting records per shadow file