mfscsstatsdump

title: mfscsstatsdump(8)

text:
# mfscsstatsdump(8)

## NAME
mfscsstatsdump - dump usage data from chunkserver stats file in csv or png format

## SYNOPSIS
mfscsstatsdump -f fields [-i stats_file] [-r range][-s separator] [-p png_filename [-x chart_width] [-y chart_height]] [-hHd]

## DESCRIPTION
mfscsstatsdump dumps usage data from chunkserver stats file. These are the same data sets that are used to make CGI charts. Output can be either in text format (csv) or in graphical format (png). That means -p, -x and -y options are mutually exclusive with -h, -H and -d options.

MooseFS chunkserver saves the stats file in the DATA_PATH directory - see mfschunkserver.cfg(5)

## OPTIONS
-f

field names separated by ',' (see FIELDS section); at least one field is mandatory; if an asterisk (*) is used, all fields are dumped

-i

name of mfs binary stats file (default: default_data_path/csstats.mfs)

-r

range type: 0 - short range (minute) 1 - medium range (6 minutes) 2 - long range (30 minutes) 3 - very long range (day)

-s

specify column separator (default: tabulator)

-p

optional PNG filename (field name will be added before .png; YYYY -> YYYY_FIELD.png, YYYY.png -> YYYY_FIELD.png)

-x

PNG chart width (default: 1600)

-y

PNG chart height (should be divisible by 20 - if not then it will be adjusted; default:320)

-h

"human-readable" numbers using base 2 prefixes (IEC 60027)

-H

"human-readable" numbers using base 10 prefixes (SI)

-d

show timestamps in YYYY-MM-DD HH:MM format

## FIELDS
ucpu

User cpu usage

scpu

System cpu usage

cpu

Total cpu usage (in csv sum of scpu and ucpu, in png shows both in different colors)

masterin

Data received from master

masterout

Data sent to master

csrepin

Data received by replicator

csrepout

Data sent by replicator

csservin

Data received by csserv

csservout

Data sent by csserv

bwin

Data bandwidth in (in csv sum of csrepin and csservin, in png shows both in different colors)

bwout

Data bandwidth out (in csv sum of csrepout and csservout, in png shows both in different colors)

hdrbytesr

Bytes read (headers)

hdrbytesw

Bytes written (headers)

hdrllopr

Low level reads (headers)

hdrllopw

Low level writes (headers)

databytesr

Bytes read (data)

databytesw

Bytes written (data)

datallopr

Low level reads (data)

datallopw

Low level writes (data)

hddread

HDD read (in csv sum of hdrbytesr and databytesr, in png shows both in different colors)

hddwrite

HDD write (in csv sum of hdrbytesw and databytesw, in png shows both in different colors)

hddopsr

HDD low level read (in csv sum of hdrllopr and datallopr, in png shows both in different colors)

hddopsw

HDD low level write (in csv sum of hdrllopw and datallopw, in png shows both in different colors)

hlopr

High level reads

hlopw

High level writes

rtime

Read time

wtime

Write time

repl

Replicate chunk ops

create

Create chunk ops

delete

Delete chunk ops

version

Set version ops

duplicate

Duplicate ops

truncate

Truncate ops

duptrunc

Duptrunc (duplicate+truncate) ops

test

Test chunk ops

load

Server load

memoryrss

Resident memory usage

memoryvirt

Virtual memory usage

mem

Total memory usage (in csv is the same as memoryvirt, in png shows both memoryrss and memoryvirt using two colors)

## OUTPUT
Text output - text (csv) file where first column is a timestamp (or date if -d option was specified), the following column are what was specified with the -f options, formatted according to used options (none, -s and -h or -H)

Graphical output - one png file with a chart is created for every field specified with the -f option, according to the naming scheme declared with the -p option. Size may be adjusted with -x and -y options.

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfschunkserver(8), mfsstatsdump(8)


mfsbdev

package: moosefs-client

title: mfsbdev(8)

text:
# mfsbdev(8)

## NAME
mfsbdev - MooseFS block device daemon/management tool

## SYNOPSIS
mfsbdev start [-H masterhost] [-P masterport] [-S masterpath] [-p masterpassword | -x passwordfile] [-l linksocket] [-F]

mfsbdev stop [-l linksocket]

mfsbdev map [-l linksocket] -f mfsfile [-d nbddevice] [-n linkname] [-s bdevsize] [-r]

mfsbdev unmap [-l linksocket] ( -f mfsfile | -d nbddevice | -n linkname )

mfsbdev list [-l linksocket] [-t m|u]

mfsbdev resize [-l linksocket] ( -f mfsfile | -d nbddevice | -n linkname ) [-s bdevsize]

## DESCRIPTION
This tool is used to manage block devices. This tool works in Linux ONLY. Kernel module nbd must be loaded for this tool to work properly.

## COMMANDS
start - starts the daemon; the daemon only listens on a socket at this point; all the other commands use the socket to communicate with the daemon; if no socket is specified via -l option, the default is used: /dev/mfs/nbdsock

stop - stops the daemon

