Syslog PRI calculator
Paste a syslog message, which starts with its priority in angle brackets such as <134>, or type a priority such as 134 or a selector such as local0.info. The page says which facility and severity the PRI holds, and reads the header of RFC 5424 and RFC 3164 messages. Pick a facility and a severity to build a PRI. It reads the text in your browser.
How the PRI is made
Every syslog message starts with its priority in angle brackets, the PRI. The number in it is the facility times 8, plus the severity. So the facility is the number divided by 8, and the severity is what is left over. A PRI goes from 0 to 191: 24 facilities of 8 severities each. RFC 5424 does not allow a leading zero, except in <0>.
Two examples from RFC 5424: <34> is facility 4 (security and authorization messages) with severity 2 (critical), and <165> is facility 20 (local4) with severity 5 (notice). In an RFC 5424 message the PRI is followed by the version, 1, and a timestamp such as 2003-10-11T22:14:15.003Z. The older RFC 3164 format follows it with a timestamp such as Oct 11 22:14:15, then the host name.
Facilities
The facility says which part of the system sent the message. The names are those of the IANA registry. The keyword is the name syslog.h and syslog configuration files use. For 12 to 14 the C library defines no name, and the keywords are rsyslog's; 16 to 23 are for local use.
| Code | Keyword | Facility | PRI |
|---|---|---|---|
| 0 | kern | kernel messages | 0 to 7 |
| 1 | user | user-level messages | 8 to 15 |
| 2 | mail | mail system | 16 to 23 |
| 3 | daemon | system daemons | 24 to 31 |
| 4 | auth | security/authorization messages | 32 to 39 |
| 5 | syslog | messages generated internally by syslogd | 40 to 47 |
| 6 | lpr | line printer subsystem | 48 to 55 |
| 7 | news | network news subsystem | 56 to 63 |
| 8 | uucp | UUCP subsystem | 64 to 71 |
| 9 | cron | clock daemon | 72 to 79 |
| 10 | authpriv | security/authorization messages | 80 to 87 |
| 11 | ftp | FTP daemon | 88 to 95 |
| 12 | ntp rsyslog | NTP subsystem | 96 to 103 |
| 13 | bsd_security rsyslog | log audit | 104 to 111 |
| 14 | console rsyslog | log alert | 112 to 119 |
| 15 | clock daemon | 120 to 127 | |
| 16 | local0 | local use 0 (local0) | 128 to 135 |
| 17 | local1 | local use 1 (local1) | 136 to 143 |
| 18 | local2 | local use 2 (local2) | 144 to 151 |
| 19 | local3 | local use 3 (local3) | 152 to 159 |
| 20 | local4 | local use 4 (local4) | 160 to 167 |
| 21 | local5 | local use 5 (local5) | 168 to 175 |
| 22 | local6 | local use 6 (local6) | 176 to 183 |
| 23 | local7 | local use 7 (local7) | 184 to 191 |
Severities
The severity says how serious the message is: 0 is the most serious, 7 the least.
| Code | Keyword | Severity |
|---|---|---|
| 0 | emerg | Emergency: system is unusable |
| 1 | alert | Alert: action must be taken immediately |
| 2 | crit | Critical: critical conditions |
| 3 | err | Error: error conditions |
| 4 | warning | Warning: warning conditions |
| 5 | notice | Notice: normal but significant condition |
| 6 | info | Informational: informational messages |
| 7 | debug | Debug: debug-level messages |
All 192 PRI values
Each row is a facility and each column a severity. Select a number to read it above.
| Facility | 0 emerg | 1 alert | 2 crit | 3 err | 4 warning | 5 notice | 6 info | 7 debug |
|---|---|---|---|---|---|---|---|---|
| 0 kern | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 1 user | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 2 mail | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 3 daemon | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| 4 auth | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
| 5 syslog | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
| 6 lpr | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
| 7 news | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
| 8 uucp | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
| 9 cron | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
| 10 authpriv | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
| 11 ftp | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
| 12 ntp | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
| 13 bsd_security | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
| 14 console | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
| 15 clock | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
| 16 local0 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 |
| 17 local1 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 |
| 18 local2 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 |
| 19 local3 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 |
| 20 local4 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 |
| 21 local5 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 |
| 22 local6 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 |
| 23 local7 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 |
Sources
- Facility and severity names: the syslog parameters registry of IANA, from RFC 5424, The Syslog Protocol. The rule for the PRI, the version and the examples: RFC 5424, sections 6.2.1, 6.2.2 and 6.5.
- Keywords: syslog.h of the GNU C Library, and the facility names rsyslog accepts.
- The RFC 3164 header: RFC 3164, The BSD syslog Protocol, which RFC 5424 replaces.
More Logs tools
-
Access log checker
Find the exploit requests in a web server log and the addresses that sent them.
-
Windows security event ID lookup
Look up 4740, 4625, 4728, 1102 or any other Security log event: its meaning, audit setting and criticality.
-
Event log query builder
Pick a log, event IDs, levels and a time span: the XPath, the custom view XML and the Get-WinEvent command.
-
auditpol command builder
Choose what each audit subcategory logs, or start from Microsoft's baseline: the auditpol commands, with GUIDs.
-
Sysmon event ID lookup
Every Sysmon event ID with its filter tag and fields, and a reader for an event pasted from Event Viewer.
-
Windows Firewall log reader
Open pfirewall.log: its lines as a table, the drops by port and address, and the commands that turn logging on.
-
Schannel and TLS alert code lookup
Read Schannel events 36887 and 36888 and TLS alerts such as 40, 46, 48 and 70.
-
IIS status codes and log line reader
Look up 500.19, 403.14 or any other IIS status and substatus, or read W3C log lines field by field.
-
Timestamp converter
Unix seconds and milliseconds, FILETIME, Chrome, Apple, Excel and MS-DOS dates to a date, and back.
-
Scanner watch
What attack tools ask of this site's web server: the addresses, the paths and the networks, rebuilt each day.