Syslog Priority Calculator

Work out the syslog PRI value from a facility and a severity level, or decode a PRI number back into its facility and severity. The PRI is the number shown in angle brackets at the start of a syslog message.

1 Fill in the boxes

2 Your answer

Your answer shows here as you type.

How to use the Syslog Priority Calculator

  1. Pick a facility, which is the program or subsystem that sent the message.
  2. Pick a severity level from emerg (0) to debug (7).
  3. Read the PRI and the message header, or type a PRI value to decode it into facility and severity.

Frequently asked questions

How is the syslog PRI value calculated?

PRI = facility × 8 + severity. For example, facility 4 (auth) with severity 2 (crit) gives 4 × 8 + 2 = 34, which appears as <34> at the start of the message.

What are the syslog severity levels?

The eight levels from RFC 5424 are 0 emerg, 1 alert, 2 crit, 3 err, 4 warning, 5 notice, 6 info and 7 debug. Lower numbers are more serious.

What is the range of valid PRI values?

Facilities run from 0 to 23 and severities from 0 to 7, so PRI runs from 0 to 191. The largest value is local7 with debug, which is 23 × 8 + 7 = 191.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.