map - maps a file on mfs to be used as a block device

unmap - removes a mapping

list - lists current mappings

resize - changes the size of a block device (requires kernel version 4.18 or higher)

## OPTIONS
-H - master host; default is 'mfsmaster'

-P - master port; default is '9421'

-S - master path (subfolder in MFS that will be used as a root for all block device mappings); default is '/'

-p - master password; mutually exclusive with -x option; if neither -p nor -x are supplied, the tool tries to connect without a password

-x - path to a file containing master password; mutually exclusive with -p option; if neither -p nor -x are supplied, the tool tries to connect without a password

-l - path to communication socket; default is /dev/mfs/nbdsock

-F - do not daemonize the tool (run in foreground)

-f - path to mfs file used to map block device;

-d - path to network block device ('/dev/nbdX'); by default (if this parameter is not supplied) first available device is used with the map command

-n - name of symbolic link created in '/dev/mfs', pointing at the network block device created by the map command; default is a combination of master hostname, port and mfs file name

-s - size of the block device, both SI and IEC suffixes can be used; default is the size of the file the block device is mapped to

-r - maps block device as readonly (allows multiple mappings of the same file)

-t - forces the list command to display information in a format ready to use with map (m parameter) or unmap (u parameter) command

## EXAMPLES
mfsbdev start - start nbd daemon with default options (masterhost = mfsmaster, masterport = 9421, linksocket = /dev/mfs/nbdsock, authentication without password)

mfsbdev start -H mfsmaster.my.domain -P 9521 -x /etc/mfs/mastersecret - start nbd daemon that will connect to master mfsmaster.my.domain on port 9521 using password read from file /etc/mfs/mastersecret

mfsbdev stop -l /tmp/mynbdinstance - stop nbd daemon using for communication unix socket /tmp/mynbdinstance

mfsbdev map -f devices/mybdev1.bin -s 2Ti -n mytestvm - add mapping to daemon using for communication default socket (/dev/mfs/nbdsock). Device will be assigned automatically, file devices/mybdev1.bin will be mapped to this device, link '/dev/mfs/mytestvm' to this device will be created and block device will have size of 2TiB.

mfsbdev unmap -n mytestvm - remove mapping that has link named mytestvm (uses link /dev/mfs/mytestvm).

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmount(8)


mfsmount

title: mfsmount(8)

summary: mount Moose File System

text:
# mfsmount(8)

## NAME
mfsmount - mount Moose File System

## SYNOPSIS
mfsmount [HOST[:PORT]:[PATH]] [options] mountpoint

mfsmount -h|--help

mfsmount -V|--version

Since 3.0.75 (Linux only):

mount -t moosefs [options] [HOST[:PORT]:[PATH]] mountpoint

## DESCRIPTION
Mount Moose File System.

General options:

-h, --help

display help and exit

-V

display version information and exit

FUSE options:

-d, -o debug

enable debug mode (implies -f)

-f

foreground operation

-s

disable multi-threaded operation

MooseFS options:

-c CFGFILE, -o mfscfgfile=CFGFILE

loads file with additional mount options

-m, --meta, -o mfsmeta

mount MFSMETA companion filesystem instead of primary MooseFS

-n

omit default mount options (-o allow_other)

-p

prompt for password (interactive version of -o mfspassword=PASS)

-H HOST, -o mfsmaster=HOST

connect with MooseFS master on HOST (default is mfsmaster)

-P PORT, -o mfsport=PORT

connect with MooseFS master on PORT (default is 9421)

-B IP, -o mfsbind=IP

local address to use for connecting with master instead of default one

-L IP, -o mfsproxy=IP

define listen ip address of local master proxy for communication with tools (default: 127.0.0.1)

-S PATH, -o mfssubfolder=PATH

mount specified MooseFS directory (default is /, i.e. whole filesystem)

-o mfspassword=PASSWORD

authenticate to MooseFS master with PASSWORD

-o mfspassfile=FILENAME

authenticate to MooseFS master with password stored in first line of file pointed by FILENAME

-o mfsmd5pass=MD5

authenticate to MooseFS master using directly given MD5 (only if mfspassword option is not specified)

-o mfsdonotrememberpassword

do not remember password in memory - more secure, but when session is lost then new session is created without password

-o mfsdebug

print some MooseFS-specific debugging information

-o mfsmemlock

try to lock memory (all allocated memory will be mapped to physical RAM - which also means no swapping)

-o allowoomkiller

do not disable out of memory killer (Linux only)

-o mfslimitarenas=N

if N>0 then limit glibc malloc arenas (Linux only - default: 4)

-o mfsflattrash

use flat trash structure in meta (option added for compatibility reasons - since version 3.0.64 trash is split into 4096 subfolders which reduces problems with big trashes)

-o mfsdelayedinit

connection with master is done in background - with this option mount can be run without network (good for being run from fstab / init scripts etc.)

-o mfsmkdircopysgid=N

sgid bit should be copied during mkdir operation (default depends on operating system)

-o mfssugidclearmode=SMODE

