zdump

title: zdump(8)

summary: timezone dumper

text:
# zdump(8)

## NAME
zdump - timezone dumper

## SYNOPSIS
zdump [ option ... ] [ timezone ... ]

## DESCRIPTION
The zdump program prints the current time in each timezone named on the command line.

## OPTIONS
--version

Output version information and exit.

--help

Output short usage message and exit.

-i

Output a description of time intervals. For each timezone on the command line, output an interval-format description of the timezone. See “INTERVAL FORMAT” below.

-v

Output a verbose description of time intervals. For each timezone on the command line, print the times at the two extreme time values, the times (if present) at and just beyond the boundaries of years that localtime(3) and gmtime(3) can represent, and the times both one second before and exactly at each detected time discontinuity. Each line is followed by isdst=D where D is positive, zero, or negative depending on whether the given time is daylight saving time, standard time, or an unknown time type, respectively. Each line is also followed by gmtoff=N if the given local time is known to be N seconds east of Greenwich.

-V

Like -v, except omit output concerning extreme time and year values. This generates output that is easier to compare to that of implementations with different time representations.

-c [loyear,]hiyear

Cut off interval output at the given year(s). Cutoff times are computed using the proleptic Gregorian calendar with year 0 and with Universal Time (UT) ignoring leap seconds. Cutoffs are at the start of each year, where the lower-bound timestamp is inclusive and the upper is exclusive; for example, -c 1970,2070 selects transitions on or after 1970-01-01 00:00:00 UTC and before 2070-01-01 00:00:00 UTC. The default cutoff is -500,2500.

-t [lotime,]hitime

Cut off interval output at the given time(s), given in decimal seconds since 1970-01-01 00:00:00 Coordinated Universal Time (UTC). The timezone determines whether the count includes leap seconds. As with -c, the cutoff's lower bound is inclusive and its upper bound is exclusive.

## INTERVAL FORMAT
The interval format is a compact text representation that is intended to be both human- and machine-readable. It consists of an empty line, then a line “TZ=string” where string is a double-quoted string giving the timezone, a second line “- - interval” describing the time interval before the first transition if any, and zero or more following lines “date time interval”, one line for each transition time and following interval. Fields are separated by single tabs.

Dates are in yyyy-mm-dd format and times are in 24-hour hh:mm:ss format where hh<24. Times are in local time immediately after the transition. A time interval description consists of a UT offset in signed ±hhmmss format, a time zone abbreviation, and an isdst flag. An abbreviation that equals the UT offset is omitted; other abbreviations are double-quoted strings unless they consist of one or more alphabetic characters. An isdst flag is omitted for standard time, and otherwise is a decimal integer that is unsigned and positive (typically 1) for daylight saving time and negative for unknown.

In times and in UT offsets with absolute value less than 100 hours, the seconds are omitted if they are zero, and the minutes are also omitted if they are also zero. Positive UT offsets are east of Greenwich. The UT offset -00 denotes a UT placeholder in areas where the actual offset is unspecified; by convention, this occurs when the UT offset is zero and the time zone abbreviation begins with “-” or is “zzz”.

In double-quoted strings, escape sequences represent unusual characters. The escape sequences are \s for space, and \", \\, \f, \n, \r, \t, and \v with their usual meaning in the C programming language. E.g., the double-quoted string “"CET\s\"\\"” represents the character sequence “CET "\”.

Here is an example of the output, with the leading empty line omitted. (This example is shown with tab stops set far enough apart so that the tabbed columns line up.)

```
TZ="Pacific/Honolulu"
-	-	-103126	LMT
1896-01-13	12:01:26	-1030	HST
1933-04-30	03	-0930	HDT	1
1933-05-21	11	-1030	HST
1942-02-09	03	-0930	HWT	1
1945-08-14	13:30	-0930	HPT	1
1945-09-30	01	-1030	HST
1947-06-08	02:30	-10	HST
```

Here, local time begins 10 hours, 31 minutes and 26 seconds west of UT, and is a standard time abbreviated LMT. Immediately after the first transition, the date is 1896-01-13 and the time is 12:01:26, and the following time interval is 10.5 hours west of UT, a standard time abbreviated HST. Immediately after the second transition, the date is 1933-04-30 and the time is 03:00:00 and the following time interval is 9.5 hours west of UT, is abbreviated HDT, and is daylight saving time. Immediately after the last transition the date is 1947-06-08 and the time is 02:30:00, and the following time interval is 10 hours west of UT, a standard time abbreviated HST. Here are excerpts from another example:

```
TZ="Europe/Astrakhan"
-	-	+031212	LMT
1924-04-30	23:47:48	+03
1930-06-21	01	+04
1981-04-01	01	+05		1
1981-09-30	23	+04
...
2014-10-26	01	+03
2016-03-27	03	+04
```

This time zone is east of UT, so its UT offsets are positive. Also, many of its time zone abbreviations are omitted since they duplicate the text of the UT offset.

## LIMITATIONS
Time discontinuities are found by sampling the results returned by localtime(3) at twelve-hour intervals. This works in all real-world cases; one can construct artificial time zones for which this fails.

In the -v and -V output, “UT” denotes the value returned by gmtime(3), which uses UTC for modern timestamps and some other UT flavor for timestamps that predate the introduction of UTC. No attempt is currently made to have the output use “UTC” for newer and “UT” for older timestamps, partly because the exact date of the introduction of UTC is problematic.

## SEE ALSO
tzfile(5), zic(8)


zic

package: man-pages

title: zic(8)

summary: timezone compiler

text:
# zic(8)

## NAME
zic - timezone compiler

## SYNOPSIS
zic [ option ... ] [ filename ... ]

## DESCRIPTION
The zic program reads text from the file(s) named on the command line and creates the timezone information format (TZif) files specified in this input. If a filename is “-”, standard input is read.

