ATOPRC(5)

๐Ÿฆ‹ atoprc(5) โ€” File Formats Manual, but make it group chat ๐Ÿฆ‹

โœจ NAME โœจ

atoprc โ€” the rcfile thatโ€™s related to atop and atopsar

๐Ÿ’– DESCRIPTION ๐Ÿ’–

Okay so this page documents the rcfile for the atop and atopsar commands. Those commands are the ones you use to monitor the system and process load on a Linux system. ๐Ÿ’ปโœจ

The atoprc file holds the default settings. Theyโ€™re read during startup, first from the system-wide rcfile /etc/atoprc and after that from the user-specific rcfile ~/.atoprc โ€” so system-wide settings can be overruled by an individual user. The options in both rcfiles are identical. Periodt. ๐Ÿ’…

๐ŸŒˆ OPTIONS ๐ŸŒˆ

The rcfile contains keyword-value pairs, one on every line (blank lines and lines starting with a #-sign are ignored). The following keywords can be specified:

  • flags โ€” you can define a list of default flags for atop here. The allowed flags are t, B, H, G, 2 till 9, g, m, d, n, u, p, s, c, v, C, M, D, N, A, a, y, Y, f, F, R, 1, e, E and x. ๐Ÿšฉ
  • twindir โ€” the default absolute path name of the temporary directory in which the twin file should be allocated. ๐Ÿ“
  • interval โ€” the default interval value in seconds. โฑ๏ธ
  • linelen โ€” the length of a screen line when sending output to a file or pipe (default 80). ๐Ÿ“
  • username โ€” regular expression or one numerical UID to select the users for which (active) processes will be shown. ๐Ÿซถ
  • procname โ€” the default regular expression for the process names to be shown. ๐Ÿ”
  • maxlinecpu โ€” the maximum number of active CPUs that will be shown. ๐Ÿง 
  • maxlinegpu โ€” the maximum number of active GPUs that will be shown. ๐ŸŽฎ
  • maxlinelvm โ€” the maximum number of active logical volumes that will be shown. ๐Ÿ’ฝ
  • maxlinemdd โ€” the maximum number of active multiple devices that will be shown. ๐Ÿงฉ
  • maxlinedisk โ€” the maximum number of active disks that will be shown. ๐Ÿ’พ
  • maxlinenfsm โ€” the maximum number of NFS mounts that will be shown on an NFS client. ๐ŸŒ
  • maxlineintf โ€” the maximum number of active network interfaces that will be shown. ๐Ÿ“ถ
  • maxlinecont โ€” the maximum number of active containers that will be shown. ๐Ÿ“ฆ
  • maxlineifb โ€” the maximum number of Infiniband ports that will be shown. ๐Ÿงต
  • maxlinenuma โ€” the maximum number of NUMA node metrics that will be shown. Notice that two lines are shown for each NUMA node. ๐Ÿง โœจ
  • maxlinellc โ€” the maximum number of lines with LLC metrics that will be shown. ๐ŸงŠ
  • cpucritperc โ€” the busy percentage considered critical for a processor (see section COLORS in the man-page of the atop command). This percentage is used to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿ”ฅ
  • dskcritperc โ€” the busy percentage considered critical for a disk (see section COLORS in the man-page of the atop command). This percentage is used to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿ’ฝ๐Ÿ”ฅ
  • netcritperc โ€” the busy percentage considered critical for a network interface (see section COLORS in the man-page of the atop command). This percentage is used to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿ“ถ๐Ÿ”ฅ
  • memcritperc โ€” the percentage considered critical for memory utilization (see section COLORS in the man-page of the atop command). This percentage is used to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿง ๐Ÿ”ฅ
  • swpcritperc โ€” the occupation percentage considered critical for swap space (see section COLORS in the man-page of the atop command). This percentage is used to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿ”„๐Ÿ”ฅ
  • swoutcritsec โ€” the number of pages swapped out per second considered critical for memory utilization (see section COLORS in the man-page of the atop command). This threshold is used in combination with memcritperc to determine a weighted percentage for line coloring and sorting of active processes in text mode. When this value is zero, no line coloring or automatic sorting is performed for this resource. ๐Ÿ“ค๐Ÿ”ฅ
  • almostcrit โ€” a percentage of the critical percentage to determine if the resource is almost critical (see section COLORS in the man-page of the atop command). When this value is zero, no line coloring for almost critical is performed. ๐ŸŸก
  • cpubarwidth โ€” number of columns used per bar in the processor bar graph. The default value is 0, which means that the bar width will be scaled automatically (the wider the terminal, the more columns per bar up to a maximum of three). With the value 1, 2 or 3 the number of bars can be statically pinned to that number of columns, with one column of white space in between the bars. ๐Ÿ“Š
  • colorinfo โ€” definition of color name for information messages (default: green) in text mode. Allowed colors are: red green yellow blue magenta cyan black white. ๐Ÿ’š
  • colorthread โ€” definition of color name for thread-specific lines when using the y option (default: yellow). Allowed colors are: red green yellow blue magenta cyan black white. ๐Ÿงต
  • coloralmost โ€” definition of color name for almost critical resources (default: cyan) in text mode. Allowed colors are: red green yellow blue magenta cyan black white. ๐Ÿฉต
  • colorcritical โ€” definition of color name for critical resources (default: red) in text mode. Allowed colors are: red green yellow blue magenta cyan black white. โค๏ธ
  • atopsarflags โ€” you can define a list of default flags for atopsar here. The allowed flags are S, x, C, M, H, a, A and the flags to select one or more specific reports. ๐ŸŽ›๏ธ
  • perfevents โ€” defines whether or not the CPU cycle counter should be retrieved by atop via the perf counters. The values auto (default), enable or disable can be specified. In case of auto, the CPU cycle counter will not be retrieved on virtual machines due to the overhead of reading this counter in a guest. โšก
  • pacctdir โ€” the name of the topdirectory used by the atopacctd daemon. In this directory, the daemon creates a subdirectory pacct_shadow.d in which files will be written containing the process accounting records. The default topdirectory is /var/run, and this option only has to be specified when the atopacctd daemon is started with an alternative topdirectory as command line argument. This option can only be specified in the /etc/atoprc file (on system level)! ๐Ÿšจ

An example of the /etc/atoprc or ~/.atoprc file:

flags         Aaf
interval      5
username
procname
maxlinecpu    4
maxlinedisk   10
maxlineintf   5
cpucritperc   80
almostcrit    90
atopsarflags  CMH
ownprocline   PID:50 VGROW:40 RGROW:45 COMMAND-LINE:50
ownpagline    PAGSCAN:3 BLANKBOX:0 PAGSWIN:3 PAGSWOUT:7

The keywords ownprocline and ownpagline are explained in the subsequent section.

๐Ÿ’– OWN DEFINITION OF OUTPUT LINE ๐Ÿ’–

okay so this is the part where you literally get to be the designer, bestie. through the rcfile you can lay out the output lines yourself โ€” like, define the layout of one line with process info using the keyword ownprocline (you pick it with the key o or the flag -o), and you can also redefine all the lines with system info. full creative control, no cap. โœจ

the layout of an output line goes like this (and heads up โ€” this should be specified as one line in the rcfile):

keyword   <columnid>:<prio> [<columnid>:<prio> ...]

The columnid is the symbolic name of a column that should be shown at this position in the output line.

The prio is a positive integer value that determines which columns have precedence whenever not all specified columns fit into the current screen-width. the higher the value, the higher the priority. ๐Ÿ’…

the column-specifications should be separated by a space. the order in which columns have been specified is the order in which they will be shown, with respect to their priority (columns that do not fit will be dropped dynamically โ€” they get ghosted, basically ๐Ÿซฅ).

a special columnid for system lines is BLANKBOX. this indicates that an empty column is required at this position. also this special columnid is followed by a priority (usually low).


the process-info one ๐ŸŽ€

the following definition can be specified for process information:

ownprocline

the columnids are the names of the columns that are shown in the normal output of the process-related lines that are shown by atop, such as 'PID', 'CMD', 'S', ... The only exception is the special columnid 'SORTITEM' that is used to show one of the columns CPU%/DSK%/MEM%/NET%, depending on the chosen sort-criterium.

an example of a user-defined process line:

ownprocline   PID:20 PPID:10 SYSCPU:15 USRCPU:15 VGROW:14
VSIZE:12 RGROW:14 RSIZE:12 ST:8 EXC:7 S:11 SORTITEM:18 CMD:20

the system lines, aka atop's built-in glow-up ๐ŸŒˆ

the following definitions are used internally by atop as the default system lines (and yes, you can redefine each of them in the rcfile as one line โ€” go off):

ownsysprcline

redefinition of line labeled with 'PRC':

ownsysprcline   PRCSYS:8 PRCUSER:8 BLANKBOX:0 PRCNPROC:7
PRCNZOMBIE:5 PRCCLONES:4 BLANKBOX:0 PRCNNEXIT:6

ownallcpuline

redefinition of line labeled with 'CPU' for total CPU-utilization:

ownallcpuline   CPUSYS:8 CPUUSER:7 CPUIRQ:4 BLANKBOX:0 CPUIDLE:5
CPUWAIT:6 BLANKBOX:0 CPUSTEAL:1 CPUGUEST:3

ownonecpuline

redefinition of line labeled with 'CPU' for utilization of one CPU:

ownonecpuline   CPUISYS:8 CPUIUSER:7 CPUIIRQ:4 BLANKBOX:0
CPUIIDLE:5 CPUIWAIT:6 BLANKBOX:0 CPUISTEAL:1 CPUIGUEST:3

owncplline

redefinition of line labeled with 'CPL':

owncplline   CPLAVG1:4 CPLAVG5:3 CPLAVG15:2 BLANKBOX:0 CPLCSW:6
CPLINTR:5 BLANKBOX:0 CPLNUMCPU:1

ownmemline

redefinition of line labeled with 'MEM':

ownmemline   MEMTOT:2 MEMFREE:5 MEMCACHE:3 MEMDIRTY:1
MEMBUFFER:3 MEMSLAB:3 BLANKBOX:0 BLANKBOX:0 BLANKBOX:0
BLANKBOX:0

ownswpline

redefinition of line labeled with 'SWP':

ownswpline   SWPTOT:3 SWPFREE:4 BLANKBOX:0 BLANKBOX:0 BLANKBOX:0
BLANKBOX:0 BLANKBOX:0 BLANKBOX:0 SWPCOMMITTED:5 SWPCOMMITLIM:6

ownpagline

redefinition of line labeled with 'PAG':

ownpagline   PAGSCAN:3 PAGSTALL:1 BLANKBOX:0 PAGSWIN:4
PAGSWOUT:3

owndskline

redefinition of lines labeled with 'LVM', 'MDD' and 'DSK':

owndskline   DSKNAME:8 DSKBUSY:7 DSKNREAD:6 DSKNWRITE:6
DSKKBPERRD:4 DSKKBPERWR:4 DSKMBPERSECRD:5 DSKMBPERSECWR:5
DSKAVQUEUE:1 DSKAVIO:5

ownnettrline

redefinition of line labeled with 'NET' for transport:

ownnettrline   NETTRANSPORT:9 NETTCPI:8 NETTCPO:8 NETUDPI:8
NETUDPO:8 NETTCPACTOPEN:6 NETTCPPASVOPEN:5 NETTCPRETRANS:4
NETTCPINERR:3 NETTCPORESET:20 NETUDPNOPORT:1 NETUDPINERR:3

ownnetnetline

redefinition of line labeled with 'NET' for network:

ownnetnetline   NETNETWORK:5 NETIPI:4 NETIPO:4 NETIPFRW:4
NETIPDELIV:4 BLANKBOX:0 BLANKBOX:0 BLANKBOX:0 NETICMPIN:1
NETICMPOUT:1

ownnetifline

redefinition of line labeled with 'NET' for interfaces:

ownnetifline   NETNAME:8 NETPCKI:7 NETPCKO:7 NETSPEEDIN:6
NETSPEEDOUT:6 NETCOLLIS:3 NETMULTICASTIN:2 NETRCVERR:5
NETSNDERR:5 NETRCVDROP:4 NETSNDDROP:4

the lines above are shown in the order as shown by atop in combination with the -f flag (in a very wide window you should be able to see all of the columns โ€” stretch that terminal, you got this ๐Ÿ–ฅ๏ธโœจ).


๐ŸŒธ SEE ALSO ๐ŸŒธ

atop(1), atopsar(1), atopacctd(8), netatop(4), netatopd(8), logrotate(8)

https://www.atoptool.nl


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Gerlof Langeveld (gerlof.langeveld@atoptool.nl) JC van Winkel


and that's the whole page, bestie โ€” you made it to the end ๐ŸŽ‰๐Ÿ’œ this one's from the Linux crew, dated January 2024, ATOPRC(5), and it was literally iconic. go forth and customize your columns. periodt. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from