set sugid clear mode (see SUGID CLEAR MODES; default depends on operating system)

-o mfscachemode=CMODE

set cache mode (see DATA CACHE MODES; default is AUTO)

-o mfscachefiles

(deprecated) preserve file data in cache (equivalent to '-o mfscachemode=YES')

-o mfsattrcacheto=SEC

set attributes cache timeout in seconds (default: 1.0)

-o mfsxattrcacheto=SEC

set extended attributes (xattr) cache timeout in seconds (default: 30.0)

-o mfsentrycacheto=SEC

set file entry cache timeout in seconds (default: 0.0, i.e. no cache)

-o mfsdirentrycacheto=SEC

set directory entry cache timeout in seconds (default: 1.0)

-o mfsnegentrycacheto=SEC

set negative entry cache timeout in seconds (default: 0.0)

-o mfsgroupscacheto=SEC

set supplementary groups cache timeout in seconds (default: 300.0)

-o mfsrlimitnofile=N

try to change limit of simultaneously opened file descriptors on startup (default: 100000)

-o mfsnice=LEVEL

try to change nice level to specified value on startup (default: -19)

-o mfswritecachesize=N

specify write cache size in MiB (in range: 16..2048 - default: 256)

-o mfsreadaheadsize=N

define size of all read ahead buffers in MiB (in range: 16..2048 - default: 256)

-o mfsreadaheadleng=N

define amount of bytes to be additionally read (in range: 128KiB..2MiB - default: 1048576)

-o mfsreadaheadtrigger=N

define amount of bytes read sequentially that turns on read ahead (default: 10 * mfsreadaheadleng)

-o mfserroronlostchunk

when all known chunkservers are connected to the master and the required chunk is missing then immediately finish I/O and return an error

-o mfserroronnospace

when all known chunkservers are connected to the master and there is no free space then immediately finish I/O and return an error

-o mfsioretries=N

specify number of retiries before I/O error is returned (default: 30)

-o mfstimeout=N

define maximum timeout in seconds before I/O error is returned (default: 0 - which means no timeout)

-o mfslogretry=N

define minimal retry counter on which system will start log I/O messages (default: 5)

-o mfsfsyncmintime=SEC

force fsync before last file close when file was opened/created at least SEC seconds earlier (default: 0.0 - always do fsync before close)

-o mfspreflabels=LABELEXPR

specify preferred labels for choosing chunkservers during I/O

-o mfsnoxattrs

turn off xattr support

-o mfsnoposixlocks

turn off support for global posix locks (lockf + ioctl) - locks will work locally

-o mfsnobsdlocks

turn off support for global BSD locks (flock) - locks will work locally

General mount options (see mount(8) manual):

-o rw|-o ro

Mount file-system in read-write (default) or read-only mode respectively.

-o suid|-o nosuid

Enable or disable suid/sgid attributes to work.

-o dev|-o nodev

Enable or disable character or block special device files interpretation.

-o exec|-o noexec

Allow or disallow execution of binaries.

## SUGID CLEAR MODE
During attribute change file systems sometimes clear flags suid and/or sgid. Behavior is different on different file systems. MFS tries to mimic behavior of most popular file system on given operating systems.

NEVER

MFS will not change suid and sgid bit on chown

ALWAYS

clear suid and sgid on every chown - safest operation

OSX

standard behavior in OS X and Solaris (chown made by unprivileged user clear suid and sgid)

BSD

standard behavior in *BSD systems (like in OSX, but only when something is really changed)

EXT

standard behavior in most file systems on Linux (directories not changed, others: suid cleared always, sgid only when group exec bit is set)

XFS

standard behavior in XFS on Linux (like EXT but directories are changed by unprivileged users)

## DATA CACHE MODES
There are four cache modes: DIRECT, NO, YES and AUTO. Default option is AUTO and you shuldn't change it unless you really know what you are doing. In AUTO mode data cache is managed automatically by mfsmaster.

DIRECT

forces direct io (bypasses cache)

NO,NONE or NEVER

never allow files data to be kept in cache (safest but can reduce efficiency)

YES or ALWAYS

always allow files data to be kept in cache (dangerous)

AUTO

file cache is managed by mfsmaster automatically (should be very safe and efficient)

## LABEL EXPRESSIONS
LABELEXPR grammar:

LABELEXPR

-> S ; LABELEXPR | S

S

-> S + M | M

M

-> M L | L

L

-> a .. z | A .. Z | ( S ) | [ S ]

Subexpressions should be placed in priority order. Up to nine subexpressions (priorities) can be specified.

## FSTAB
On most Unix systems mfsmount can be invoked automatically from /etc/fstab. Be aware that rw or ro option has to be specified in options. Also on many systems there should be option which informs the system that this mountpoint should be mounted after starting networking services (options such as _netdev or late).

Linux:

mfsmount mountpoint fuse options 0 0

*BSD:

mfsmount_magic mountpoint moosefs options,mountprog=/usr/local/bin/mfsmount 0 0

Since version 3.0.75 alternative form can be used:

Linux:

HOST[:PORT]:[PATH] mountpoint moosefs options 0 0

