Workflow Tools Control Yard

Home / Logs

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.

CodeKeywordFacilityPRI
0kernkernel messages0 to 7
1useruser-level messages8 to 15
2mailmail system16 to 23
3daemonsystem daemons24 to 31
4authsecurity/authorization messages32 to 39
5syslogmessages generated internally by syslogd40 to 47
6lprline printer subsystem48 to 55
7newsnetwork news subsystem56 to 63
8uucpUUCP subsystem64 to 71
9cronclock daemon72 to 79
10authprivsecurity/authorization messages80 to 87
11ftpFTP daemon88 to 95
12ntp rsyslogNTP subsystem96 to 103
13bsd_security rsysloglog audit104 to 111
14console rsysloglog alert112 to 119
15clock daemon120 to 127
16local0local use 0 (local0)128 to 135
17local1local use 1 (local1)136 to 143
18local2local use 2 (local2)144 to 151
19local3local use 3 (local3)152 to 159
20local4local use 4 (local4)160 to 167
21local5local use 5 (local5)168 to 175
22local6local use 6 (local6)176 to 183
23local7local use 7 (local7)184 to 191

Severities

The severity says how serious the message is: 0 is the most serious, 7 the least.

CodeKeywordSeverity
0emergEmergency: system is unusable
1alertAlert: action must be taken immediately
2critCritical: critical conditions
3errError: error conditions
4warningWarning: warning conditions
5noticeNotice: normal but significant condition
6infoInformational: informational messages
7debugDebug: debug-level messages

All 192 PRI values

Each row is a facility and each column a severity. Select a number to read it above.

Facility0 emerg1 alert2 crit3 err4 warning5 notice6 info7 debug
0 kern01234567
1 user89101112131415
2 mail1617181920212223
3 daemon2425262728293031
4 auth3233343536373839
5 syslog4041424344454647
6 lpr4849505152535455
7 news5657585960616263
8 uucp6465666768697071
9 cron7273747576777879
10 authpriv8081828384858687
11 ftp8889909192939495
12 ntp96979899100101102103
13 bsd_security104105106107108109110111
14 console112113114115116117118119
15 clock120121122123124125126127
16 local0128129130131132133134135
17 local1136137138139140141142143
18 local2144145146147148149150151
19 local3152153154155156157158159
20 local4160161162163164165166167
21 local5168169170171172173174175
22 local6176177178179180181182183
23 local7184185186187188189190191

Sources

More Logs tools