## OPTIONS
--version

Output version information and exit.

--help

Output short usage message and exit.

-b bloat

Output backward-compatibility data as specified by bloat. If bloat is fat, generate additional data entries that work around potential bugs or incompatibilities in older software, such as software that mishandles the 64-bit generated data. If bloat is slim, keep the output files small; this can help check for the bugs and incompatibilities. The default is slim, as software that mishandles 64-bit data typically mishandles timestamps after the year 2038 anyway. Also see the -r option for another way to alter output size.

-d directory

Create time conversion information files in the named directory rather than in the standard directory named below.

-l timezone

Use timezone as local time. zic will act as if the input contained a link line of the form Link timezone localtime

If timezone is -, any already-existing link is removed.

-L leapsecondfilename

Read leap second information from the file with the given name. If this option is not used, no leap second information appears in output files.

-p timezone

Use timezone's rules when handling nonstandard TZ strings like "EET-2EEST" that lack transition rules. zic will act as if the input contained a link line of the form Link timezone posixrules

Unless timezone is “-”, this option is obsolete and poorly supported. Among other things it should not be used for timestamps after the year 2037, and it should not be combined with -b slim if timezone's transitions are at standard time or Universal Time (UT) instead of local time.

If timezone is -, any already-existing link is removed.

-r [@lo][/@hi]

Limit the applicability of output files to timestamps in the range from lo (inclusive) to hi (exclusive), where lo and hi are possibly signed decimal counts of seconds since the Epoch (1970-01-01 00:00:00 UTC). Omitted counts default to extreme values. The output files use UT offset 0 and abbreviation “-00” in place of the omitted timestamp data. For example, “zic -r @0” omits data intended for negative timestamps (i.e., before the Epoch), and “zic -r @0/@2147483648” outputs data intended only for nonnegative timestamps that fit into 31-bit signed integers. On platforms with GNU date, “zic -r @$(date +%s)” omits data intended for past timestamps. Although this option typically reduces the output file's size, the size can increase due to the need to represent the timestamp range boundaries, particularly if hi causes a TZif file to contain explicit entries for pre-hi transitions rather than concisely representing them with an extended POSIX TZ string. Also see the -b slim option for another way to shrink output size.

-R @hi

Generate redundant trailing explicit transitions for timestamps that occur less than hi seconds since the Epoch, even though the transitions could be more concisely represented via the extended POSIX TZ string. This option does not affect the represented timestamps. Although it accommodates nonstandard TZif readers that ignore the extended POSIX TZ string, it increases the size of the altered output files.

-t file

When creating local time information, put the configuration link in the named file rather than in the standard location.

-v

Be more verbose, and complain about the following situations:

The input specifies a link to a link, something not supported by some older parsers, including zic itself through release 2022e.

A year that appears in a data file is outside the range of representable years.

A time of 24:00 or more appears in the input. Pre-1998 versions of zic prohibit 24:00, and pre-2007 versions prohibit times greater than 24:00.

A rule goes past the start or end of the month. Pre-2004 versions of zic prohibit this.

A time zone abbreviation uses a %z format. Pre-2015 versions of zic do not support this.

A timestamp contains fractional seconds. Pre-2018 versions of zic do not support this.

The input contains abbreviations that are mishandled by pre-2018 versions of zic due to a longstanding coding bug. These abbreviations include “L” for “Link”, “mi” for “min”, “Sa” for “Sat”, and “Su” for “Sun”.

The output file does not contain all the information about the long-term future of a timezone, because the future cannot be summarized as an extended POSIX TZ string. For example, as of 2023 this problem occurs for Morocco's daylight-saving rules, as these rules are based on predictions for when Ramadan will be observed, something that an extended POSIX TZ string cannot represent.

The output contains data that may not be handled properly by client code designed for older zic output formats. These compatibility issues affect only timestamps before 1970 or after the start of 2038.

The output contains a truncated leap second table, which can cause some older TZif readers to misbehave. This can occur if the -L option is used, and either an Expires line is present or the -r option is also used.

The output file contains more than 1200 transitions, which may be mishandled by some clients. The current reference client supports at most 2000 transitions; pre-2014 versions of the reference client support at most 1200 transitions.

A time zone abbreviation has fewer than 3 or more than 6 characters. POSIX requires at least 3, and requires implementations to support at least 6.

An output file name contains a byte that is not an ASCII letter, “-”, “/”, or “_”; or it contains a file name component that contains more than 14 bytes or that starts with “-”.

## FILES
Input files use the format described in this section; output files use tzfile(5) format.

Input files should be text files, that is, they should be a series of zero or more lines, each ending in a newline byte and containing at most 2048 bytes counting the newline, and without any NUL bytes. The input text's encoding is typically UTF-8 or ASCII; it should have a unibyte representation for the POSIX Portable Character Set (PPCS) ⟨https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html⟩ and the encoding's non-unibyte characters should consist entirely of non-PPCS bytes. Non-PPCS characters typically occur only in comments: although output file names and time zone abbreviations can contain nearly any character, other software will work better if these are limited to the restricted syntax described under the -v option.