*BSD:

HOST[:PORT]:[PATH] mountpoint moosefs options,mountprog=/usr/local/bin/mfsmount 0 0

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8), mfstools(1), mount(8)


mfsmaster

package: moosefs-master

title: mfsmaster(8)

text:
# mfsmaster(8)

## NAME
mfsmaster - start, restart or stop Moose File System master process

## SYNOPSIS
mfsmaster [-c CFGFILE] [-u] [-i] [-a] [-e] [-x[x]] [-t LOCKTIMEOUT] [ACTION]

mfsmaster -v

mfsmaster -h

## DESCRIPTION
mfsmaster is the master program of Moose File System.

## OPTIONS
-v

print version information and exit

-h

print usage information and exit

-c CFGFILE

specify alternative path of configuration file (default is mfsmaster.cfg in system configuration directory)

-u

log undefined configuration values (when default is assumed)

-f

run in foreground, don't daemonize

-t LOCKTIMEOUT

how long to wait for lockfile (in seconds; default is 1800 seconds)

-i

ignore some metadata structure errors (attach orphans to root, ignore names without inode, etc.). DO NOT use unless you are ready to pick up the pieces. See https://github.com/moosefs/moosefs/issues/151 for discussion.

-a

automatically restore metadata from change logs

-e

start without metadata (usable only in pro version - used to start additional masters)

-x

produce more verbose output

-xx

even more verbose output

ACTION

is the one of start, stop, restart, reload, test, restore or kill. Default action is restart. The test action will yield one of two responses: "mfsmaster pid: PID" or "mfsmaster is not running". The kill action will send a SIGKILL to the currently running master process. SIGHUP or reload action forces mfsmaster to reload all configuration files. restore tries to restore metadata file using backup metadata files and changelogs; if successful it will store recovered metadata file end stop, it will never start master process.

## FILES
mfsmaster.cfg

configuration file for MooseFS master process; refer to mfsmaster.cfg(5) manual for details

mfsexports.cfg

MooseFS access control file; refer to mfsexports.cfg(5) manual for details

mfstopology.cfg

Network topology definitions; refer to mfstopology.cfg(5) manual for details

.mfsmaster.lock

lock file of running MooseFS master process (created in data directory)

metadata.mfs, metadata.mfs.back

MooseFS filesystem metadata image (created in data directory)

changelog.*.mfs

MooseFS filesystem metadata change logs (created in data directory; merged into metadata.mfs once per hour)

data.stats

MooseFS master charts state (created in data directory)

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfschunkserver(8), mfsmount(8), mfsmaster.cfg(5), mfsexports.cfg(5), mfstopology.cfg(5)


mfsmetadirinfo

title: mfsmetadirinfo(8)

text:
# mfsmetadirinfo(8)

## NAME
mfsmetadirinfo - uses MooseFS metadata to calculate precise directory information (similar to mfsdirinfo)

## SYNOPSIS
mfsmetadirinfo [-f J|C|C x] [-o outputfile] [-a sum_name] metadata.mfs PATH [PATH...]

## DESCRIPTION
mfsmetadirinfo is a tool that can be used to calculate precise directory information such as number of inodes, number of chunks, total length of all files, size, real size etc. Output can be generated as plain text, CSV or JSON. Data for calculations is read from indicated metadata.mfs mfs master metadata file and is calculated for directory(ies) specified by PATH parameter(s) - relative in mfs instance. Default output is human-readable plain text, JSON or CSV can be selected using options.

Options:

-f

switch output format to JSON (J) or CSV (C); for CSV, if only C is specified, default separator will be used (comma), if second character is specified, this character will be used as the separator in CSV data

-o

write output to outputfile instead of stdout

-a

optional parameter that indicates the tool should calculate the information for all supplied paths together (a sum), this calculation is indicated by sum_name in output data

## OUTPUT FIELDS
For each PATH and, if defined, for sum_name, following information will be indicated:

inodes

number of all unique inodes (file system objects)

files

number of all unique files

dirs

number of all unique directories

chunks

number of all unique chunks

kchunks

number of all unique chunks using KEEP policy

achunks

number of all unique chunks using ARCH policy

length

total length of all unique files

size

total size of all unique chunks

rsize

total real size of all unique chunks (number of copies taken into account)

ksize

hypothetical real size of all unique chunks if all were using KEEP policy

asize

hypothetical real size of all unique chunks if all were using ARCH policy

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8), mfsmetadump(8), mfsdirinfo(1)


mfsmetadump

title: mfsmetadump(8)

text:
# mfsmetadump(8)

## NAME
mfsmetadump - dump MooseFS metadata info in human readable format

## SYNOPSIS
mfsmetadump [-d] [-s section_name] metadata_file

