{
    "content": [
        {
            "type": "text",
            "text": "# systemd.journal-fields(7) (man)\n\n**Summary:** systemd.journal-fields - Special journal fields\n\n## See Also\n\n- systemd(1)\n- systemd-journald.service(8)\n- journalctl(1)\n- journald.conf(5)\n- sd-journal(3)\n- coredumpctl(1)\n- systemd.directives(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (7 lines)\n- **USER JOURNAL FIELDS** (69 lines)\n- **TRUSTED JOURNAL FIELDS** (92 lines)\n- **KERNEL JOURNAL FIELDS** (23 lines)\n- **FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM** (24 lines)\n- **ADDRESS FIELDS** (23 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (9 lines)\n\n## Full Content\n\n### NAME\n\nsystemd.journal-fields - Special journal fields\n\n### DESCRIPTION\n\nEntries in the journal (as written by systemd-journald.service(8)) resemble a UNIX process\nenvironment block in syntax but with fields that may include binary data. Primarily, fields\nare formatted UTF-8 text strings, and binary encoding is used only where formatting as UTF-8\ntext strings makes little sense. New fields may freely be defined by applications, but a few\nfields have special meanings. All fields with special meanings are optional. In some cases,\nfields may appear more than once per entry.\n\n### USER JOURNAL FIELDS\n\nUser fields are fields that are directly passed from clients and stored in the journal.\n\nMESSAGE=\nThe human-readable message string for this entry. This is supposed to be the primary text\nshown to the user. It is usually not translated (but might be in some cases), and is not\nsupposed to be parsed for metadata.\n\nMESSAGEID=\nA 128-bit message identifier ID for recognizing certain message types, if this is\ndesirable. This should contain a 128-bit ID formatted as a lower-case hexadecimal string,\nwithout any separating dashes or suchlike. This is recommended to be a UUID-compatible\nID, but this is not enforced, and formatted differently. Developers can generate a new ID\nfor this purpose with systemd-id128 new.\n\nPRIORITY=\nA priority value between 0 (\"emerg\") and 7 (\"debug\") formatted as a decimal string. This\nfield is compatible with syslog's priority concept.\n\nCODEFILE=, CODELINE=, CODEFUNC=\nThe code location generating this message, if known. Contains the source filename, the\nline number and the function name.\n\nERRNO=\nThe low-level Unix error number causing this entry, if any. Contains the numeric value of\nerrno(3) formatted as a decimal string.\n\nINVOCATIONID=, USERINVOCATIONID=\nA randomized, unique 128-bit ID identifying each runtime cycle of the unit. This is\ndifferent from SYSTEMDINVOCATIONID in that it is only used for messages coming from\nsystemd code (e.g. logs from the system/user manager or from forked processes performing\nsystemd-related setup).\n\nSYSLOGFACILITY=, SYSLOGIDENTIFIER=, SYSLOGPID=, SYSLOGTIMESTAMP=\nSyslog compatibility fields containing the facility (formatted as decimal string), the\nidentifier string (i.e. \"tag\"), the client PID, and the timestamp as specified in the\noriginal datagram. (Note that the tag is usually derived from glibc's\nprograminvocationshortname variable, see programinvocationshortname(3).)\n\nNote that the journal service does not validate the values of any structured journal\nfields whose name is not prefixed with an underscore, and this includes any syslog\nrelated fields such as these. Hence, applications that supply a facility, PID, or log\nlevel are expected to do so properly formatted, i.e. as numeric integers formatted as\ndecimal strings.\n\nSYSLOGRAW=\nThe original contents of the syslog line as received in the syslog datagram. This field\nis only included if the MESSAGE= field was modified compared to the original payload or\nthe timestamp could not be located properly and is not included in SYSLOGTIMESTAMP=.\nMessage truncation occurs when when the message contains leading or trailing whitespace\n(trailing and leading whitespace is stripped), or it contains an embedded NUL byte (the\nNUL byte and anything after it is not included). Thus, the original syslog line is either\nstored as SYSLOGRAW= or it can be recreated based on the stored priority and facility,\ntimestamp, identifier, and the message payload in MESSAGE=.\n\nDOCUMENTATION=\nA documentation URL with further information about the topic of the log message. Tools\nsuch as journalctl will include a hyperlink to an URL specified this way in their output.\nShould be an \"http://\", \"https://\", \"file:/\", \"man:\" or \"info:\" URL.\n\nTID=\nThe numeric thread ID (TID) the log message originates from.\n\nUNIT=, USERUNIT=\nThe name of a unit. Used by the system and user managers when logging about specific\nunits.\n\nWhen --unit=name or --user-unit=name are used with journalctl(1), a match pattern that\nincludes \"UNIT=name.service\" or \"USERUNIT=name.service\" will be generated.\n\n### TRUSTED JOURNAL FIELDS\n\nFields prefixed with an underscore are trusted fields, i.e. fields that are implicitly added\nby the journal and cannot be altered by client code.\n\nPID=, UID=, GID=\nThe process, user, and group ID of the process the journal entry originates from\nformatted as a decimal string. Note that entries obtained via \"stdout\" or \"stderr\" of\nforked processes will contain credentials valid for a parent process (that initiated the\nconnection to systemd-journald).\n\nCOMM=, EXE=, CMDLINE=\nThe name, the executable path, and the command line of the process the journal entry\noriginates from.\n\nCAPEFFECTIVE=\nThe effective capabilities(7) of the process the journal entry originates from.\n\nAUDITSESSION=, AUDITLOGINUID=\nThe session and login UID of the process the journal entry originates from, as maintained\nby the kernel audit subsystem.\n\nSYSTEMDCGROUP=, SYSTEMDSLICE=, SYSTEMDUNIT=, SYSTEMDUSERUNIT=, SYSTEMDUSERSLICE=,\nSYSTEMDSESSION=, SYSTEMDOWNERUID=\nThe control group path in the systemd hierarchy, the systemd slice unit name, the systemd\nunit name, the unit name in the systemd user manager (if any), the systemd session ID (if\nany), and the owner UID of the systemd user unit or systemd session (if any) of the\nprocess the journal entry originates from.\n\nSELINUXCONTEXT=\nThe SELinux security context (label) of the process the journal entry originates from.\n\nSOURCEREALTIMETIMESTAMP=\nThe earliest trusted timestamp of the message, if any is known that is different from the\nreception time of the journal. This is the time in microseconds since the epoch UTC,\nformatted as a decimal string.\n\nBOOTID=\nThe kernel boot ID for the boot the message was generated in, formatted as a 128-bit\nhexadecimal string.\n\nMACHINEID=\nThe machine ID of the originating host, as available in machine-id(5).\n\nSYSTEMDINVOCATIONID=\nThe invocation ID for the runtime cycle of the unit the message was generated in, as\navailable to processes of the unit in $INVOCATIONID (see systemd.exec(5)).\n\nHOSTNAME=\nThe name of the originating host.\n\nTRANSPORT=\nHow the entry was received by the journal service. Valid transports are:\n\naudit\nfor those read from the kernel audit subsystem\n\ndriver\nfor internally generated messages\n\nsyslog\nfor those received via the local syslog socket with the syslog protocol\n\njournal\nfor those received via the native journal protocol\n\nstdout\nfor those read from a service's standard output or error output\n\nkernel\nfor those read from the kernel\n\nSTREAMID=\nOnly applies to \"TRANSPORT=stdout\" records: specifies a randomized 128bit ID assigned to\nthe stream connection when it was first created. This ID is useful to reconstruct\nindividual log streams from the log records: all log records carrying the same stream ID\noriginate from the same stream.\n\nLINEBREAK=\nOnly applies to \"TRANSPORT=stdout\" records: indicates that the log message in the\nstandard output/error stream was not terminated with a normal newline character (\"\\n\",\ni.e. ASCII 10). Specifically, when set this field is one of nul (in case the line was\nterminated by a NUL byte), line-max (in case the maximum log line length was reached, as\nconfigured with LineMax= in journald.conf(5)), eof (if this was the last log record of a\nstream and the stream ended without a final newline character), or pid-change (if the\nprocess which generated the log output changed in the middle of a line). Note that this\nrecord is not generated when a normal newline character was used for marking the log line\nend.\n\nNAMESPACE=\nIf this file was written by a systemd-journald instance managing a journal namespace that\nis not the default, this field contains the namespace identifier. See systemd-\njournald.service(8) for details about journal namespaces.\n\n### KERNEL JOURNAL FIELDS\n\nKernel fields are fields that are used by messages originating in the kernel and stored in\nthe journal.\n\nKERNELDEVICE=\nThe kernel device name. If the entry is associated to a block device, contains the major\nand minor numbers of the device node, separated by \":\" and prefixed by \"b\". Similarly for\ncharacter devices, but prefixed by \"c\". For network devices, this is the interface index\nprefixed by \"n\". For all other devices, this is the subsystem name prefixed by \"+\",\nfollowed by \":\", followed by the kernel device name.\n\nKERNELSUBSYSTEM=\nThe kernel subsystem name.\n\nUDEVSYSNAME=\nThe kernel device name as it shows up in the device tree below /sys/.\n\nUDEVDEVNODE=\nThe device node path of this device in /dev/.\n\nUDEVDEVLINK=\nAdditional symlink names pointing to the device node in /dev/. This field is frequently\nset more than once per entry.\n\n### FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM\n\nFields in this section are used by programs to specify that they are logging on behalf of\nanother program or unit.\n\nFields used by the systemd-coredump coredump kernel helper:\n\nCOREDUMPUNIT=, COREDUMPUSERUNIT=\nUsed to annotate messages containing coredumps from system and session units. See\ncoredumpctl(1).\n\nPrivileged programs (currently UID 0) may attach OBJECTPID= to a message. This will instruct\nsystemd-journald to attach additional fields on behalf of the caller:\n\nOBJECTPID=PID\nPID of the program that this message pertains to.\n\nOBJECTUID=, OBJECTGID=, OBJECTCOMM=, OBJECTEXE=, OBJECTCMDLINE=, OBJECTAUDITSESSION=,\nOBJECTAUDITLOGINUID=, OBJECTSYSTEMDCGROUP=, OBJECTSYSTEMDSESSION=,\nOBJECTSYSTEMDOWNERUID=, OBJECTSYSTEMDUNIT=, OBJECTSYSTEMDUSERUNIT=\nThese are additional fields added automatically by systemd-journald. Their meaning is the\nsame as UID=, GID=, COMM=, EXE=, CMDLINE=, AUDITSESSION=, AUDITLOGINUID=,\nSYSTEMDCGROUP=, SYSTEMDSESSION=, SYSTEMDUNIT=, SYSTEMDUSERUNIT=, and\nSYSTEMDOWNERUID= as described above, except that the process identified by PID is\ndescribed, instead of the process which logged the message.\n\n### ADDRESS FIELDS\n\nDuring serialization into external formats, such as the Journal Export Format[1] or the\nJournal JSON Format[2], the addresses of journal entries are serialized into fields prefixed\nwith double underscores. Note that these are not proper fields when stored in the journal but\nfor addressing metadata of entries. They cannot be written as part of structured log entries\nvia calls such as sdjournalsend(3). They may also not be used as matches for\nsdjournaladdmatch(3).\n\nCURSOR=\nThe cursor for the entry. A cursor is an opaque text string that uniquely describes the\nposition of an entry in the journal and is portable across machines, platforms and\njournal files.\n\nREALTIMETIMESTAMP=\nThe wallclock time (CLOCKREALTIME) at the point in time the entry was received by the\njournal, in microseconds since the epoch UTC, formatted as a decimal string. This has\ndifferent properties from \"SOURCEREALTIMETIMESTAMP=\", as it is usually a bit later but\nmore likely to be monotonic.\n\nMONOTONICTIMESTAMP=\nThe monotonic time (CLOCKMONOTONIC) at the point in time the entry was received by the\njournal in microseconds, formatted as a decimal string. To be useful as an address for\nthe entry, this should be combined with the boot ID in \"BOOTID=\".\n\n### SEE ALSO\n\nsystemd(1), systemd-journald.service(8), journalctl(1), journald.conf(5), sd-journal(3),\ncoredumpctl(1), systemd.directives(7)\n\n### NOTES\n\n1. Journal Export Format\nhttps://systemd.io/JOURNALEXPORTFORMATS#journal-export-format\n\n2. Journal JSON Format\nhttps://systemd.io/JOURNALEXPORTFORMATS#journal-json-format\n\n\n\nsystemd 249                                                                SYSTEMD.JOURNAL-FIELDS(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "systemd.journal-fields",
        "section": "7",
        "mode": "man",
        "summary": "systemd.journal-fields - Special journal fields",
        "synopsis": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemd-journald.service",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-journald.service/8/json"
            },
            {
                "name": "journalctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/journalctl/1/json"
            },
            {
                "name": "journald.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/journald.conf/5/json"
            },
            {
                "name": "sd-journal",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/sd-journal/3/json"
            },
            {
                "name": "coredumpctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/coredumpctl/1/json"
            },
            {
                "name": "systemd.directives",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "USER JOURNAL FIELDS",
                "lines": 69,
                "subsections": []
            },
            {
                "name": "TRUSTED JOURNAL FIELDS",
                "lines": 92,
                "subsections": []
            },
            {
                "name": "KERNEL JOURNAL FIELDS",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "ADDRESS FIELDS",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}