Input lines are made up of fields. Fields are separated from one another by one or more white space characters. The white space characters are space, form feed, carriage return, newline, tab, and vertical tab. Leading and trailing white space on input lines is ignored. An unquoted sharp character (#) in the input introduces a comment which extends to the end of the line the sharp character appears on. White space characters and sharp characters may be enclosed in double quotes (") if they're to be used as part of a field. Any line that is blank (after comment stripping) is ignored. Nonblank lines are expected to be of one of three types: rule lines, zone lines, and link lines.

Names must be in English and are case insensitive. They appear in several contexts, and include month and weekday names and keywords such as maximum, only, Rolling, and Zone. A name can be abbreviated by omitting all but an initial prefix; any abbreviation must be unambiguous in context.

A rule line has the form

```
Rule	NAME	FROM	TO	-	IN	ON	AT	SAVE	LETTER/S

For example:

Rule	US	1967	1973	-	Apr	lastSun	2:00w	1:00d	D
```

The fields that make up a rule line are: NAME

Gives the name of the rule set that contains this line. The name must start with a character that is neither an ASCII digit nor “-” nor “+”. To allow for future extensions, an unquoted name should not contain characters from the set “!$%&'()*,/:;<=>?@[\]^`{|}~”. “!$%&'()*,/:;<=>?@[\]^`{|}~”.

FROM

Gives the first year in which the rule applies. Any signed integer year can be supplied; the proleptic Gregorian calendar is assumed, with year 0 preceding year 1. The word minimum (or an abbreviation) means the indefinite past. The word maximum (or an abbreviation) means the indefinite future. Rules can describe times that are not representable as time values, with the unrepresentable times ignored; this allows rules to be portable among hosts with differing time value types.

TO

Gives the final year in which the rule applies. In addition to minimum and maximum (as above), the word only (or an abbreviation) may be used to repeat the value of the FROM field.

-

Is a reserved field and should always contain “-” for compatibility with older versions of zic. It was previously known as the TYPE field, which could contain values to allow a separate script to further restrict in which “types” of years the rule would apply.

IN

Names the month in which the rule takes effect. Month names may be abbreviated.

ON

Gives the day on which the rule takes effect. Recognized forms include:

```
5	the fifth of the month
lastSun	the last Sunday in the month
lastMon	the last Monday in the month
Sun>=8	first Sunday on or after the eighth
Sun<=25	last Sunday on or before the 25th
```

A weekday name (e.g., Sunday) or a weekday name preceded by “last” (e.g., lastSunday) may be abbreviated or spelled out in full. There must be no white space characters within the ON field. The “<=” and “>=” constructs can result in a day in the neighboring month; for example, the IN-ON combination “Oct Sun>=31” stands for the first Sunday on or after October 31, even if that Sunday occurs in November.

AT

Gives the time of day at which the rule takes effect, relative to 00:00, the start of a calendar day. Recognized forms include:

```
2	time in hours
2:00	time in hours and minutes
01:28:14	time in hours, minutes, and seconds
00:19:32.13	time with fractional seconds
12:00	midday, 12 hours after 00:00
15:00	3 PM, 15 hours after 00:00
24:00	end of day, 24 hours after 00:00
260:00	260 hours after 00:00
-2:30	2.5 hours before 00:00
-	equivalent to 0
```

Although zic rounds times to the nearest integer second (breaking ties to the even integer), the fractions may be useful to other applications requiring greater precision. The source format does not specify any maximum precision. Any of these forms may be followed by the letter w if the given time is local or “wall clock” time, s if the given time is standard time without any adjustment for daylight saving, or u (or g or z) if the given time is universal time; in the absence of an indicator, local (wall clock) time is assumed. These forms ignore leap seconds; for example, if a leap second occurs at 00:59:60 local time, “1:00” stands for 3601 seconds after local midnight instead of the usual 3600 seconds. The intent is that a rule line describes the instants when a clock/calendar set to the type of time specified in the AT field would show the specified date and time of day.

SAVE

Gives the amount of time to be added to local standard time when the rule is in effect, and whether the resulting time is standard or daylight saving. This field has the same format as the AT field except with a different set of suffix letters: s for standard time and d for daylight saving time. The suffix letter is typically omitted, and defaults to s if the offset is zero and to d otherwise. Negative offsets are allowed; in Ireland, for example, daylight saving time is observed in winter and has a negative offset relative to Irish Standard Time. The offset is merely added to standard time; for example, zic does not distinguish a 10:30 standard time plus an 0:30 SAVE from a 10:00 standard time plus a 1:00 SAVE.

LETTER/S

Gives the “variable part” (for example, the “S” or “D” in “EST” or “EDT”) of time zone abbreviations to be used when this rule is in effect. If this field is “-”, the variable part is null.

A zone line has the form

```
Zone	NAME	STDOFF	RULES	FORMAT	[UNTIL]

For example:

Zone	Asia/Amman	2:00	Jordan	EE%sT	2017 Oct 27 01:00
```

The fields that make up a zone line are: NAME

The name of the timezone. This is the name used in creating the time conversion information file for the timezone. It should not contain a file name component “.” or “..”; a file name component is a maximal substring that does not contain “/”.

STDOFF

The amount of time to add to UT to get standard time, without any adjustment for daylight saving. This field has the same format as the AT and SAVE fields of rule lines, except without suffix letters; begin the field with a minus sign if time must be subtracted from UT.

RULES

The name of the rules that apply in the timezone or, alternatively, a field in the same format as a rule-line SAVE column, giving the amount of time to be added to local standard time and whether the resulting time is standard or daylight saving. If this field is - then standard time always applies. When an amount of time is given, only the sum of standard time and this amount matters.

FORMAT

The format for time zone abbreviations. The pair of characters %s is used to show where the “variable part” of the time zone abbreviation goes. Alternatively, a format can use the pair of characters %z to stand for the UT offset in the form ±hh, ±hhmm, or ±hhmmss, using the shortest form that does not lose information, where hh, mm, and ss are the hours, minutes, and seconds east (+) or west (-) of UT. Alternatively, a slash (/) separates standard and daylight abbreviations. To conform to POSIX, a time zone abbreviation should contain only alphanumeric ASCII characters, “+” and “-”. By convention, the time zone abbreviation “-00” is a placeholder that means local time is unspecified.

UNTIL

The time at which the UT offset or the rule(s) change for a location. It takes the form of one to four fields YEAR [MONTH [DAY [TIME]]]. If this is specified, the time zone information is generated from the given UT offset and rule change until the time specified, which is interpreted using the rules in effect just before the transition. The month, day, and time of day have the same format as the IN, ON, and AT fields of a rule; trailing fields can be omitted, and default to the earliest possible value for the missing fields.

The next line must be a “continuation” line; this has the same form as a zone line except that the string “Zone” and the name are omitted, as the continuation line will place information starting at the time specified as the “until” information in the previous line in the file used by the previous line. Continuation lines may contain “until” information, just as zone lines do, indicating that the next line is a further continuation.

If a zone changes at the same instant that a rule would otherwise take effect in the earlier zone or continuation line, the rule is ignored. A zone or continuation line L with a named rule set starts with standard time by default: that is, any of L's timestamps preceding L's earliest rule use the rule in effect after L's first transition into standard time. In a single zone it is an error if two rules take effect at the same instant, or if two zone changes take effect at the same instant.

If a continuation line subtracts N seconds from the UT offset after a transition that would be interpreted to be later if using the continuation line's UT offset and rules, the “until” time of the previous zone or continuation line is interpreted according to the continuation line's UT offset and rules, and any rule that would otherwise take effect in the next N seconds is instead assumed to take effect simultaneously. For example:

```
# Rule	NAME	FROM	TO	-	IN	ON	AT	SAVE	LETTER/S
Rule	US	1967	2006	-	Oct	lastSun	2:00	0	S
Rule	US	1967	1973	-	Apr	lastSun	2:00	1:00	D
# Zone  NAME	STDOFF	RULES	FORMAT	[UNTIL]
Zone  America/Menominee	-5:00	-	EST	1973 Apr 29 2:00
	-6:00	US	C%sT
```

Here, an incorrect reading would be there were two clock changes on 1973-04-29, the first from 02:00 EST (-05) to 01:00 CST (-06), and the second an hour later from 02:00 CST (-06) to 03:00 CDT (-05). However, zic interprets this more sensibly as a single transition from 02:00 CST (-05) to 02:00 CDT (-05). A link line has the form

```
Link	TARGET	LINK-NAME

For example:

Link	Europe/Istanbul	Asia/Istanbul
```

The TARGET field should appear as the NAME field in some zone line or as the LINK-NAME field in some link line. The LINK-NAME field is used as an alternative name for that zone; it has the same syntax as a zone line's NAME field. Links can chain together, although the behavior is unspecified if a chain of one or more links does not terminate in a Zone name. A link line can appear before the line that defines the link target. For example:

```
Link	Greenwich	G_M_T
Link	Etc/GMT	Greenwich
Zone	Etc/GMT  0  -  GMT
```

The two links are chained together, and G_M_T, Greenwich, and Etc/GMT all name the same zone. Except for continuation lines, lines may appear in any order in the input. However, the behavior is unspecified if multiple zone or link lines define the same name.

The file that describes leap seconds can have leap lines and an expiration line. Leap lines have the following form:

```
Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S

For example:

Leap	2016	Dec	31	23:59:60	+	S
```

The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap second happened. The CORR field should be “+” if a second was added or “-” if a second was skipped. The R/S field should be (an abbreviation of) “Stationary” if the leap second time given by the other fields should be interpreted as UTC or (an abbreviation of) “Rolling” if the leap second time given by the other fields should be interpreted as local (wall clock) time. Rolling leap seconds were implemented back when it was not clear whether common practice was rolling or stationary, with concerns that one would see Times Square ball drops where there'd be a “3... 2... 1... leap... Happy New Year” countdown, placing the leap second at midnight New York time rather than midnight UTC. However, this countdown style does not seem to have caught on, which means rolling leap seconds are not used in practice; also, they are not supported if the -r option is used.

The expiration line, if present, has the form:

```
Expires	YEAR	MONTH	DAY	HH:MM:SS

For example:

Expires	2020	Dec	28	00:00:00
```

The YEAR, MONTH, DAY, and HH:MM:SS fields give the expiration timestamp in UTC for the leap second table.

## EXTENDED EXAMPLE
Here is an extended example of zic input, intended to illustrate many of its features.

```
# Rule	NAME	FROM	TO	-	IN	ON	AT	SAVE	LETTER/S
Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-

Rule	EU	1977	1980	-	Apr	Sun>=1	1:00u	1:00	S
Rule	EU	1977	only	-	Sep	lastSun	1:00u	0	-
Rule	EU	1978	only	-	Oct	 1	1:00u	0	-
Rule	EU	1979	1995	-	Sep	lastSun	1:00u	0	-
Rule	EU	1981	max	-	Mar	lastSun	1:00u	1:00	S
Rule	EU	1996	max	-	Oct	lastSun	1:00u	0	-

# Zone	NAME	STDOFF	RULES	FORMAT	[UNTIL]
Zone	Europe/Zurich	0:34:08	-	LMT	1853 Jul 16
		0:29:45.50	-	BMT	1894 Jun
		1:00	Swiss	CE%sT	1981
		1:00	EU	CE%sT

Link	Europe/Zurich	Europe/Vaduz
```

In this example, the EU rules are for the European Union and for its predecessor organization, the European Communities. The timezone is named Europe/Zurich and it has the alias Europe/Vaduz. This example says that Zurich was 34 minutes and 8 seconds east of UT until 1853-07-16 at 00:00, when the legal offset was changed to 7 degrees 26 minutes 22.50 seconds, which works out to 0:29:45.50; zic treats this by rounding it to 0:29:46. After 1894-06-01 at 00:00 the UT offset became one hour and Swiss daylight saving rules (defined with lines beginning with “Rule Swiss”) apply. From 1981 to the present, EU daylight saving rules have applied, and the UTC offset has remained at one hour.

In 1941 and 1942, daylight saving time applied from the first Monday in May at 01:00 to the first Monday in October at 02:00. The pre-1981 EU daylight-saving rules have no effect here, but are included for completeness. Since 1981, daylight saving has begun on the last Sunday in March at 01:00 UTC. Until 1995 it ended the last Sunday in September at 01:00 UTC, but this changed to the last Sunday in October starting in 1996.

For purposes of display, “LMT” and “BMT” were initially used, respectively. Since Swiss rules and later EU rules were applied, the time zone abbreviation has been CET for standard time and CEST for daylight saving time.

## FILES
/etc/localtime

Default local timezone file.

/usr/share/zoneinfo

Default timezone information directory.

## NOTES
For areas with more than two types of local time, you may need to use local standard time in the AT field of the earliest transition time's rule to ensure that the earliest transition time recorded in the compiled file is correct.

If, for a particular timezone, a clock advance caused by the start of daylight saving coincides with and is equal to a clock retreat caused by a change in UT offset, zic produces a single transition to daylight saving at the new UT offset without any change in local (wall clock) time. To get separate transitions use multiple zone continuation lines specifying transition instants using universal time.

## SEE ALSO
tzfile(5), zdump(8)


mariadbd

package: mariadb-server

title: mariadbd(8)

text:
# mariadbd(8)

## NAME
mariadbd - the MariaDB server (mariadbd is now a symlink to mariadbd)

## SYNOPSIS
mariadbd [options]

## DESCRIPTION
mariadbd, also known as MariaDB Server, is the main program that does most of the work in a MariaDB installation. MariaDB Server manages access to the MariaDB data directory that contains databases and tables. The data directory is also the default location for other information such as log files and status files.

When MariaDB server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients.

The mariadbd program has many options that can be specified at startup. For a complete list of options, run this command:

```
shell> mariadbd --verbose --help
```

MariaDB Server also has a set of system variables that affect its operation as it runs. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration. MariaDB Server also has a set of status variables that provide information about its operation. You can monitor these status variables to access runtime performance characteristics.

For a full description of MariaDB Server command options, system variables, and status variables, see the MariaDB Documentation.

## COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2025 MariaDB Foundation

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.

## SEE ALSO
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/

## AUTHOR
MariaDB Foundation (http://www.mariadb.org/).


mathopd

package: mathopd

title: mathopd(8)

text:
# mathopd(8)

## NAME
mathopd - Advanced Hypertext Tranfer Protocol Server

## SYNOPSIS
mathopd [ -ndtv ] [ -f config_file ]

## OPTIONS
-n

If this option is supplied, Mathopd continues to run in the foreground after initialization. This is useful for debugging purposes.

-d

If this option is supplied, Mathopd starts up in debugging mode. Debugging can be turned on and off while the server is running; see the section on signals below.

-t

If this option is supplied, Mathopd will write diagnostics to the standard error channel as well as the error log. The option is named after the tee(1) program.

-v

If this option is supplied, Mathopd prints its version number and exits.

-f config_file

Use the configuration file specified by config_file. If the -f option is not used, Mathopd expects a configuration file from standard input. This is mainly for historic reasons; there is no reason why one should not use the -f flag. mathopd.conf(5) describes the syntax of the mathopd configuration file.

## SIGNALS
While the server is running, is reacts to certain signals. If a PIDFile is specified in the configuration file, you can send signals to Mathopd using something like

\# kill -<signal> `cat /var/run/mathopd.pid`

from the command line, assuming the PIDFile is /var/run/mathopd.pid.

A list of signals and their effects follows.

SIGHUP

If this signal is received, Mathopd will reopen its access and error log files. See the section on log files below.

SIGTERM SIGINT

These signals have identical effects: they stop Mathopd immediately, that is, all connections are closed and all server sockets as well. Note that the fact that SIGINT stops the server means that you can stop Mathopd by pressing Ctrl-C (or whatever key has the interrupt function) if it was started with the -n flag.

SIGQUIT

This signal toggles the debugging flag: if debugging was turned off before this signal was sent, it will be turned on, and vice versa.

SIGUSR1

This signal disconnects all clients, if any from the server. New connections can still be made after this.

SIGUSR2

This signal closes the server socket(s). No more connections will be received after this. Requests that are active at the time of the signal will be completed. After all active requests are timed out or done, Mathopd will exit. Use this signal for a 'graceful exit'.

## EXIT
Mathopd will exit voluntarily (as opposed to crash :) for a few reasons:

-

after reception of a SIGTERM or SIGINT signal

-

when no active connections and no active servers remain; this will be the case some time after delivery of SIGUSR2, or (rather perversely) if Mathopd was started up with a configuration file that did not contain any Server keywords

-

if it cannot open the Log, ErrorLog, or PIDFile; this can only be the case when the server is started up; if Mathopd fails to open a logfile while it is running, it will continue to use the logfile that it already opened (see below)

-

when it can not write to the access or error log; for example, if the disk partition that contains the access or error log gets filled up, Mathopd will die when it tries to write there.

## LOG FILES
Each hour Mathopd will re-open its access and error log, as if it had received a SIGHUP signal. For example, if you have the following in your configuration file

Log /var/mathopd/accesslog

ErrorLog /var/mathopd/errorlog

and rename /var/mathopd/accesslog to /var/mathopd/accesslog.old, Mathopd will continue to log in accesslog.old, but will switch to accesslog at the start of the next hour (with one exception: if Mathopd cannot open a new accesslog for any reason, it will *still* continue to log to accesslog.old.) Something similar applies to the ErrorLog.

There are two exceptions to the above: if the value of Log or ErrorLog is either "/dev/stdout" or "/dev/stderr", then the log will not be rotated: mathopd will not try to re-open these files. This is because /dev/stdout and /dev/stderr will be gone once the server has started up.

The name of the Log, ErrorLog and ChildLog will be 'strftime- expanded'. This means that any occurrence of, say, '%Y' in the name will be expanded to the current (4-digit) year.

For example: suppose the configuration file reads as follows

Log /var/mathopd/log.%Y%m%d

In that case, Mathopd will open /var/mathopd/log.20031204 when it is started up on 4 Dec 2003, and will automatically close that file and open /var/mathopd/log.20031205 at the start of the next day.

For more information on the % constructions, see the manual pages for date(1) and strftime(3).

## AUTHOR
Mathopd was written and is copyright by Michiel Boland.

## SEE ALSO
mathopd.conf(5)


mbpfan

package: mbpfan

title: mbpfan(8)

text:
# mbpfan(8)

## NAME
mbpfan - A simple daemon to control fan speed on all Apple computers — (enhanced version of Allan McRae mbpfan)

## SYNOPSIS
mbpfan [OPTIONS]

## DESCRIPTION
mbpfan is a daemon that uses input from coretemp module and sets the fan speed using the applesmc module. This enhanced version assumes any number of processors and fans (max. 10), and it is distro- and kernel-independent.

## OPTIONS
-h

Show the help screen

-f

Run in the foreground

-v

Be (alot) verbose

## FILES
/etc/mbpfan.conf

The system wide configuration file.

## AUTHOR
Daniel Graziotin <daniel@ineed.coffee>

## MORE INFO
https://github.com/dgraziotin/mbpfan/

https://ineed.coffee/3838/a-beginners-tutorial-for-mbpfan-under-ubuntu/

http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/


mcelog

package: mcelog

title: mcelog(8)

text:
# mcelog(8)

## NAME
mcelog - Decode kernel machine check log on x86 machines

## SYNOPSIS
mcelog [options] [device]

mcelog [options] --daemon

mcelog [options] --client

mcelog [options] --ascii

mcelog [options] --is-cpu-supported

mcelog --version

## DESCRIPTION
X86 CPUs report errors detected by the CPU as machine check events (MCEs). These can be data corruption detected in the CPU caches, in main memory by an integrated memory controller, data transfer errors on the front side bus or CPU interconnect or other internal errors. Possible causes can be cosmic radiation, instable power supplies, cooling problems, broken hardware, running systems out of specification, or bad luck.

Most errors can be corrected by the CPU by internal error correction mechanisms. Uncorrected errors cause machine check exceptions which may kill processes or panic the machine. A small number of corrected errors is usually not a cause for worry, but a large number can indicate future failure.

When a corrected or recovered error happens, the x86 kernel writes a record describing the MCE into a internal ring buffer available through the /dev/mcelog device. mcelog retrieves errors from /dev/mcelog, decodes them into a human readable format and prints them on the standard output or optionally into the system log.

Optionally it can also take more options like keeping statistics or triggering shell scripts on specific events. By default mcelog supports offlining memory pages with persistent corrected errors, offlining CPU cores if they developed cache problems, and otherwise logging specific events to the system log after they crossed a threshold.

The normal operating modes for mcelog are: running as a regular cron job (traditional way, deprecated), running as a trigger directly executed by the kernel, or running as a daemon with the --daemon option.

When an uncorrected machine check error happens that the kernel cannot recover from then it will usually panic the system. In this case when there was a warm reset after the panic mcelog should pick up the machine check errors after reboot. This is not possible after a cold reset.

In addition mcelog can be used on the command line to decode the kernel output for a fatal machine check panic in text format using the --ascii option. This is typically used to decode the panic console output of a fatal machine check, if the system was power cycled or mcelog didn't run immediately after reboot.

When the panic triggers a kdump kexec crash kernel the crash kernel boot up script should log the machine checks to disk, otherwise they might be lost.

Note that after mcelog retrieves an error the kernel doesn't store it anymore (different from dmesg(1)), so the output should be always saved somewhere and mcelog not run in uncontrolled ways.

When invoked with the --is-cpu-supported option mcelog exits with code 0 if the current CPU is supported, 1 otherwise.

## OPTIONS
When the --syslog option is specified redirect output to system log. The --syslog-error option causes the normal machine checks to be logged as LOG_ERR (implies --syslog ). Normally only fatal errors or high level remarks are logged with error level. High level one line summaries of specific errors are also logged to the syslog by default unless mcelog operates in --ascii mode.

When the --logfile=file option is specified append log output to the specified file. With the --no-syslog option mcelog will never log anything to the syslog.

When the --cpu=cputype option is specified set the to be decoded CPU to cputype. See mcelog --help for a list of valid CPUs. Note that specifying an incorrect CPU can lead to incorrect decoding output. Default is either the CPU of the machine that reported the machine check (needs a newer kernel version) or the CPU of the machine mcelog is running on, so normally this option doesn't have to be used. Older versions of mcelog had separate options for different CPU types. These are still implemented, but deprecated and undocumented now.

With the --dmi option mcelog will look up the DIMMs reported in machine checks in the SMBIOS/DMI tables of the BIOS and map the DIMMs to board identifiers. This only works when the BIOS reports the identifiers correctly. Unfortunately often the information reported by the BIOS is either subtly or obviously wrong or useless. This option requires that mcelog has read access to /dev/mem (normally requires root) and runs on the same machine in the same hardware configuration as when the machine check event happened.

When --ignorenodev is specified then mcelog will exit silently when the device cannot be opened. This is useful in virtualized environment with limited devices.

When --filter is specified mcelog will filter out known broken machine check events (default on). When the --no-filter option is specified mcelog does not filter events.

When --raw is specified mcelog will not decode, but just dump the mcelog in a raw hex format. This can be useful for automatic post processing.

When a device is specified the machine check logs are read from device instead of the default /dev/mcelog.

With the --ascii option mcelog decodes a fatal machine check panic generated by the kernel ("CPU n: Machine Check Exception ...") in ASCII from standard input and exits afterwards. Note that when the panic comes from a different machine than where mcelog is running on you might need to specify the correct cputype on older kernels. On newer kernels which output the PROCESSOR field this is not needed anymore.

When the --file filename option is specified mcelog --ascii will read the ASCII machine check record from input file filename instead of standard input.

With the --config-file file option mcelog reads the specified config file. Default is /etc/mcelog/mcelog.conf See also CONFIG FILE below.

With the --daemon option mcelog will run in the background. This gives the fastest reaction time and is the recommended operating mode. If an output option isn't selected ( --logfile or --syslog or --syslog-error ), this option implies --logfile=/var/log/mcelog. Important messages will be logged as one-liner summaries to syslog unless --no-syslog is given. The option --foreground will prevent mcelog from giving up the terminal in daemon mode. This is intended for debugging.

With the --client option mcelog will query a running daemon for accumulated errors.

With the --cpumhz=mhz option assume the CPU has mhz frequency for decoding the time of the event using the CPU time stamp counter. This also forces decoding. Note this can be unreliable. on some systems with CPU frequency scaling or deep C states, where the CPU time stamp counter does not increase linearly. By default the frequency of the current CPU is used when mcelog determines it is safe to use. Newer kernels report the time directly in the event and don't need this anymore.

The --pidfile file option writes the process id of the daemon into file file. Only valid in daemon mode.

Mcelog will enable extended error reporting from the memory controller on processors that support it unless you tell it not to with the --no-imc-log option. You might need this option when decoding old logs from a system where this mode was not enabled.

--version displays the version of mcelog and exits.

## CONFIG FILE
mcelog supports a config file to set defaults. Command line options override the config file. By default the config file is read from /etc/mcelog/mcelog.conf unless overridden with the --config-file option.

The general format is optionname = value White space is not allowed in value currently, except at the end where it is dropped Comments start with #.

All command line options that are not commands can be specified in the config file. For example t to enable the --no-syslog option use no-syslog = yes (or no to disable). When the option has a argument use logfile = /tmp/logfile

For more information on the config file please see mcelog.conf(5).

## NOTES
The kernel prefers old messages over new. If the log buffer overflows only old ones will be kept.

The exact output in the log file depends on the CPU, unless the --raw option is used.

mcelog will report serious errors to the syslog during decoding.

## SIGNALS
When mcelog runs in daemon mode and receives a SIGUSR1 it will close and reopen the log files. This can be used to rotate logs without restarting the daemon.

## FILES
/dev/mcelog (char 10, minor 227)

/etc/mcelog/mcelog.conf

/var/log/mcelog

/var/run/mcelog.pid

## SEE ALSO
mcelog.conf(5), mcelog.triggers(5)

http://www.mcelog.org

AMD x86-64 architecture programmer's manual, Volume 2, System programming

Intel 64 and IA32 Architectures Software Developer's manual, Volume 3, System programming guide Chapter 15 and 16. http://www.intel.com/sdm

Datasheet of your CPU.


mdmon

package: mdadm

title: mdmon(8)

summary: monitor MD external metadata arrays

text:
# mdmon(8)

## NAME
mdmon - monitor MD external metadata arrays

## SYNOPSIS
mdmon [--all] [--takeover] [--foreground] CONTAINER

## OVERVIEW
The 2.6.27 kernel brings the ability to support external metadata arrays. External metadata implies that user space handles all updates to the metadata. The kernel's responsibility is to notify user space when a "metadata event" occurs, like disk failures and clean-to-dirty transitions. The kernel, in important cases, waits for user space to take action on these notifications.

## DESCRIPTION

### Metadata updates:
To service metadata update requests a daemon, mdmon, is introduced. Mdmon is tasked with polling the sysfs namespace looking for changes in array_state, sync_action, and per disk state attributes. When a change is detected it calls a per metadata type handler to make modifications to the metadata. The following actions are taken:

array_state - inactive

Clear the dirty bit for the volume and let the array be stopped

array_state - write pending

Set the dirty bit for the array and then set array_state to active. Writes are blocked until userspace writes active.

array_state - active-idle

The safe mode timer has expired so set array state to clean to block writes to the array

array_state - clean

Clear the dirty bit for the volume

array_state - read-only

This is the initial state that all arrays start at. mdmon takes one of the three actions:

1/

Transition the array to read-auto keeping the dirty bit clear if the metadata handler determines that the array does not need resyncing or other modification

2/

Transition the array to active if the metadata handler determines a resync or some other manipulation is necessary

3/

Leave the array read-only if the volume is marked to not be monitored; for example, the metadata version has been set to "external:-dev/md127" instead of "external:/dev/md127"

sync_action - resync-to-idle

Notify the metadata handler that a resync may have completed. If a resync process is idled before it completes this event allows the metadata handler to checkpoint resync.

sync_action - recover-to-idle

A spare may have completed rebuilding so tell the metadata handler about the state of each disk. This is the metadata handler's opportunity to clear any "out-of-sync" bits and clear the volume's degraded status. If a recovery process is idled before it completes this event allows the metadata handler to checkpoint recovery.

<disk>/state - faulty

A disk failure kicks off a series of events. First, notify the metadata handler that a disk has failed, and then notify the kernel that it can unblock writes that were dependent on this disk. After unblocking the kernel this disk is set to be removed+ from the member array. Finally the disk is marked failed in all other member arrays in the container.

+ Note This behavior differs slightly from native MD arrays where removal is reserved for a mdadm --remove event. In the external metadata case the container holds the final reference on a block device and a mdadm --remove <container> <victim> call is still required.

### Containers:
External metadata formats, like DDF, differ from the native MD metadata formats in that they define a set of disks and a series of sub-arrays within those disks. MD metadata in comparison defines a 1:1 relationship between a set of block devices and a RAID array. For example to create 2 arrays at different RAID levels on a single set of disks, MD metadata requires the disks be partitioned and then each array can be created with a subset of those partitions. The supported external formats perform this disk carving internally.

Container devices simply hold references to all member disks and allow tools like mdmon to determine which active arrays belong to which container. Some array management commands like disk removal and disk add are now only valid at the container level. Attempts to perform these actions on member arrays are blocked with error messages like:

"mdadm: Cannot remove disks from a ´member´ array, perform this operation on the parent container"

Containers are identified in /proc/mdstat with a metadata version string "external:<metadata name>". Member devices are identified by "external:/<container device>/<member index>", or "external:-<container device>/<member index>" if the array is to remain readonly.

## OPTIONS
CONTAINER

The container device to monitor. It can be a full path like /dev/md/container, or a simple md device name like md127.

--foreground

Normally, mdmon will fork and continue in the background. Adding this option will skip that step and run mdmon in the foreground.

--takeover

This instructs mdmon to replace any active mdmon which is currently monitoring the array. This is primarily used late in the boot process to replace any mdmon which was started from an initramfs before the root filesystem was mounted. This avoids holding a reference on that initramfs indefinitely and ensures that the pid and sock files used to communicate with mdmon are in a standard place.

--all

This tells mdmon to find any active containers and start monitoring each of them if appropriate. This is normally used with --takeover late in the boot sequence. A separate mdmon process is started for each container as the --all argument is over-written with the name of the container. To allow for containers with names longer than 5 characters, this argument can be arbitrarily extended, e.g. to --all-active-arrays.

Note that mdmon is automatically started by mdadm when needed and so does not need to be considered when working with RAID arrays. The only times it is run other than by mdadm is when the boot scripts need to restart it after mounting the new root filesystem.

## START UP AND SHUTDOWN
As mdmon needs to be running whenever any filesystem on the monitored device is mounted there are special considerations when the root filesystem is mounted from an mdmon monitored device. Note that in general mdmon is needed even if the filesystem is mounted read-only as some filesystems can still write to the device in those circumstances, for example to replay a journal after an unclean shutdown.

When the array is assembled by the initramfs code, mdadm will automatically start mdmon as required. This means that mdmon must be installed on the initramfs and there must be a writable filesystem (typically tmpfs) in which mdmon can create a .pid and .sock file. The particular filesystem to use is given to mdmon at compile time and defaults to /run/mdadm.

This filesystem must persist through to shutdown time.

After the final root filesystem has be instantiated (usually with pivot_root) mdmon should be run with --all --takeover so that the mdmon running from the initramfs can be replaced with one running in the main root, and so the memory used by the initramfs can be released.

At shutdown time, mdmon should not be killed along with other processes. Also as it holds a file (socket actually) open in /dev (by default) it will not be possible to unmount /dev if it is a separate filesystem.

## EXAMPLES
mdmon --all-active-arrays --takeover

Any mdmon which is currently running is killed and a new instance is started. This should be run during in the boot sequence if an initramfs was used, so that any mdmon running from the initramfs will not hold the initramfs active.

## SEE ALSO
mdadm(8), md(4).


title: raid6check(8)

summary: check MD RAID6 device for errors

text:
# raid6check(8)

## NAME
raid6check - check MD RAID6 device for errors aka Linux Software RAID

## SYNOPSIS
raid6check <raid6 device> <start stripe> <number of stripes>

## DESCRIPTION
RAID6 devices in which one single component drive has errors can use the double parity in order to find out which component drive. The "raid6check" tool checks, for each stripe, the double parity consistency, reports mismatches and, if possible, which component drive has the mismatch. Since it works at stripe level, it can report different drives with mismatches at different stripes.

"raid6check" requires a non-degraded RAID6 MD device as first parameter, a starting stripe (usually 0) and the number of stripes to be checked. If this third parameter is also 0, it will check the array up to the end.

"raid6check" will start printing information about the RAID6, then for each stripe, it will report the parity rotation status. In case of parity mismatches, "raid6check" reports, if possible, which component drive could be responsible. Otherwise it reports that it is not possible to find the component drive.

If the given MD device is not a RAID6, "raid6check" will, of course, not continue.

If the RAID6 MD device is degraded, "raid6check" will report an error and it will not proceed further.

No write operations are performed on the array or the components. Furthermore, the checked array can be online and in use during the operation of "raid6check".

## EXAMPLES
raid6check /dev/md0 0 0

This will check /dev/md0 from start to end.

raid6check /dev/md3 0 1

This will check the first stripe of /dev/md3.

raid6check /dev/md1 1000 0

This will check /dev/md1 from stripe 1000 up to the end.

raid6check /dev/m127 128 256

This will check 256 stripes of /dev/md127 starting from stripe 128.

raid6check /dev/md0 0 0 | grep -i error > md0_err.log

This will check /dev/md0 completely and create a log file only with errors, if any.

## FILES
"raid6check" uses directly the component drives as found in /dev. Furthermore, the sysfs interface is needed in order to find out the RAID6 parameters.

## BUGS
Negative parameters can lead to unexpected results.

It is not clear what will happen if the RAID6 MD device gets degraded during the check.

The latest version of raid6check should always be available from

https://www.kernel.org/pub/linux/utils/raid/mdadm/

Related man pages:

mdadm(8) mdmon(8), mdadm.conf(5), md(4).