## DESCRIPTION
mfsmetadump dumps MooseFS metadata info in human readable format. Output consists of several sections with different types of information. Every section consist of header data - rows starting with hash (#) sign - and content data (may be empty).

## OPTIONS
-d - replace all non-printable characters (codes < 32 and > 126) with '.' (it was default behaviour in version < 3.0.110).

-s - dump only specified section of the file. Possible sections:

```
	HEAD - header info
	SESS - client sessions
	LABS - labels (not used)
	SCLA - storage classes
	NODE - tree nodes (i-nodes)
	EDGE - tree edges (file names)
	FREE - free nodes (deleted i-nodes)
	QUOT - quota definitions
	XATR - xattr data
	PACL - posix acl data
	OPEN - open files
	FLCK - flock data
	PLCK - posix locks (lockf,ioctl) data
	CSDB - active chunkservers
	CHNK - chunks
```

## SECTION HEADER (precedes each section except HEAD)
section header

section header (section type + version)

length

length of section

section type

name of section

version

hexadecimal representation of section version

## FILE HEADER (HEAD)
header

MooseFS version

version

metadata file version

fileid

metadata file id

## SESSIONS SECTION (SESS)
nextsessionid

first free session id

statscount

number of stats remembered in each session

SESSION

line describing a single session

```
s	session id
e	exports checksum
p	IP address
r	root inode number
f	session flags
u	umask
g	min and max goal (redundancy level)
t	min and max trash retention
m	maproot uid,gid and mapall uid,gid
x	disabled operations
d	disconnection time (optional)
c	current hour stats data
l	last hour stats data
i	session name (usually local mount point)
```

## STORAGE CLASS SECTION (SCLA), formerly LABELS SECTION (LABS)
LABELDESC

line with label description (existed only in LABS)

```
l	label letter
n	label description
```

SCLASS

(formerly LABELSET) line with storage class used in system

```
#	storage class id
x	admin only
m	mode
d	arch delay
c	create labels
k	keep labels
a	archive labels
n	name
```

## NODES SECTION (NODE)
maxinode

maximum inode number used by system

hashelements

number of inodes in hash tabble

NODE

line with node (inode) description

```
k	node type (-,D,S,F,B,C,L,T,R)
	-	file
	D	directory
	S	socket
	F	fifo
	B	block device
	C	character device
	L	symbolic link
	T	trash file
	R	sustained file (removed open file)
i	inode number
#	storage class id
e	flags (extra mfs attributes)
w	windows attributes
m	mode
u	uid
g	gid
a,m,c	atime, mtime, ctime
t	trash retention
d	rdevhi,rdevlo (only block and character devices)
p	path (only symbolic links)
l	file length (only files)
c	chunk list (only files)
r	sessions that have this file open (only files)
```

## EDGES SECTION (EDGE)
nextedgeid

next available edge id (descending)

EDGE

line with edge description

```
p	parent inode number
c	child inode number
i	edge id
n	edge name
```

## FREE NODES SECTION (FREE)
free nodes

number of free (reusable) nodes

FREEID

line with free inode description

```
i	inode number
f	deletion timestamp
```

## QUOTA SECTION (QUOT)
quota nodes

number of nodes with quota

QUOTA

line with quota description

```
i	inode number
g	grace period
e	exceeded
f	flags
s	soft quota exceeded timestamp
si	soft inode quota
hi	hard inode quota
sl	soft length quota
hl	hard length quota
ss	soft size quota
hs	hard size quota
sr	soft real size quota
hr	hard real size quota
```

## XATTR SECTION (XATR)
XATTR

line with xattr description

```
i	inode number
n	xattr name
v	xattr value
```

## POSIX ACL SECTION (PACL)
POSIXACL

line with acl description

```
i	inode number
t	acl type
u	user (file owner) permissions
g	group permissions
o	other permissions
m	permission mask
n	named permissions - list of objects:
u(U):P	permissions P for user with uid U
g(G):P	permissions P for group with gid G
```

## OPEN FILES SECTION (OPEN)
OPENFILE

line with open file description

```
s	session id
i	inode number
```

## FLOCK LOCK SECTION (FLCK)
FLOCK

line with flock-lock description

```
i	inode number
s	session id
o	lock owner (FUSE lock owner)
t	lock type ('R' - shared lock, 'W' - exclusive lock)
```

## POSIX LOCK SECTION (PLCK)
POSIXLOCK

line with posix-lock description

```
i	inode number
s	session id
o	lock owner (FUSE lock owner)
p	local process id (owner pid)
r	lock range in format <START,END)
t	lock type ('R' - shared lock, 'W' - exclusive lock)
```

## CHUNKSERVERS SECTION (CSDB)
chunk servers

number of chunkservers

CHUNCKSERVER

line with chunk server description

```
i	server ip
p	server port
#	server id
m	maintenance mode
t	maintenance timeout timestamp
```

## CHUNKS SECTION (CHNK)
nextchunkid

first available chunk number

CHUNK

line with chunk description

```
i	chunk number
v	chunk version
t	"locked to" timestamp
a	archive flag
```

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8)


mfsmetarestore

title: mfsmetarestore(8)

text:
# mfsmetarestore(8)

## NAME
mfsmetarestore - doesn't exist in this version of MooseFS

## DESCRIPTION
This tool was removed as of version 1.7. To achieve the same effect, simply start your mfsmaster with "-a" option.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8)


mfsstatsdump

title: mfsstatsdump(8)

text:
# mfsstatsdump(8)

## NAME
mfsstatsdump - dump usage data from master stats file in csv or png format

## SYNOPSIS
mfsstatsdump -f fields [-i stats_file] [-r range] [-s separator] [-p png_filename [-x chart_width] [-y chart_height]] [-hHd]

## DESCRIPTION
mfsstatsdump dumps usage data from master stats file. These are the same data sets that are used to make CGI charts. Output can be either in text format (csv) or in graphical format (png). That means -p, -x and -y options are mutually exclusive with -h, -H and -d options.

MooseFS master server saves the stats file in the DATA_PATH directory - see mfsmaster.cfg(5)

## OPTIONS
-f

field names separated by ',' (see FIELDS section); at least one field is mandatory; if an asterisk (*) is used, all fields are dumped

-i

name of mfs binary stats file (default: default_data_path/stats.mfs)

-r

range type: 0 - short range (minute) 1 - medium range (6 minutes) 2 - long range (30 minutes) 3 - very long range (day)

-s

specify column separator (default: tabulator)

-p

optional PNG filename (field name will be added before .png; YYYY -> YYYY_FIELD.png, YYYY.png -> YYYY_FIELD.png)

-x

PNG chart width (default: 1600)

-y

PNG chart height (should be divisible by 20 - if not then it will be adjusted; default:320)

-h

"human-readable" numbers using base 2 prefixes (IEC 60027)

-H

"human-readable" numbers using base 10 prefixes (SI)

-d

show timestamps in YYYY-MM-DD HH:MM format

## FIELDS
ucpu

User cpu usage

scpu

System cpu usage

cpu

Total cpu usage (in csv sum of scpu and ucpu, in png shows both in different colors)

delete

Number of chunk deletions

replicate

Number of chunk replications

statfs

Number of statfs operations

getattr

Number of getattr operations

setattr

Number of setattr operations

lookup

Number of lookup operations

mkdir

Number of mkdir operations

rmdir

Number of rmdir operations

symlink

Number of symlink operations

readlink

Number of readlink operations

mknod

Number of mknod operations

unlink

Number of unlink operations

rename

Number of rename operations

link

Number of link operations

readdir

Number of readdir operations

open

Number of open operations

read

Number of read operations

write

Number of write operations

prcvd

Received packets

psent

Sent packets

brcvd

Received bytes

bsent

Sent bytes

memoryrss

Resident memory usage

memoryvirt

Virtual memory usage

mem

Total memory usage (in csv is the same as memoryvirt, in png shows both memoryrss and memoryvirt using two colors)

usedspace

Used raw disk space

totalspace

Total raw disk space

space

Total raw disk space (in csv the same as totalspace, in png shows both usedspace and totalspace using two colors)

## OUTPUT
Text output - text (csv) file where first column is a timestamp (or date if -d option was specified), the following column are what was specified with the -f options, formatted according to used options (none, -s and -h or -H)

Graphical output - one png file with a chart is created for every field specified with the -f option, according to the naming scheme declared with the -p option. Size may be adjusted with -x and -y options.

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmount(8), moosefs(7)


mfsmetalogger

package: moosefs-metalogger

title: mfsmetalogger(8)

text:
# mfsmetalogger(8)

## NAME
mfsmetalogger - start, restart or stop Moose File System metalogger process

## SYNOPSIS
mfsmetalogger [-f] [-c CFGFILE] [-u] [-d] [-t LOCKTIMEOUT] [ACTION]

mfsmetalogger -s [-c CFGFILE]

mfsmetalogger -v

mfsmetalogger -h

## DESCRIPTION
mfsmetalogger is the metadata replication server of Moose File System. Depending on parameters it can start, restart or stop MooseFS metalogger process. Without any options it starts MooseFS metalogger, killing previously run process if lock file exists.

SIGHUP (or 'reload' ACTION) forces mfsmetalogger to reload all configuration files.

mfsmetalogger exists since 1.6.5 version of MooseFS; before this version mfschunkserver(8) was responsible of logging metadata changes.

-v

print version information and exit

-h

print usage information and exit

-f

(deprecated, use start action instead) forcily run MooseFS metalogger process, without trying to kill previous instance (this option allows to run MooseFS metalogger if stale PID file exists)

-s

(deprecated, use stop action instead) stop MooseFS metalogger process

-c CFGFILE

specify alternative path of configuration file (default is mfsmetalogger.cfg in system configuration directory)

-u

log undefined configuration values (when default is assumed)

-d

run in foreground, don't daemonize

-t LOCKTIMEOUT

how long to wait for lockfile (default is 60 seconds)

ACTION

is the one of start, stop, restart, reload, test or kill. Default action is restart unless -s (stop) or -f (start) option is given. Note that -s and -f options are deprecated, likely to disappear and ACTION parameter to become obligatory in MooseFS 1.7.

## FILES
mfsmetalogger.cfg

configuration file for MooseFS metalogger process; refer to mfsmetalogger.cfg(5) manual for details

mfsmetalogger.lock

PID file of running MooseFS metalogger process (created in RUN_PATH by MooseFS < 1.6.9)

.mfsmetalogger.lock

lock file of running MooseFS metalogger process (created in data directory since MooseFS 1.6.9)

changelog_ml.*.mfs

MooseFS filesystem metadata change logs (backup of master change log files)

metadata.ml.mfs.back

Latest copy of complete metadata.mfs.back file from MooseFS master.

sessions.ml.mfs

Latest copy of sessions.mfs file from MooseFS master.

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8), mfsmetalogger.cfg(5)


mfsnetdump

package: moosefs-netdump

title: mfsnetdump(8)

summary: dump network traffic as mfs packets

text:
# mfsnetdump(8)

## NAME
mfsnetdump - dump network traffic as mfs packets

## SYNOPSIS
mfsnetdump [-r PCAP_FILE] [-i INTERFACE] [-p PORT_RANGE] [-f PCAP_FILTER] [-c PCOUNT] [-s MBYTES] [-e COMMANDS] [-o COMMANDS] [-x] [-y] [-n]

## DESCRIPTION
mfsnetdump is an internal diagnostic tool similar to tcpdump, but specialized for MooseFS.

## OPTIONS
-r

specify PCAP file to read packets from

-i

dump packets using given network interface

-p

show only packets from given port range (default range is 9419-9422, so by default only MFS packets are shown)

-f

define pcap filter to filter packets

-c

dump only PCOUNT packets and exit

-s

dump only first MBYTES bytes of each packet

-e

do not display given commands

-o

show only given commands

-x

do not display mfs maintenance commands (such as CSTOMA_SPACE or CLTOMA_FUSE_TIME_SYNC)

-y

do not display open/close connections packets

-n

show ANTOAN_NOP command (disabled by default)

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

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

MooseFS 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html


mosquitto

package: mosquitto

title: mosquitto(8)

summary: an MQTT broker

text:
# mosquitto(8)

## NAME
mosquitto - an MQTT broker

## SYNOPSIS
mosquitto [-c config file] [-d | --daemon] [-p port number] [-v]

## DESCRIPTION
mosquitto is a broker for the MQTT protocol version 3.1.1/3.1.

## OPTIONS
-c, --config-file

Load configuration from a file. If not given, the default values as described in mosquitto.conf(5) are used.

-d, --daemon

Run mosquitto in the background as a daemon. All other behaviour remains the same.

-p, --port

Listen on the port specified instead of the default 1883. This acts in addition to the port setting in the config file. May be specified multiple times to open multiple sockets listening on different ports. This socket will be bound to all network interfaces.

-v, --verbose

Use verbose logging. This is equivalent to setting log_type to all in the configuration file. This overrides and logging options given in the configuration file.

## CONFIGURATION
The broker can be configured using a configuration file as described in mosquitto.conf(5) and this is the main point of information for mosquitto. The files required for SSL/TLS support are described in mosquitto-tls(7).

## BROKER STATUS
Clients can find information about the broker by subscribing to topics in the $SYS hierarchy as follows. Topics marked as static are only sent once per client on subscription. All other topics are updated every sys_interval seconds. If sys_interval is 0, then updates are not sent.

Note that if you are using a command line client to interact with the $SYS topics and your shell interprets $ as an environment variable, you need to place the topic in single quotes '$SYS/...' or to escape the dollar symbol: \$SYS/... otherwise the $SYS will be treated as an environment variable.

$SYS/broker/bytes/received

The total number of bytes received since the broker started.

$SYS/broker/bytes/sent

The total number of bytes sent since the broker started.

$SYS/broker/clients/connected, $SYS/broker/clients/active (deprecated)

The number of currently connected clients.

$SYS/broker/clients/expired

The number of disconnected persistent clients that have been expired and removed through the persistent_client_expiration option.

$SYS/broker/clients/disconnected, $SYS/broker/clients/inactive (deprecated)

The total number of persistent clients (with clean session disabled) that are registered at the broker but are currently disconnected.

$SYS/broker/clients/maximum

The maximum number of clients that have been connected to the broker at the same time.

$SYS/broker/clients/total

The total number of active and inactive clients currently connected and registered on the broker.

$SYS/broker/connection/#

When bridges are configured to/from the broker, common practice is to provide a status topic that indicates the state of the connection. This is provided within $SYS/broker/connection/ by default. If the value of the topic is 1 the connection is active, if 0 then it is not active. See the Bridges section below for more information on bridges.

$SYS/broker/heap/current size

The current size of the heap memory in use by mosquitto. Note that this topic may be unavailable depending on compile time options.

$SYS/broker/heap/maximum size

The largest amount of heap memory used by mosquitto. Note that this topic may be unavailable depending on compile time options.

$SYS/broker/load/connections/+

The moving average of the number of CONNECT packets received by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of connections received in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/bytes/received/+

The moving average of the number of bytes received by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of bytes received in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/bytes/sent/+

The moving average of the number of bytes sent by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of bytes sent in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/messages/received/+

The moving average of the number of all types of MQTT messages received by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of messages received in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/messages/sent/+

The moving average of the number of all types of MQTT messages sent by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of messages send in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/publish/dropped/+

The moving average of the number of publish messages dropped by the broker over different time intervals. This shows the rate at which durable clients that are disconnected are losing messages. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of messages dropped in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/publish/received/+

The moving average of the number of publish messages received by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of publish messages received in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/publish/sent/+

The moving average of the number of publish messages sent by the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of publish messages sent in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/load/sockets/+

The moving average of the number of socket connections opened to the broker over different time intervals. The final "+" of the hierarchy can be 1min, 5min or 15min. The value returned represents the number of socket connections in 1 minute, averaged over 1, 5 or 15 minutes.

$SYS/broker/messages/inflight

The number of messages with QoS>0 that are awaiting acknowledgments.

$SYS/broker/messages/received

The total number of messages of any type received since the broker started.

$SYS/broker/messages/sent

The total number of messages of any type sent since the broker started.

$SYS/broker/publish/messages/dropped

The total number of publish messages that have been dropped due to inflight/queuing limits. See the max_inflight_messages and max_queued_messages options in mosquitto.conf(5) for more information.

$SYS/broker/publish/messages/received

The total number of PUBLISH messages received since the broker started.

$SYS/broker/publish/messages/sent

The total number of PUBLISH messages sent since the broker started.

$SYS/broker/retained messages/count

The total number of retained messages active on the broker.

$SYS/broker/store/messages/count, $SYS/broker/messages/stored (deprecated)

The number of messages currently held in the message store. This includes retained messages and messages queued for durable clients.

$SYS/broker/store/messages/bytes

The number of bytes currently held by message payloads in the message store. This includes retained messages and messages queued for durable clients.

$SYS/broker/subscriptions/count

The total number of subscriptions active on the broker.

$SYS/broker/version

The version of the broker. Static.

## WILDCARD TOPIC SUBSCRIPTIONS
In addition to allowing clients to subscribe to specific topics, mosquitto also allows the use of two wildcards in subscriptions. + is the wildcard used to match a single level of hierarchy. For example, for a topic of "a/b/c/d", the following example subscriptions will match:

•a/b/c/d

•+/b/c/d

•a/+/c/d

•a/+/+/d

•+/+/+/+

The following subscriptions will not match:

•a/b/c

•b/+/c/d

•+/+/+

The second wildcard is # and is used to match all subsequent levels of hierarchy. With a topic of "a/b/c/d", the following example subscriptions will match:

•a/b/c/d

•#

•a/#

•a/b/#

•a/b/c/#

•+/b/c/#

The $SYS hierarchy does not match a subscription of "#". If you want to observe the entire $SYS hierarchy, subscribe to $SYS/#.

Note that the wildcards must be only ever used on their own, so a subscription of "a/b+/c" is not valid use of a wildcard. The # wildcard must only ever be used as the final character of a subscription.

## BRIDGES
Multiple brokers can be connected together with the bridging functionality. This is useful where it is desirable to share information between locations, but where not all of the information needs to be shared. An example could be where a number of users are running a broker to help record power usage and for a number of other reasons. The power usage could be shared through bridging all of the user brokers to a common broker, allowing the power usage of all users to be collected and compared. The other information would remain local to each broker.

For information on configuring bridges, see mosquitto.conf(5).

## SIGNALS
SIGHUP

Upon receiving the SIGHUP signal, mosquitto will attempt to reload configuration file data, assuming that the -c argument was provided when mosquitto was started. Not all configuration parameters can be reloaded without restarting. See mosquitto.conf(5) for details.

SIGUSR1

Upon receiving the SIGUSR1 signal, mosquitto will write the persistence database to disk. This signal is only acted upon if persistence is enabled.

SIGUSR2

The SIGUSR2 signal causes mosquitto to print out the current subscription tree, along with information about where retained messages exist. This is intended as a testing feature only and may be removed at any time.

## FILES
/etc/mosquitto/mosquitto.conf

Configuration file. See mosquitto.conf(5).

/var/lib/mosquitto/mosquitto.db

Persistent message data storage location if persist enabled.

/etc/hosts.allow, /etc/hosts.deny

Host access control via tcp-wrappers as described in hosts_access(5).

## BUGS
mosquitto bug information can be found at https://github.com/eclipse/mosquitto/issues

## SEE ALSO
mqtt(7), mosquitto-tls(7), mosquitto.conf(5), hosts_access(5), mosquitto_passwd(1), mosquitto_pub(1), mosquitto_rr(1), mosquitto_sub(1), libmosquitto(3)

## THANKS
Thanks to Andy Stanford-Clark for being one of the people who came up with MQTT in the first place. Thanks to Andy and Nicholas O'Leary for providing clarifications of the protocol.

Thanks also to everybody at the Ubuntu UK Podcast and Linux Outlaws for organising OggCamp, where Andy gave a talk that inspired mosquitto.

## AUTHOR
Roger Light <roger@atchoo.org>