command
stringlengths 1
42
| description
stringlengths 29
182k
⌀ | name
stringlengths 7
64.9k
⌀ | synopsis
stringlengths 4
85.3k
⌀ | options
stringclasses 593
values | examples
stringclasses 455
values |
|---|---|---|---|---|---|
avbdeviced
|
The avbdeviced executable is used for the managment of persistent AVB entities which are advertised by the Mac. avbdeviced is launched automatically by launched as needed on demand and should not be launched manually. FILES /Library/Application_Support/Apple/com.apple.avbdeviced.devices configured Entities /Library/Application_Support/Apple/com.apple.avbdeviced.entityIDs allocated Entity IDs Darwin 2/10/14 Darwin
|
avbdeviced – peristent entity management for AVB.
|
avbdeviced
| null | null |
rpcinfo
|
rpcinfo makes an RPC call to an RPC server and reports what it finds. Unless otherwise specified or noted below the default rpcbind protocol version is 3. With no or only generic options, call the rpcbind dump procedure on the specified host or “localhost” if host is not specified and display the results. For versions 3 and 4 display the program number, the version, the “netid”, the universal address that the services is listening on, symbolic name of the program if known, and then the owner that registered the ⟨program, version, netid, address⟩ tuple. For version 2 of the protocol list the program, version, protocol, port, and symbolic program name. See the option below for a typically more useful output. rpcbind defaults the netid to “tcp” for the dump procedure. The program argument can be either a name or a number. If a version is specified, rpcinfo attempts to call that version of the specified program. Otherwise, if the version is optional rpcinfo attempts to find all the registered version numbers for the specified program by calling version 0 (which is presumed not to exist; if it does exist, rpcinfo attempts to obtain this information by calling an extremely high version number instead) and attempts to call each registered version. A required transport option is needed for the second and third lines of the synopsis which is used to ping, i.e., call the null procedure of the specified program and version. The results will be displayed on stdout. If version is not specified each valid version found as described above will be called. The third synopsis will use the supplied universal address over the transport specified by netid to call the null procedure of the specified program in the same manner as above. In addition the last two lines of the synopsis can “ping” the server as described in the Legacy Options section below. GENERIC OPTIONS version Attempt to use the supplied rpcbind version. Note some options below are version specific and this option may be ignored. If specifying version 2 (portmapper), netid below must be one of “udp” or “tcp”. -T netid Specify the netid to use. Supported netids are “udp”, “tcp”, “udp6”, and “tcp6”. seconds Timeout used in creating client handles and the client calls to rpcbind. Current default is 12 seconds. Generic options may be supplied with any of the rpcinfo options below, though some options will override their values. LEGACY OPTIONS The options below imply version 2 (portmapper) rpcbind calls. They are compatible with older versions of rpcinfo. {-p |} [-T netid] [host] Probe the portmapper on host, and print a list of all registered RPC programs. If host is not specified, it defaults to the value “localhost”. {-u |} host program [version] Make an RPC call to the NULL procedure of program on the specified host using UDP, and report whether a response was received. {-t |} host program [version] Make an RPC call to the NULL procedure of program on the specified host using TCP, and report whether a response was received. {-n |} portnum Use portnum as the port number for the -t and -u options instead of the port number given by the portmapper.
|
rpcinfo – report RPC information
|
rpcinfo [version] [-m | -s] [host] rpcinfo [version] -T netid host program [version] rpcinfo [version] -a server address -T netid program [version] rpcinfo [version] -b [-T netid] program version rpcinfo [version] -d [-T netid] program version rpcinfo -l [-T netid] [host] program version rpcinfo [version] [-T netid] [host] program version rpcinfo [-T netid] [host] program version rpcinfo [-T netid] [host] program version rpcinfo [version] [-T netid] [host] rpcinfo {| -h} rpcinfo -p [host] rpcinfo [-n portnum] -u host program [version] rpcinfo [-n portnum] -t host program [version]
|
{-b |} program version Make an RPC multicast over INET6 to the RPCB_MULTICAST_ADDR, “FF02::202”, and broadcast over INET using UDP to procedure 0 of the specified program and version and report all hosts that respond. rpcifno will first use RPCBIND version 3 and then call the broadcast procedure of the portmapper protocol to collect older hosts. There is a reply cache kept so duplicates will not be returned unless the cache fills. Note that the -b option by its self is compatible with the older portmapper. However, specifying 2 will short circuit the rpcbind version 3 calls and only call the portmapper. {-d |} [-T netid] program version Delete registration for the RPC service of the specified program and version. If the netid is specified, only unregister the program and version over that transport. This option can be exercised only by the super-user or the user who registered the the RPC service. [-T netid] [host] program version Get the universal address that the client can use to contact the program and version from host over netid. If host is not specified localhost is assumed. If netid is not specified “udp” is assumed. If the specified version is not available but some other version is, return the universal address for one of those versions of the program. [-T netid] [host] program version Get the universal address that the client can use to contact the program and version from host over netid. If host is not specified localhost is assumed. If netid is not specified “udp” is assumed. If the version is not available then that will be indicated. This requires the remote rpcbind support version 4. -h Print out the synopsis of this program. Print out the synopsis and an explanation of the options. [-T netid] [host] program version Send a indirect call to the null procedure of program and version on the specified host or localhost. This requires the remote rpcbind to support version 4. {-l |} [-T netid] [host] program version List the transports available over the transport family specified by the netid for the given program and version on the optional host or localhost if not specified. Requires the remote rpcbind to support version 4. The default transport family is INET. {-m |} Print the metrics of rpcbind daemon for the specified host or localhost if not specified. Requires support for rpcbind version 4 on the remote. {-s |} Print a summary of programs registered on host or “localhost” if host is not specified. For each program registered list any versions followed by any transports supported by that program. Try to list the symbolic name of the transport and the owner that registered the program. [host] Return rpcbind's version of time on the specified host.
|
To show all of the RPC services registered on the local machine use: example% rpcinfo To show all of the RPC services registered on the machine named klaxon use: example% rpcinfo klaxon More usefully to show the services registered on klaxon use: example% rpcinfo -s klaxon To show all of the RPC services from an older host only running version 2 of rpcbind on a host named horn use: example% rpcinfo -p horn To show all machines on the local net that are running the NFS File service use: example% rpcinfo -b nfs 'version' where 'version' is one of the current nfs versions of interest. To delete the registration for version 1 of the rquotad service use: example% rpcinfo -d rquotad 1 SEE ALSO rpc(5), rpcbind(8) RPC Programming Guide. RFC 1833 Binding Protocols for ONC RPC Version 2. RFC 5665 IANA Considerations for Remote Procedure Call (RPC) Network Identifiers and Universal Address Formats. BUGS In summary mode the maximum number of versions and transports is 16. The first 16 versions and the first 16 transports received from the server are displayed and the rest is silently ignored. In the second synopsis line, for a host that is specified as a link-local INET6 address will always return “no route to host”. In releases prior to SunOS 3.0, the Network File System (NFS) did not register itself with the portmapper; rpcinfo cannot be used to make RPC calls to the NFS server on hosts running such releases. macOS 14.5 November 14, 2012 macOS 14.5
|
BootCacheControl
|
Users should not run BootCacheControl manually. macOS 14.5 April 2, 2010 macOS 14.5
|
BootCacheControl – provides control of caches used during startup.
|
BootCacheControl
| null | null |
periodic
|
The periodic utility is intended to be called by launchd(8) to execute shell scripts located in the specified directory. One or more of the following arguments must be specified: daily Perform the standard daily periodic executable run. This usually occurs early in the morning (local time). weekly Perform the standard weekly periodic executable run. This usually occurs very early on Saturday mornings. monthly Perform the standard monthly periodic executable run. This usually occurs on the first day of the month. path An arbitrary directory containing a set of executables to be run. If an argument is an absolute directory name it is used as is, otherwise it is searched for under /etc/periodic and any other directories specified by the local_periodic setting in periodic.conf(5) (see below). The periodic utility will run each executable file in the directory or directories specified. If a file does not have the executable bit set, it is silently ignored. Each script is required to exit with one of the following values: 0 The script has produced nothing notable in its output. The ⟨basedir⟩_show_success variable controls the masking of this output. 1 The script has produced some notable information in its output. The ⟨basedir⟩_show_info variable controls the masking of this output. 2 The script has produced some warnings due to invalid configuration settings. The ⟨basedir⟩_show_badconfig variable controls the masking of this output. >2 The script has produced output that must not be masked. If the relevant variable (where ⟨basedir⟩ is the base directory in which the script resides) is set to “NO” in periodic.conf, periodic will mask the script output. If the variable is not set to either “YES” or “NO”, it will be given a default value as described in periodic.conf(5). All remaining script output is delivered based on the value of the ⟨basedir⟩_output setting. If this is set to a path name (beginning with a ‘/’ character), output is simply logged to that file. newsyslog(8) knows about the files /var/log/daily.log, /var/log/weekly.log and /var/log/monthly.log, and if they exist, it will rotate them at the appropriate times. These are therefore good values if you wish to log periodic output. If the ⟨basedir⟩_output value does not begin with a ‘/’ and is not empty, it is assumed to contain a list of email addresses, and the output is mailed to them. If ⟨basedir⟩_show_empty_output is set to “NO”, then no mail will be sent if the output was empty. If ⟨basedir⟩_output is not set or is empty, output is sent to standard output. ENVIRONMENT The periodic utility sets the PATH environment to include all standard system directories, but no additional directories, such as /usr/local/bin. If executables are added which depend upon other path components, each executable must be responsible for configuring its own appropriate environment. FILES /System/Library/LaunchDaemons/com.apple.periodic-*.plist the periodic utility is typically called via these launchd(8) jobs /etc/periodic the top level directory containing daily, weekly, and monthly subdirectories which contain standard system periodic executables /etc/defaults/periodic.conf the periodic.conf system registry contains variables that control the behaviour of periodic and the standard daily, weekly, and monthly scripts /etc/periodic.conf this file contains local overrides for the default periodic configuration EXIT STATUS Exit status is 0 on success and 1 if the command fails.
|
periodic – run periodic system functions
|
periodic directory ...
| null |
The /etc/defaults/periodic.conf system registry will typically have a local_periodic variable reading: local_periodic="/usr/local/etc/periodic" To log periodic output instead of receiving it as email, add the following lines to /etc/periodic.conf: daily_output=/var/log/daily.log weekly_output=/var/log/weekly.log monthly_output=/var/log/monthly.log To only see important information from daily periodic jobs, add the following lines to /etc/periodic.conf: daily_show_success=NO daily_show_info=NO daily_show_badconfig=NO DIAGNOSTICS The command may fail for one of the following reasons: usage: periodic <directory of files to execute> No directory path argument was passed to periodic to specify where the script fragments reside. <directory> not found Self explanatory. SEE ALSO sh(1), periodic.conf(5), launchd(8), newsyslog(8) HISTORY The periodic utility first appeared in FreeBSD 3.0. AUTHORS Paul Traina ⟨pst@FreeBSD.org⟩ Brian Somers ⟨brian@Awfulhak.org⟩ BUGS Since one specifies information about a directory using shell variables containing the string, ⟨basedir⟩, ⟨basedir⟩ must only contain characters that are valid within a sh(1) variable name, alphanumerics and underscores, and the first character may not be numeric. macOS 14.5 August 30, 2007 macOS 14.5
|
accton
|
The accton utility is used for switching system accounting on or off. If called with the argument acctfile, system accounting is enabled. The acctfile specified must exist prior to starting system accounting, or accton will return an error. A record of every process that is started by the execve(2) system call and then later exits the system is stored in acctfile. The sa(8) command may be used to examine the accounting records. If no arguments are given, system accounting is disabled. FILES /var/account/acct default accounting file SEE ALSO lastcomm(1), acct(2), acct(5), sa(8) macOS 14.5 May 21, 1993 macOS 14.5
|
accton – enable/disable system accounting
|
accton [acctfile]
| null | null |
wfsctl
| null |
wfsctl – WebDAV File Sharing control utility SYNOPSYS wfsctl command [arg] OVERVIEW The wfsctl utility allows administrators to start, stop, and check the status of the WebDAV File Sharing service (WFS). It also allows administrators to create and delete WebDAV share points. It operates by configuring the Apache httpd server. The wfsctl command requires root privileges. COMMANDS wfsctl provides the following commands: start Enable the WFS configuration, and either start or restart the Apache web server to pick it up. If necessary, this action will create an SSL Identity matching the machine's host name as determined by the hostname(1) command, and place it in the System keychain. It will also update, if necessary, environment variable definitions for use by parameterized httpd config files. (Note that starting the Apache web server is the equivalent of "apachectl start" which loads a launch job for the httpd process.) stop Disable the WFS configuration, and restart Apache if it's already running. status Display the status of WFS, either "enabled" or "disabled", whether or not Apache is running. shares Display existing WebDAV share points. share path Create a WebDAV share point for the specified file system path. unshare path | name Disable WebDAV for the share point at the specified file system path or share point name, and delete the share point if no other file sharing service (AFP or SMB) was enabled on that share point. diagnose Display detailed status of Apache and WebDAV- related processes. DETAILS WebDAV File Sharing operates by: 1. Recognizing WebDAV clients when they send OPTIONS or PROPFIND directives 2. Requiring such clients to provide OD credentials 3. Assigning those authenticated users an HTTP cookie to recognize them as WebDAV clients 4. Launching an instance of the Apache httpd process on behalf of that user, configured as a WebDAV server 5. Reverse-proxying HTTP traffic to that user-specific instance of httpd, so that the WebDAV client (typically an iWork app on iOS) can access the home directory and share points on the server machine with privileges of the authenticated user 6. Recognizing share points that are marked as WebDAV share points. Depending on how Apache is configured, this can coexist with other Apache web service functions. NOTES • WebDAV File Sharing requires SSL, and uses Basic authentication, with credentials that would otherwise be sent in the clear over the network. Also note that it uses Apache modules mod_ssl for SSL, and mod_authnz_od_apple for Basic authentication with OpenDirectory credentials. • The name "webdav" is reserved (it triggers special handling of URLs), so share point paths named "/webdav" or containing "webdav" as a subpath are not allowed. And folders named "webdav" within share points won't be usable. There are no restrictions on case variants such as "WebDAV", or other variants such as "webdav.d". • DropBox folders cannot be accessed via WebDAV File Sharing. CONFIGURABLE SETTINGS Certain settings are kept in /etc/wfs/wfs.plist and are configurable by the administrator, including: ServerName The host name the Apache web server should use, and also the Common Name of the identity certificate. If this is not configured, or set to an empty string, the hostname(1) of the machine is used. ServerAddr The IP address the Apache web server should use to listen for HTTPS requests. Default is "*", which means all addresses. ServerPort The TCP port the Apache web server should use to listen for HTTPS requests. Default is the standard HTTPS port, 443. AccessGroup The Open Directory group allowed access to the WebDAV File Sharing service. The default is "everyone", which gives access to any authenticated user. Administrators can change this setting to restrict access further. Authenticated users will have, at most, the privileges they are normally allowed by file system permissions. There is no provision for guest access, so unauthenticated users have no access. SynthesizeSharePointForUserHomeDir Whether to allow remote WebDAV clients to see their home directory as a share point. Default is True. The Apache config file for WebDAV File Sharing is parameterized, and the httpd server is managed by the httpd-wrapper utility, which passes parameters to httpd. This is normally transparent, but note that to check the Apache config file syntax, do not use "apachectl configtest" or "httpd -t". Instead, use "httpd-wrapper -t". RETURN VALUES wfsctl returns a status code of 0 for success. In the event of failure it returns a non-zero status, and may also dump additional diagnostic information. WEBDAV CLIENTS • WebDAV clients must be properly configured to access WebDAV Shares on a remote host. • WebDAV clients include certain iOS apps, like Numbers, Keynote, and Pages, and the macOS Finder's Connect-to-Server. (Note that the iOS Files app does not find WebDAV File Sharing locations.) • WebDAV clients must usually be configured with a full URL of the host, with a scheme of https (since an http->https redirect is not generally compatible with WebDAV operations). It's not necessary to specify /webdav in the path. So for example, the "Server Name" might be specified as: https://hostname.example.com • The configurable virtual host behavior once provided by macOS Server is not available, so WebDAV clients may not be able to use alternate host names in their URLs. FILES /etc/wfs/httpd_webdavsharing.conf The parameterized Apache config file for the main instance of httpd /etc/wfs/httpd_webdavsharing_template.conf The parameterized Apache config file for the user-specific instances of httpd /etc/wfs/httpd_webdavsharing_sharepoints.conf The Apache config file providing directives specific to each share point; dynamically generated when share points are modified by wfsctl /etc/wfs/wfs.plist The file where admin-configurable settings for WFS are stored. /etc/apache2/env.plist The file where environment variable definitions are managed automatically; these variables are passed to httpd for use in parameterized config files. /Library/Logs/WebDAVFileSharing.log The main WebDAV File Sharing log file /etc/apache2/other/httpd_webdavsharing.conf A symlink seen by Apache when WebDAV File Sharing is enabled. When WebDAV File Sharing is disabled, this symlink is moved aside. /var/run/webdavsharing/<username>/ A directory created on the behalf of each authenticated user to store user-specific WebDAV File Sharing logs. /usr/share/sandbox/wfs.sb The parameterized sandbox profile for user-specific httpd instances. /etc/wfs/wfs.sb The dynamically generated portion of the sandbox profile SERVER APP When macOS Server is installed and promoted, and the Apache instance for Profile Manager is enabled, WebDAV File Sharing is reconfigured to support the WebDAV behaviors presented by Server: 1. macOS Server provides HTTP-based services (for Profile Manager) on standard HTTP/S TCP ports 80 and 443. So to avoid port conflict, the desktop Apache configuration (including the configuration for WebDAV File Sharing) is switched to port 81, on localhost only, and WFS traffic is reverse proxied to localhost:81. 2. macOS Server manages its own SSL certificates, and provides the SSL endpoint. So the desktop Apache configuration for WebDAV File Sharing is switched to non-SSL. When macOS Server is installed and promoted, and the Apache instance for Profile Manager is enabled, it is still possible to use wfsctl to manage WebDAV share points, e. g.: sudo wfsctl share /Volumes/Data/Share1 3. Any share points created in the UI on versions of macOS Server that predate High Sierra remain across updates, and those that were marked as WebDAV share points should continue to be available after the update to High Sierra or newer, whether or not macOS Server is installed. When the Apache instance for Profile Manager is disabled, or when macOS Server is removed or demoted, the port changes and SSL changes described above are reversed. SEE ALSO httpd(8) httpd-wrapper(8) macOS Sept. 20, 2017 macOS
| null | null | null |
postalias
|
The postalias(1) command creates or queries one or more Postfix alias databases, or updates an existing one. The input and output file formats are expected to be compatible with Sendmail version 8, and are expected to be suitable for the use as NIS alias maps. If the result files do not exist they will be created with the same group and other read permissions as their source file. While a database update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire database, in order to avoid surprises in spectator processes. The format of Postfix alias input files is described in aliases(5). By default the lookup key is mapped to lowercase to make the lookups case insensitive; as of Postfix 2.3 this case folding happens only with tables whose lookup keys are fixed-case strings such as btree:, dbm: or hash:. With earlier versions, the lookup key is folded even with tables where a lookup field can match both upper and lower case text, such as regexp: and pcre:. This resulted in loss of information with $number substitutions. Options: -c config_dir Read the main.cf configuration file in the named directory instead of the default configuration directory. -d key Search the specified maps for key and remove one entry per map. The exit status is zero when the requested information was found. If a key value of - is specified, the program reads key values from the standard input stream. The exit status is zero when at least one of the requested keys was found. -f Do not fold the lookup key to lower case while creating or querying a table. With Postfix version 2.3 and later, this option has no effect for regular expression tables. There, case folding is controlled by appending a flag to a pattern. -i Incremental mode. Read entries from standard input and do not truncate an existing database. By default, postalias(1) creates a new database from the entries in file_name. -N Include the terminating null character that terminates lookup keys and values. By default, postalias(1) does whatever is the default for the host operating system. -n Don't include the terminating null character that terminates lookup keys and values. By default, postalias(1) does whatever is the default for the host operating system. -o Do not release root privileges when processing a non-root input file. By default, postalias(1) drops root privileges and runs as the source file owner instead. -p Do not inherit the file access permissions from the input file when creating a new file. Instead, create a new file with default access permissions (mode 0644). -q key Search the specified maps for key and write the first value found to the standard output stream. The exit status is zero when the requested information was found. If a key value of - is specified, the program reads key values from the standard input stream and writes one line of key: value output for each key that was found. The exit status is zero when at least one of the requested keys was found. -r When updating a table, do not complain about attempts to update existing entries, and make those updates anyway. -s Retrieve all database elements, and write one line of key: value output for each element. The elements are printed in database order, which is not necessarily the same as the original input order. This feature is available in Postfix version 2.2 and later, and is not available for all database types. -u Disable UTF-8 support. UTF-8 support is enabled by default when "smtputf8_enable = yes". It requires that keys and values are valid UTF-8 strings. -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. -w When updating a table, do not complain about attempts to update existing entries, and ignore those attempts. Arguments: file_type The database type. To find out what types are supported, use the "postconf -m" command. The postalias(1) command can query any supported file type, but it can create only the following file types: btree The output is a btree file, named file_name.db. This is available on systems with support for db databases. cdb The output is one file named file_name.cdb. This is available on systems with support for cdb databases. dbm The output consists of two files, named file_name.pag and file_name.dir. This is available on systems with support for dbm databases. hash The output is a hashed file, named file_name.db. This is available on systems with support for db databases. fail A table that reliably fails all requests. The lookup table name is used for logging only. This table exists to simplify Postfix error tests. sdbm The output consists of two files, named file_name.pag and file_name.dir. This is available on systems with support for sdbm databases. When no file_type is specified, the software uses the database type specified via the default_database_type configuration parameter. The default value for this parameter depends on the host environment. file_name The name of the alias database source file when creating a database. DIAGNOSTICS Problems are logged to the standard error stream and to syslogd(8). No output means that no problems were detected. Duplicate entries are skipped and are flagged with a warning. postalias(1) terminates with zero exit status in case of success (including successful "postalias -q" lookup) and terminates with non-zero exit status in case of failure. ENVIRONMENT MAIL_CONFIG Directory with Postfix configuration files. MAIL_VERBOSE Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant to this program. The text below provides only a parameter summary. See postconf(5) for more details including examples. alias_database (see 'postconf -d' output) The alias databases for local(8) delivery that are updated with "newaliases" or with "sendmail -bi". config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf configuration files. berkeley_db_create_buffer_size (16777216) The per-table I/O buffer size for programs that create Berkeley DB hash or btree tables. berkeley_db_read_buffer_size (131072) The per-table I/O buffer size for programs that read Berkeley DB hash or btree tables. default_database_type (see 'postconf -d' output) The default database type for use in newaliases(1), postalias(1) and postmap(1) commands. import_environment (see 'postconf -d' output) The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides. smtputf8_enable (yes) Enable preliminary SMTPUTF8 support for the protocols described in RFC 6531..6533. syslog_facility (mail) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". STANDARDS RFC 822 (ARPA Internet Text Messages) SEE ALSO aliases(5), format of alias database input file. local(8), Postfix local delivery agent. postconf(1), supported database types postconf(5), configuration parameters postmap(1), create/update/query lookup tables newaliases(1), Sendmail compatibility interface. syslogd(8), system logging README FILES Use "postconf readme_directory" or "postconf html_directory" to locate this information. DATABASE_README, Postfix lookup table overview LICENSE The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA POSTALIAS(1)
|
postalias - Postfix alias database maintenance
|
postalias [-Nfinoprsuvw] [-c config_dir] [-d key] [-q key] [file_type:]file_name ...
| null | null |
slapacl
|
slapacl is used to check the behavior of slapd(8) by verifying access to directory data according to the access control list directives defined in its configuration. It opens the slapd.conf(5) configuration file or the slapd-config(5) backend, reads in the access/olcAccess directives, and then parses the attr list given on the command-line; if none is given, access to the entry pseudo-attribute is tested.
|
slapacl - Check access to a list of attributes.
|
/usr/sbin/slapacl -b_DN [-d_debug-level] [-D_authcDN_| -U_authcID] [-f_slapd.conf] [-F_confdir] [-o_option[=value]] [-u] [-v] [-X_authzID_| -o authzDN=DN] [attr[/access][:value]] [...]
|
-b_DN specify the DN which access is requested to; the corresponding entry is fetched from the database, and thus it must exist. The DN is also used to determine what rules apply; thus, it must be in the naming context of a configured database. See also -u. -d_debug-level enable debugging messages as defined by the specified debug-level; see slapd(8) for details. -D_authcDN specify a DN to be used as identity through the test session when selecting appropriate <by> clauses in access lists. -f_slapd.conf specify an alternative slapd.conf(5) file. -F_confdir specify a config directory. If both -f and -F are specified, the config file will be read and converted to config directory format and written to the specified directory. If neither option is specified, an attempt to read the default config directory will be made before trying to use the default config file. If a valid config directory exists then the default config file is ignored. -o_option[=value] Specify an option with a(n optional) value. Possible generic options/values are: syslog=<subsystems> (see `-s' in slapd(8)) syslog-level=<level> (see `-S' in slapd(8)) syslog-user=<user> (see `-l' in slapd(8)) Possible options/values specific to slapacl are: authzDN domain peername sasl_ssf sockname sockurl ssf tls_ssf transport_ssf See the related fields in slapd.access(5) for details. -u do not fetch the entry from the database. In this case, if the entry does not exist, a fake entry with the DN given with the -b option is used, with no attributes. As a consequence, those rules that depend on the contents of the target object will not behave as with the real object. The DN given with the -b option is still used to select what rules apply; thus, it must be in the naming context of a configured database. See also -b. -U_authcID specify an ID to be mapped to a DN as by means of authz-regexp or authz-rewrite rules (see slapd.conf(5) for details); mutually exclusive with -D. -v enable verbose mode. -X_authzID specify an authorization ID to be mapped to a DN as by means of authz-regexp or authz-rewrite rules (see slapd.conf(5) for details); mutually exclusive with -o authzDN=DN.
|
The command /usr/sbin/slapacl -f /etc/openldap/slapd.conf -v \ -U bjorn -b "o=University of Michigan,c=US" \ "o/read:University of Michigan" tests whether the user bjorn can access the attribute o of the entry o=University of Michigan,c=US at read level. SEE ALSO ldap(3), slapd(8), slaptest(8), slapauth(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.4.28 2011/11/24 SLAPACL(8C)
|
edquota
|
Edquota is a quota editor. By default, or if the -u flag is specified, one or more users may be specified on the command line. For each user a temporary file is created with an ASCII representation of the current disk quotas for that user. The list of filesystems with user quotas is determined by scanning the mounted filesystems for a .quota.ops.user file located at its root. An editor is invoked on the ASCII file. The editor invoked is vi(1) unless the environment variable EDITOR specifies otherwise. The quotas may then be modified, new quotas added, etc. Setting a quota to zero indicates that no quota should be imposed. Setting a hard limit to one indicates that no allocations should be permitted. Setting a soft limit to one with a hard limit of zero indicates that allocations should be permitted on only a temporary basis (see -t below). The current usage information in the file is for informational purposes; only the hard and soft limits can be changed. On leaving the editor, edquota reads the temporary file and modifies the binary quota files to reflect the changes made. The binary quota file, .quota.user is stored at the root of the filesystem. The default filename and root location for the user quotas cannot be overridden. If the -p flag is specified, edquota will duplicate the quotas of the prototypical user specified for each user specified. This is the normal mechanism used to initialize quotas for groups of users. If the -g flag is specified, edquota is invoked to edit the quotas of one or more groups specified on the command line. The list of filesystems with group quotas is determined by scanning the mounted filesystems for a .quota.ops.group file located at its root. Similarly, the binary quota file, .quota.group is stored at the root of the filesystem. The default filename and root location for group quotas cannot be overridden. The -p flag can be specified in conjunction with the -g flag to specify a prototypical group to be duplicated among the listed set of groups. Users are permitted to exceed their soft limits for a grace period that may be specified per filesystem. Once the grace period has expired, the soft limit is enforced as a hard limit. The default grace period for a filesystem is specified in /usr/include/sys/quota.h. The -t flag can be used to change the grace period. By default, or when invoked with the -u flag, the grace period is set for each filesystem with a .quota.ops.user file located at its root. When invoked with the -g flag, the grace period is set for each filesystem with a .quota.ops.group file located at its root. The grace period may be specified in days, hours, minutes, or seconds. Setting a grace period to zero indicates that the default grace period should be imposed. Setting a grace period to one second indicates that no grace period should be granted. Only the super-user may edit quotas. FILES Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence indicates that quotas are to be enabled for that filesystem. The binary data files will be created by edquota, if they don't already exist. .quota.user data file containing user quotas .quota.group data file containing group quotas .quota.ops.user mount option file used to enable user quotas .quota.ops.group mount option file used to enable group quotas SEE ALSO quota(1), quotactl(2), quotacheck(8), quotaon(8), repquota(8) DIAGNOSTICS Various messages about inaccessible files; self-explanatory. macOS 14.5 March 28, 2002 macOS 14.5
|
edquota – edit user quotas
|
edquota [-u] [-p proto-username] username ... edquota -g [-p proto-groupname] groupname ... edquota -t [-u] edquota -t -g
| null | null |
sndiskmove
|
sndiskmove is a utility for migrating the contents of a disk to a new disk. This is accomplished by copying the data from the disk and relabeling the destination disk with the name of the source disk. The source disk is also relabeled with its original name with a suffix added (this is ".old" by default but this can be changed with the -s option. WARNING: Using this command incorrectly can cause loss of data. Please ensure that you understand the procedures to safely execute this command completely. Also, this command is not supported for filesystem disks that contain data, it must be used for Exclusive Metadata or Journal disks only. Attempting to run this command on a disk that is being used on an actively running filesystem will cause data corruption. All referencing filesystems must be stopped and remain stopped during the processing of this command. If successful, the command will cause the local fsmpm process to rescan the disks on the host where the command is executed. If there are any FSMs configured on other hosts, it is critical to request a rescan of the disks before reenabling the FSM on those servers by invoking cvadmin -e 'disks refresh' on those hosts.
|
sndiskmove - Xsan File System Disk Mover Utility
|
sndiskmove [-fqv] [-s suffix] [-b bufMB] [-S file] SourceVolume_DestinationVolume
|
-f Forces the disk data to be moved without confirmation from the user. WARNING: Use this flag with extreme caution! -q Run in quiet mode. This disables the progress display. -v Causes sndiskmove to be verbose. -s suffix Uses the supplied suffix to relabel the source disk. -b bufsizeMB Specifies the buffer size to use for the copying of disk data (in megabytes). The default value is 4MB. -S file Writes status monitoring information in the supplied file. This is used internally by Xsan and the format of this file may change. NOTES The source and destination disks must contain EFI labels. VTOC labels are not supported. Also, the sector sizes used by the source and destination disks must be the same. SEE ALSO cvadmin(8), cvlabel(8) Xsan File System May 2020 SNDISKMOVE(8)
| null |
pdisk
|
pdisk is a menu driven program which partitions disks using the standard Apple disk partitioning scheme described in "Inside Macintosh: Devices". It does not support the Intel/DOS partitioning scheme supported by fdisk(8). Supported options are: -a --abbr Abbreviate the partition types shown in the partition list. -c --compute_size Causes pdisk to always ignore the device size listed in the partition table and compute the device size by other means. -d --debug Turns on debugging. Doesn't add that much output, but does add a new command ‘x’ to the editing commands that accesses an eclectic bunch of undocumented functionality. -f --fname Show HFS volume names instead of partition name when available. -h --help Prints a short help message. -i --interactive Causes pdisk to go into an interactive mode similar to the MacOS version of the program. -l --list If no device argument is given, pdisk tries to list partition tables for all available drives. Otherwise, pdisk lists the partition tables for the specified devices. -L --logical Show partition limits in logical blocks. Default is physical blocks. -r --readonly Prevents pdisk from writing to the device. -v --version Prints the version number of pdisk. Editing Partition Tables An argument which is simply the name of a device indicates that pdisk should edit the partition table of that device. The current top level editing commands are: C (create with type also specified) c create new partition d delete a partition h command help i initialize partition map n (re)name a partition P (print ordered by base address) p print the partition table q quit editing (don't save changes) r reorder partition entry in map s change size of partition map t change the type of an existing partition w write the partition table Commands which take arguments prompt for each argument in turn. You can also type any number of the arguments separated by spaces and those prompts will be skipped. The only exception to typeahead are the confirmation prompts on the i and w commands, since if we expect you to confirm the decision, we shouldn't undermine that by allowing you to be precipitate about it. Partitions are always specified by their number, which is the index of the partition entry in the partition map. Most of the commands will change the index numbers of all partitions after the affected partition. You are advised to print the table as frequently as necessary. The c (create new partition) command is the only one with complicated arguments. The first argument is the base address (in blocks) of the partition. Besides a raw number, you can also specify a partition number followed by the letter ‘p’ to indicate that the first block of the new partition should be the same as the first block of that existing free space partition. The second argument is the length of the partition in blocks. This can be a raw number or can be a partition number followed by the letter ‘p’ to use the size of that partition or can be a number followed by ‘k’, ‘m’, or ‘g’ to indicate the size in kilobytes, megabytes, or gigabytes respectively. (These are powers of 1024, of course, not powers of 1000.) The third argument is the name of the partition. This can be a single word without quotes, or a string surrounded by single or double quotes. The C command is similar to the c command, with the addition of a partition type argument after the other arguments. The i (initalize) command prompts for the size of the device. The n (name) command allows the name of a partition to be changed. The r (reorder) command allows the index number of partitions to be changed. The index numbers are constrained to be a contiguous sequence. The t (change partition type) command allows the type of a partition to be changed. The w (write) command writes the partition map out. SEE ALSO fdisk(8), gpt(8), newfs(8) HISTORY The pdisk utility was originally developed for MkLinux. AUTHORS Eryk Vershen BUGS Some people believe there should really be just one disk partitioning utility. Filesystem volume names are out of place in a partition utility. This utility supports HFS volume names, but not volume names of any other filesystem types. The --logical option has not been heavily tested. macOS 14.5 April 24, 2003 macOS 14.5
|
pdisk – Apple partition table editor
|
pdisk [-acdfhilLrv] [--abbr] [--compute_size] [--debug] [--fname] [--help] [--interactive] [--list] [--logical] [--readonly] [--version] [device ...]
| null | null |
amt
|
The amt utility is used to verify that the low level functions necessary to enforce requirements of the Controlled Access Protection Profile (CAPP) are working correctly. The amt utility must be executed with sufficient privileges and performs the following tests: Memory Read and Write This test allocates between 5% to 10% of physical memory and writes data to it, then reads the memory back to ensure the values written remain unchanged. Memory Separation and Protection This test ensures that user space programs cannot read and write to areas of memory that is protected or is not shared. Privileged Instructions This test ensures that the enforcement of the property that privileged instructions should only be in supervisor mode is still in effect. The set of privileged instructions tested to confirm this is architecture dependent. The options are as follows: -m Skip the memory test. -p Skip the privileged instructions test. -q Suppress the screen output. -s Skip the memory separation and protection test. EXIT CODES <0 An error occured in executing the tests. =0 All the tests passed. >0 The number of tests that failed or were skipped. NOTES The overall result (pass or fail) is logged in the audit trail and system log. The auditd(8) daemon must already be running for the results to be stored in the audit trail file. One of the above test may be skipped without getting a negative result. A test is skipped either with one of the above command-line options or automatically if there is not a test compatiable with the Target Of Evaluation (TOE). The audit administrator may want to perform the memory test only on startup since it can have large negative impact on the system performance. SEE ALSO audit(2) auditd(8) syslog(3) syslogd(8) macOS 14.5 August 14, 2008 macOS 14.5
|
amt – Abstract Machine Test Utility SYNOPSIS (NOW DEPRECATED) amt [-m] [-p] [-q] [-s]
| null | null | null |
lpadmin
|
lpadmin configures printer and class queues provided by CUPS. It can also be used to set the server default printer or class. When specified before the -d, -p, or -x options, the -E option forces encryption when connecting to the server. The first form of the command (-d) sets the default printer or class to destination. Subsequent print jobs submitted via the lp(1) or lpr(1) commands will use this destination unless the user specifies otherwise with the lpoptions(1) command. The second form of the command (-p) configures the named printer or class. The additional options are described below. The third form of the command (-x) deletes the printer or class destination. Any jobs that are pending for the destination will be removed and any job that is currently printed will be aborted.
|
lpadmin - configure cups printers and classes
|
lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -d destination lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -p destination [ -R name-default ] option(s) lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -x destination
|
The following options are recognized when configuring a printer queue: -c class Adds the named printer to class. If class does not exist it is created automatically. -m model Sets a standard PPD file for the printer from the model directory or using one of the driver interfaces. Use the -m option with the lpinfo(8) command to get a list of supported models. The model "raw" clears any existing PPD file and the model "everywhere" queries the printer referred to by the specified IPP device-uri. Note: Models other than "everywhere" are deprecated and will not be supported in a future version of CUPS. -o cupsIPPSupplies=true -o cupsIPPSupplies=false Specifies whether IPP supply level values should be reported. -o cupsSNMPSupplies=true -o cupsSNMPSupplies=false Specifies whether SNMP supply level (RFC 3805) values should be reported. -o job-k-limit=value Sets the kilobyte limit for per-user quotas. The value is an integer number of kilobytes; one kilobyte is 1024 bytes. -o job-page-limit=value Sets the page limit for per-user quotas. The value is the integer number of pages that can be printed; double-sided pages are counted as two pages. -o job-quota-period=value Sets the accounting period for per-user quotas. The value is an integer number of seconds; 86,400 seconds are in one day. -o job-sheets-default=banner -o job-sheets-default=banner,banner Sets the default banner page(s) to use for print jobs. -o name=value Sets a PPD option for the printer. PPD options can be listed using the -l option with the lpoptions(1) command. -o name-default=value Sets a default server-side option for the destination. Any print- time option can be defaulted, e.g., "-o number-up-default=2" to set the default "number-up" option value to 2. -o port-monitor=name Sets the binary communications program to use when printing, "none", "bcp", or "tbcp". The default program is "none". The specified port monitor must be listed in the printer's PPD file. -o printer-error-policy=name Sets the policy for errors such as printers that cannot be found or accessed, don't support the format being printed, fail during submission of the print data, or cause one or more filters to crash. The name must be one of "abort-job" (abort the job on error), "retry-job" (retry the job at a future time), "retry- current-job" (retry the current job immediately), or "stop- printer" (stop the printer on error). The default error policy is "stop-printer" for printers and "retry-current-job" for classes. -o printer-is-shared=true -o printer-is-shared=false Sets the destination to shared/published or unshared/unpublished. Shared/published destinations are publicly announced by the server on the LAN based on the browsing configuration in cupsd.conf, while unshared/unpublished destinations are not announced. The default value is "true". -o printer-op-policy=name Sets the IPP operation policy associated with the destination. The name must be defined in the cupsd.conf in a Policy section. The default operation policy is "default". -R name-default Deletes the named option from printer. -r class Removes the named printer from class. If the resulting class becomes empty it is removed. -u allow:{user|@group}{,user|,@group}* -u deny:{user|@group}{,user|,@group}* -u allow:all -u deny:none Sets user-level access control on a destination. Names starting with "@" are interpreted as UNIX groups. The latter two forms turn user-level access control off. Note: The user 'root' is not granted special access - using "-u allow:foo,bar" will allow users 'foo' and 'bar' to access the printer but NOT 'root'. -v "device-uri" Sets the device-uri attribute of the printer queue. Use the -v option with the lpinfo(8) command to get a list of supported device URIs and schemes. -D "info" Provides a textual description of the destination. -E When specified before the -d, -p, or -x options, forces the use of TLS encryption on the connection to the scheduler. Otherwise, enables the destination and accepts jobs; this is the same as running the cupsaccept(8) and cupsenable(8) programs on the destination. -L "location" Provides a textual location of the destination. DEPRECATED OPTIONS The following lpadmin options are deprecated: -i filename This option historically has been used to provide either a System V interface script or (as an implementation side-effect) a PPD file. Note: Interface scripts are not supported by CUPS. PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS. -P ppd-file Specifies a PostScript Printer Description (PPD) file to use with the printer. Note: PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS. CONFORMING TO Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". Also, printer and class names are not case-sensitive. Finally, the CUPS version of lpadmin may ask the user for an access password depending on the printing system configuration. This differs from the System V version which requires the root user to execute this command. NOTES CUPS printer drivers and backends are deprecated and will no longer be supported in a future feature release of CUPS. Printers that do not support IPP can be supported using applications such as ippeveprinter(1). The CUPS version of lpadmin does not support all of the System V or Solaris printing system configuration options. Interface scripts are not supported for security reasons. The double meaning of the -E option is an unfortunate historical oddity. The lpadmin command communicates with the scheduler (cupsd) to make changes to the printing system configuration. This configuration information is stored in several files including printers.conf and classes.conf. These files should not be edited directly and are an implementation detail of CUPS that is subject to change at any time. EXAMPLE Create an IPP Everywhere print queue: lpadmin -p myprinter -E -v ipp://myprinter.local/ipp/print -m everywhere SEE ALSO cupsaccept(8), cupsenable(8), lpinfo(8), lpoptions(1), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS lpadmin(8)
| null |
fdisk
|
In order for the BIOS to boot the kernel, certain conventions must be adhered to. Sector 0 of a bootable hard disk must contain boot code, an MBR partition table, and a magic number (0xAA55). These MBR partitions (also known as BIOS partitions) can be used to break the disk up into several pieces. The BIOS loads sector 0 of the boot disk into memory, verifies the magic number, and begins executing the code at the first byte. The normal DOS MBR boot code searches the MBR partition table for an “active” partition (indicated by a ‘*’ in the first column), and if one is found, the boot block from that partition is loaded and executed in place of the original (MBR) boot block. The options are as follows: -i Initialize the MBR sector. -a style Specify an automatic partitioning style. -e Edit existing MBR sectors. -f mbrname Specifies an alternate MBR template file. -u Update MBR code, preserving existing partition table. -y Do not ask for confirmation before writing. -d Dump partition table in a format readable by the -r option. -r Read a partition table from the standard input. -t Test if the disk is partitioned. -c cylinders, -h heads, -s sectors Specifies an alternate BIOS geometry for fdisk to use. -S size Specify the disk size in blocks. -b size Specify the number of bytes per disk block. The DOS fdisk program can be used to divide space on the disk into partitions and set one active. This fdisk program serves a similar purpose to the DOS program. When called with no special flags, it prints the MBR partition table of the specified device, i.e., # fdisk fd0 Disk: fd0 geometry: 80/2/18 [2880 sectors] Offset: 0 Signature: 0xAA55 Starting Ending #: id cyl hd sec - cyl hd sec [ start - size] ---------------------------------------------------------------------- *1: A6 0 0 1 - 79 1 18 [ 0 - 2880] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused 3: A7 0 0 2 - 79 1 18 [ 1 - 2879] NEXTSTEP 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused The geometry displayed is a synthetic geometry unless another geometry has been selected using the -c, -h, -s, -S, and -b options. In the future, fdisk will read the BIOS geometry from the IOKit registry. In this example, the disk is divided into two partitions that happen to fill the disk. The first partition overlaps the third partition. (Used for debugging purposes.) # Number of partition table entry. A “*” denotes the bootable partition. id System identifier. OpenBSD reserves the magic number 166 decimal (A6 in hex). If no 166 partition is found, it will use an older FreeBSD partition (with a magic number of 165 or A5 in hex). cyl/hd/sec These fields provide the starting and ending address of the partition in BIOS geometry start/size These fields provide the starting sector and size in sectors of the partition in linear block addresses. NOTE: The sectors field is “1 based”, and the start field is “0 based”. The CHS values may need to be in the BIOS's geometry for older systems to be able to boot and use the drive correctly; most modern systems prefer the starting sector and size in preference to the CHS values. The -i flag is used to indicate that the partition data is to be initialized. In this mode, fdisk will completely overwrite the primary MBR and partition table, either using the default MBR template, or the one specified by the -f flag. In the default template, partition number 1 will be configured as a Darwin boot partition spanning from cylinder 0, head 1, sector 1, and extending for 8 megabytes. Partition number 2 will be configured as a Darwin HFS partition spanning the rest of the disk. This mode is designed to initialize an MBR the very first time, or when it has been corrupted beyond repair. You can specify other default partition styles with the -a flag. The available styles are: boothfs Creates an 8Mb boot partition (type AB hex) and makes the rest of the disk a Darwin HFS partition (type AF hex). hfs Makes the entire disk one HFS+ partition (type AF hex). dos Makes the entire disk one DOS partition (type 0C hex). raid Makes the entire disk one type AC hex partition. The -u flag is used to update the MBR code on a given drive. The MBR code extends from offset 0x000 to the start of the partition table at offset 0x1BE. It is similar to the -i flag, except the existing partition table is preserved. This is useful for writing new MBR code onto an existing drive, and is equivalent to the DOS command “FDISK /MBR”. Note that this option will overwrite the NT disk signature, if present. The -u and -i flags may not be specified together. The flag -e is used to modify a partition table using a interactive edit mode of the fdisk program. This mode is designed to allow you to change any partition on the drive you choose, including extended partitions. It is a very powerful mode, but is safe as long as you do not execute the write command, or answer in the negative (the default) when fdisk asks you about writing out changes. COMMAND MODE When you first enter this mode, you are presented with a prompt, that looks like so: fdisk: 0>. This prompt has two important pieces of information for you. It will tell you if the in-memory copy of the boot block has been modified or not. If it has been modified, the prompt will change to look like: fdisk:*0>. The second piece of information pertains to the number given in the prompt. This number specifies the disk offset of the currently selected boot block you are editing. This number could be something different that zero when you are editing extended partitions. The list of commands and their explanations are given below. help Display a list of commands that fdisk understands in the interactive edit mode. manual Display this manual page. reinit Initialize the currently selected, in-memory copy of the boot block. auto Partition the disk with one of the automatic partition styles. disk Display the current drive geometry that fdisk has probed. You are given a chance to edit it if you wish. edit Edit a given table entry in the memory copy of the current boot block. You may edit either in BIOS geometry mode, or in sector offsets and sizes. setpid Change the partition identifier of the given partition table entry. This command is particularly useful for reassigning an existing partition to OpenBSD. flag Make the given partition table entry bootable. Only one entry can be marked bootable. If you wish to boot from an extended partition, you will need to mark the partition table entry for the extended partition as bootable. update Update the machine code in the memory copy of the currently selected boot block. Note that this option will overwrite the NT disk signature, if present. select Select and load into memory the boot block pointed to by the extended partition table entry in the current boot block. print Print the currently selected in-memory copy of the boot block and its MBR table to the terminal. write Write the in-memory copy of the boot block to disk. You will be asked to confirm this operation. exit Exit the current level of fdisk, either returning to the previously selected in-memory copy of a boot block, or exiting the program if there is none. quit Exit the current level of fdisk, either returning to the previously selected in-memory copy of a boot block, or exiting the program if there is none. Unlike exit it does write the modified block out. abort Quit program without saving current changes. NOTES The automatic calculation of starting cylinder etc. uses a set of figures that represent what the BIOS thinks is the geometry of the drive. These figures are by default taken from the in-core disklabel, or values that /boot has passed to the kernel, but fdisk gives you an opportunity to change them if there is a need to. This allows the user to create a bootblock that can work with drives that use geometry translation under a potentially different BIOS. If you hand craft your disk layout, please make sure that the OpenBSD partition starts on a cylinder boundary. (This restriction may be changed in the future.) Editing an existing partition is risky, and may cause you to lose all the data in that partition. You should run this program interactively once or twice to see how it works. This is completely safe as long as you answer the “write” questions in the negative. FILES /usr/mdec/mbr default MBR template SEE ALSO gpt(8), pdisk(8) BUGS There are subtleties fdisk detects that are not explained in this manual page. As well, chances are that some of the subtleties it should detect are being steamrolled. Caveat Emptor. macOS 14.5 January 3, 2002 macOS 14.5
|
fdisk – DOS partition maintenance program
|
fdisk [-ieu] [-f mbrname] [-c cylinders] [-h heads] [-s sectors] [-S size] [-b size] device
| null | null |
sysadminctl
| null | null | null | null | null |
networksetup
|
The networksetup command is used to configure network settings typically configured in the System Preferences application. The networksetup command requires at least admin privileges to change network settings. If the "Require an administrator password to access system-wide preferences" option is selected in System Preferences > Security & Privacy, then root privileges are required to change network settings. Any flag that takes a password will accept "-" in place of the password to indicate it should read the password from stdin. A list of flags and their descriptions: -listnetworkserviceorder Displays a list of network services in the order they are contacted for a connection, along with the corresponding port and device for each. An asterisk (*) next to a service means the service is inactive. -listallnetworkservices Displays a list of all the network services on the server's hardware ports. An asterisk (*) denotes that a network service is disabled. -listallhardwareports Displays list of hardware ports with corresponding device name and ethernet address. -detectnewhardware Detects new network hardware and creates a default network service on the hardware. -getmacaddress hardwareport Displays ethernet (or Wi-Fi) address for hardwareport or device specified. -getcomputername Displays the computer name. -setcomputername computername Sets computer name to <computername>. This name is used by AFP. -getinfo networkservice Displays the IP address, subnet mask, router, and hardware address for the <networkservice> that you specify. -setmanual networkservice ip subnet router Set the TCP/IP configuration for <networkservice> to manual with IP address set to <ip>, Subnet Mask set to <subnet>, and Router address set to <router>. -setdhcp networkservice [clientid] Use this command to set the TCP/IP configuration for the specified <networkservice> to use DHCP. The client ID is optional. Specify "Empty" for [clientid] to clear the DHCP client id. -setbootp networkservice Use this command to set the TCP/IP configuration for the specified <networkservice> to use BOOTP. -setmanualwithdhcprouter networkservice ip Use this command to specify a manual IP address to use for DHCP for the specified <networkservice>. -getadditionalroutes networkservice Use this command to display the list of additional IPv4 routes configured for the service. -setadditionalroutes networkservice [dest1 mask1 gate1] [dest2 mask2 gate2] ... [destN maskN gateN] Use this command to set the list of IPv4 additional routes configured for the service. Each route is specified as a (destination address, subnet mask, gateway address) tuple. Specifying no tuples clears the list of routes. -setv4off networkservice Use this command to turn IPv4 off on the specified <networkservice>. -setv6off networkservice Use this command to turn IPv6 off on the specified <networkservice>. -setv6automatic networkservice Use this command to set IPv6 to get its addresses automatically for <networkservice>. -setv6linklocal networkservice Use this command to set IPv6 to only use link local for <networkservice>. -setv6manual ip prefixlength router Use this command to set IPv6 to get its addresses manually for <networkservice>. Specify the ip address, the prefix length and the router. -getv6additionalroutes networkservice Use this command to display the list of additional IPv6 routes configured for the service. -setv6additionalroutes networkservice [dest1 prefixlength1 gate1] [dest2 prefixlength2 gate2] ... [destN prefixlengthN gateN] Use this command to set the list of additional routes configured for the service. Each route is specified as a (destination address, prefix length, gateway address) tuple. Specifying no tuples clears the list of routes. -getdnsservers networkservice Displays DNS info for <networkservice>. -setdnsservers networkservice dns1 [dns2] [...] Use this command to specify the IP addresses of servers you want the specified <networkservice> to use to resolve domain names. You can list any number of servers (replace dns1, dns2, and so on with the IP addresses of domain name servers). If you want to clear all DNS entries for the specified network service, type "empty" in place of the DNS server names. -getsearchdomains networkservice Displays Domain Name info for <networkservice>. -setsearchdomains networkservice domain1 [domain2] [...] Use this command to designate the search domain for the specified <networkservice>. You can list any number of search domains (replace domain1, domain2, and so on with the name of a local domain). If you want to clear all search domain entries for the specified network service, type “empty” in place of the domain name. -create6to4service -<newnetworkservicename> Use this command to create a new 6 to 4 service with name <newnetworkservicename>. -set6to4automatic -<newnetworkservicename> Use this command to set the 6 to 4 service such that it will get the relay address automatically. -set6to4manual -<newnetworkservicename> -<relayaddress> Use this command to set the 6 to 4 service such that it will get the relay address manually. Specify the <relayaddress> that you would like to set. -getwebproxy networkservice Displays Web proxy (server, port, enabled value) info for <networkservice>. -setwebproxy networkservice domain portnumber authenticated username password Set Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on. -setwebproxystate networkservice on | off Set Web proxy on <networkservice> to either <on> or <off>. -getsecurewebproxy networkservice Displays Secure Web proxy (server, port, enabled value) info for <networkservice>. -setsecurewebproxy networkservice domain portnumber authenticated username password Set Secure Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on. -setsecurewebproxystate networkservice on | off Set SecureWeb proxy on <networkservice> to either <on> or <off>. -getsocksfirewallproxy networkservice Displays SOCKS Firewall proxy (server, port, enabled value) info for <networkservice>. -setsocksfirewallproxy networkservice domain portnumber authenticated username password Set SOCKS Firewall proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on. -setsocksfirewallproxystate networkservice on | off Set SOCKS Firewall proxy to either <on> or <off>. -getproxybypassdomains networkservice Displays Bypass Domain Names for <networkservice>. -setproxybypassdomains networkservice domain1 [domain2] [...] Set the Bypass Domain Name Servers for <networkservice> to <domain1> [domain2] [...]. Any number of Domain Name servers can be specified. Specify "Empty" for <domain1> to clear all Domain Name entries. -getproxyautodiscovery networkservice Displays Proxy Auto Discover for <networkservice>. -setproxyautodiscovery networkservice on | off Set Proxy Auto Discover for <networkservice> to either <on> or <off>. -setautoproxyurl networkservice url Set proxy auto-config to url for <networkservice> and enable it. -getautoproxyurl networkservice Displays proxy auto-config (url, enabled) info for <networkservice>. -setsocksfirewallproxystate networkservice on | off Set SOCKS Firewall proxy to either <on> or <off>. -getairportnetwork hardwareport Displays current Wi-Fi Network. -setairportnetwork hardwareport network [password] Set Wi-Fi Network to <network> using optional [password] if specified. -getairportpower hardwareport Displays whether Wi-Fi power is on or off. -setairportpower hardwareport on | off Set Wi-Fi power to either <on> or <off>. -listpreferredwirelessnetworks hardwareport List the preferred wireless networks for <hardwareport> -addpreferredwirelessnetworkatindex hardwareport network index securitytype [password] Add wireless network named <network> to preferred list for <hardwareport> at <index>. Store the optional password in the keychain For security type, use OPEN for none, WPA for WPA Personal, WPA2 for WPA2 Personal, WPA/WPA2 for WPA/WPA2 Personal, WPAE for WPA Enterprise, WPA2E for WPA2 Enterprise, WPAE/WPA2E for WPA/WPA2 Enterprise, WEP for plain WEP, and 8021XWEP for 802.1X WEP. -removepreferredwirelessnetwork hardwareport network Remove <network> from the preferred wireless network list for <hardwareport> -removeallpreferredwirelessnetworks hardwareport Remove all networks from the preferred wireless network list for <hardwareport> -getnetworkserviceenabled networkservice Displays whether a service is on or off (enabled or disabled). -setnetworkserviceenabled networkservice on | off Use this command to turn the specified network service on or off (enable or disable). -createnetworkservice networkservicename hardwareport Create a service named <networkservice> on port <hardwareport>. The new service will be enabled by default. -renamenetworkservice networkservice newnetworkservicename Use this command to rename the specified network service <networkservice> to <newnetworkservicename>. -duplicatenetworkservice networkservice newnetworkservicename Use this command to duplicate an existing network service <networkservice> and rename it to the specified name <newnetworkservicename>. -removenetworkservice networkservice Use this command to delete a network service <networkservice>. You cannot use this command to delete the last remaining service for a hardware port. To do so, you use the -setnetworkserviceenabled command. -ordernetworkservices service1 [service2] [service3] [...] Use this command to designate the order network services are contacted on the specified hardware port. Name the network you want contacted first, then the second, and so on. Use "listnetworkserviceorder" to view current service order. Note: use quotes around service names which contain spaces (ie. "Built- in Ethernet"). -setMTUAndMediaAutomatically hardwarePort Set hardwareport or device specified back to automatically setting the MTU and Media. -getMTU hardwareport Get the MTU value for hardwareport or device specified. -setMTU hardwarePort value Set MTU for hardwareport or device specified. -listValidMTURange hardwareport List the valid MTU range for hardwareport or device specified. -getMedia hardwareport Show both the current setting for media and the active media on hardwareport or device specified. -setMedia hardwareport subtype [option1] [option2] [...] Set media for hardwareport or device specified to subtype. Specify optional [option1] and additional options depending on subtype. Any number of valid options can be specified. -listValidMedia hardwareport List valid media options for hardwareport or device name. Enumerates available subtypes and options per subtype. -createVLAN name parentdevice tag Create a VLAN with the name <name> over the parent device <parentdevice> and with the tag <tag>. -deleteVLAN name parentdevice tag Delete the VLAN with the name <name> over the parent device <parentdevice> and with the tag <tag>. -listVLANs List the VLANs that have been created. -listdevicesthatsupportVLAN List the devices that support VLANs. -isBondSupported device Displays YES if the device can be added to a bond. NO if it cannot. -createBond name [device1] [device2] [...] Create a bond with the user-defined-name name and optionally add any listed devices if they support bonding. -deleteBond bond Delete the bond with the specified device-name. -addDeviceToBond device bond Add device to bond. -removeDeviceFromBond device bond Remove device from bond. -listBonds List of all bonds. -showBondStatus bond Display the status of the specified bond. -listpppoeservices List all PPPoE services in the current set. -showpppoestatus name Display the status of the PPPoE service with the specified name. -createpppoeservice device name account password [pppoeName] Create a PPPoE service on the specified device with the service name specified. -deletepppoeservice service Delete the service. -setpppoeaccountname service account Set the account name for the service. -setpppoepassword service password Set the password for the service. -connectpppoeservice service Connect the service. -disconnectpppoeservice service Disconnect the service. -listlocations List all network locations. -getcurrentlocation Display the name of the current set. -createlocation location [populate] Create a set with the user-defined-name name and optionally populate it with the default services. -deletelocation location Delete the set. -switchtolocation location Make the specified set the current set. -version Displays version of networksetup tool. -help Displays a list of all the commands available in the Network Setup Tool, with explanatory information. -printcommands Displays a list of commands with no detail. FILES /usr/sbin/networksetup
|
networksetup – configuration tool for network settings in System Preferences.
|
networksetup [-listnetworkserviceorder] [-listallnetworkservices] [-listallhardwareports] [-detectnewhardware] [-getmacaddress hardwareport] [-getcomputername] [-setcomputername computername] [-getinfo networkservice] [-setmanual networkservice ip subnet router] [-setdhcp networkservice [clientid]] [-setbootp networkservice] [-setmanualwithdhcprouter networkservice ip] [-getadditionalroutes networkservice] [-setadditionalroutes networkservice [dest1 mask1 gate1] [dest2 mask2 gate2] ... [destN maskN gateN]] [-setv4off networkservice] [-setv6off networkservice] [-setv6automatic networkservice] [-setv6linklocal networkservice] [-setv6manual networkservice address prefixLength router] [-getv6additionalroutes networkservice] [-setv6additionalroutes networkservice [dest1 prefixlength1 gate1] [dest2 prefixlength2 gate2] ... [destN prefixlengthN gateN]] [-getdnsservers networkservice] [-setdnsservers networkservice dns1 [dns2] [...]] [-getsearchdomains networkservice] [-setsearchdomains networkservice domain1 [domain2] [...]] [-create6to4service networkservicename] [-set6to4automatic networkservice] [-set6to4manual networkservice relayAddress] [-getwebproxy networkservice] [-setwebproxy networkservice domain portnumber authenticated username password] [-setwebproxystate networkservice on | off] [-getsecurewebproxy networkservice] [-setsecurewebproxy networkservice domain portnumber authenticated username password] [-setsecurewebproxystate networkservice on | off] [-getsocksfirewallproxy networkservice] [-setsocksfirewallproxy networkservice domain portnumber authenticated username password] [-setsocksfirewallproxystate networkservice on | off] [-getproxybypassdomains networkservice] [-setproxybypassdomains networkservice domain1 [domain2] [...]] [-getproxyautodiscovery networkservice] [-setproxyautodiscovery networkservice on | off] [-getairportnetwork device] [-setairportnetwork device network [password]] [-getairportpower device] [-setairportpower device on | off] [-listpreferredwirelessnetworks hardwareport] [-addpreferredwirelessnetworkatindex hardwareport network index securitytype [password]] [-removepreferredwirelessnetwork hardwareport network] [-removeallpreferredwirelessnetworks hardwareport] [-getnetworkserviceenabled networkservice] [-setnetworkserviceenabled networkservice on | off] [-createnetworkservice networkservicename hardwareport] [-renamenetworkservice networkservice newnetworkservicename] [-duplicatenetworkservice networkservice newnetworkservicename] [-removenetworkservice networkservice] [-ordernetworkservices service1 [service2] [service3] [...]] [-getMTU hardwareport] [-setMTU hardwarePort value] [-listvalidMTUrange hardwareport] [-getmedia hardwareport] [-setmedia hardwareport subtype [option1] [option2] [...]] [-listvalidmedia hardwareport] [-createVLAN name parentdevice tag] [-deleteVLAN name parentdevice tag] [-listVLANs] [-listdevicesthatsupportVLAN] [-isBondSupported device] [-createBond name [device1] [device2] [...]] [-deleteBond bond] [-addDeviceToBond device bond] [-removeDeviceFromBond device bond] [-listBonds] [-showBondStatus bond] [-listpppoeservices] [-showpppoestatus name] [-createpppoeservice device name account password [pppoeName]] [-deletepppoeservice service] [-setpppoeaccountname service account] [-setpppoepassword service password] [-connectpppoeservice service] [-disconnectpppoeservice service] [-listlocations] [-getcurrentlocation] [-createlocation location [populate]] [-deletelocation location] [-switchtolocation location] [-version] [-help] [-printcommands]
| null |
networksetup -listallnetworkservices networksetup -setmanual "Built-in Ethernet" 192.168.100.100 255.255.255.0 192.168.100.1 networksetup -setdnsservers "Built-in Ethernet" 192.168.100.100 192.168.100.12 networksetup -setsearchdomains "Built-in Ethernet" company.com corp.com networksetup -setwebproxy "Built-in Ethernet" proxy.company.com 80 networksetup -setwebproxy "Built-In Ethernet" proxy.company.com 80 On authusername authpassword networksetup -duplicatenetworkservice "Built-In Ethernet" "Local LAN" networksetup -getdnsservers "Built-In Ethernet" networksetup -setMTU en0 1500 networksetup -setMedia en0 autoselect networksetup -setMedia en0 100baseTX half-duplex networksetup -createBond MyBond en0 en1 networksetup -addDeviceToBond en0 bond0 networksetup -setpppoepassword MyPPPoE - < ~/Desktop/MyPasswordFile.txt networksetup -createlocation Home populate SEE ALSO systemsetup(8) macOS July 29, 2020 macOS
|
ktutil
|
The ktutil command invokes a command interface from which an administrator can read, write, or edit entries in a keytab. (Kerberos V4 srvtab files are no longer supported.) COMMANDS list list [-t] [-k] [-e] Displays the current keylist. If -t, -k, and/or -e are specified, also display the timestamp, key contents, or enctype (respectively). Alias: l read_kt read_kt keytab Read the Kerberos V5 keytab file keytab into the current keylist. Alias: rkt write_kt write_kt keytab Write the current keylist into the Kerberos V5 keytab file keytab. Alias: wkt clear_list clear_list Clear the current keylist. Alias: clear delete_entry delete_entry slot Delete the entry in slot number slot from the current keylist. Alias: delent add_entry add_entry {-key|-password} -p principal -k kvno [-e enctype] [-f|-s salt] Add principal to keylist using key or password. If the -f flag is specified, salt information will be fetched from the KDC; in this case the -e flag may be omitted, or it may be supplied to force a particular enctype. If the -f flag is not specified, the -e flag must be specified, and the default salt will be used unless overridden with the -s option. Alias: addent list_requests list_requests Displays a listing of available commands. Aliases: lr, ? quit quit Quits ktutil. Aliases: exit, q EXAMPLE ktutil: add_entry -password -p alice@BLEEP.COM -k 1 -e aes128-cts-hmac-sha1-96 Password for alice@BLEEP.COM: ktutil: add_entry -password -p alice@BLEEP.COM -k 1 -e aes256-cts-hmac-sha1-96 Password for alice@BLEEP.COM: ktutil: write_kt alice.keytab ktutil: ENVIRONMENT See kerberos(7) for a description of Kerberos environment variables. SEE ALSO kadmin(1), kdb5_util(8), kerberos(7) AUTHOR MIT COPYRIGHT 1985-2022, MIT 1.20.1 KTUTIL(1)
|
ktutil - Kerberos keytab file maintenance utility
|
ktutil
| null | null |
setquota
|
setquota provides several options for creating and updating home directory quotas. Quotas are set as specified in the individual user record.
|
setquota – Sets home directory quotas on the local computer.
|
setquota [-ahl] [-n directoryDomainName] [-u username]
|
-a sets home directory quota for users defined in all directory domains of the server's search path. -l sets home directory quota for users defined in the local directory domain. -n directoryDomainName sets home directory quota for users defined in a specific directory domain in the server's search path. -u username sets home directory quota for a specific user defined in the domain(s) identified in the -a, -l, or -n parameter. If you omit the -a, -l, and -n parameters when you use the -u parameter, -a is assumed. FILES /usr/sbin/setquota location of tool Mac OS X Wed Nov 12 2008 Mac OS X
| null |
otctl
|
Command line interface do provide trust and sycning related information in sysdiagnose. SEE ALSO sysdiagnose(1), HISTORY otctl was first introduced in Mac OS X version 10.15 Darwin Thu Feb 14 2019 Darwin
|
otctl – Command line interface do provide diagnostic information for iCloud Keychain syncing
|
otctl
| null | null |
dnctl
|
The dnctl utility is the user interface for controlling the dummynet(4) traffic shaper. dummynet operates by first using a packet filter to classify packets and divide them into flows, using any match pattern that can be used in dnctl rules. Depending on local policies, a flow can contain packets for a single TCP connection, or from/to a given host, or entire subnet, or a protocol type, etc. Packets belonging to the same flow are then passed to either of two different objects, which implement the traffic regulation: pipe A pipe emulates a link with given bandwidth, propagation delay, queue size and packet loss rate. Packets are queued in front of the pipe as they come out from the classifier, and then transferred to the pipe according to the pipe's parameters. queue A queue is an abstraction used to implement the WF2Q+ (Worst- case Fair Weighted Fair Queueing) policy, which is an efficient variant of the WFQ policy. The queue associates a weight and a reference pipe to each flow, and then all backlogged (i.e., with packets queued) flows linked to the same pipe share the pipe's bandwidth proportionally to their weights. Note that weights are not priorities; a flow with a lower weight is still guaranteed to get its fraction of the bandwidth even if a flow with a higher weight is permanently backlogged. In practice, pipes can be used to set hard limits to the bandwidth that a flow can use, whereas queues can be used to determine how different flow share the available bandwidth. The pipe and queue configuration commands are the following: pipe number config pipe-configuration queue number config queue-configuration The following parameters can be configured for a pipe: bw bandwidth | device Bandwidth, measured in [K|M]{bit/s|Byte/s}. A value of 0 (default) means unlimited bandwidth. The unit must immediately follow the number, as in dnctl pipe 1 config bw 300Kbit/s If a device name is specified instead of a numeric value, as in dnctl pipe 1 config bw tun0 then the transmit clock is supplied by the specified device. At the moment no device supports this functionality. delay ms-delay Propagation delay, measured in milliseconds. The value is rounded to the next multiple of the clock tick (typically 10ms, but it is a good practice to run kernels with “options HZ=1000” to reduce the granularity to 1ms or less). Default value is 0, meaning no delay. The following parameters can be configured for a queue: pipe pipe_nr Connects a queue to the specified pipe. Multiple queues (with the same or different weights) can be connected to the same pipe, which specifies the aggregate rate for the set of queues. weight weight Specifies the weight to be used for flows matching this queue. The weight must be in the range 1..100, and defaults to 1. Finally, the following parameters can be configured for both pipes and queues: buckets hash-table-size Specifies the size of the hash table used for storing the various queues. Default value is 64 controlled by the sysctl(8) variable net.inet.ip.dummynet.hash_size, allowed range is 16 to 65536. mask mask-specifier Packets sent to a given pipe or queue by an dnctl rule can be further classified into multiple flows, each of which is then sent to a different dynamic pipe or queue. A flow identifier is constructed by masking the IP addresses, ports and protocol types as specified with the mask options in the configuration of the pipe or queue. For each different flow identifier, a new pipe or queue is created with the same parameters as the original object, and matching packets are sent to it. Thus, when dynamic pipes are used, each flow will get the same bandwidth as defined by the pipe, whereas when dynamic queues are used, each flow will share the parent's pipe bandwidth evenly with other flows generated by the same queue (note that other queues with different weights might be connected to the same pipe). Available mask specifiers are a combination of one or more of the following: dst-ip mask, dst-ip6 mask, src-ip mask, src-ip6 mask, dst-port mask, src-port mask, proto mask or all, where the latter means all bits in all fields are significant. noerror When a packet is dropped by a dummynet queue or pipe, the error is normally reported to the caller routine in the kernel, in the same way as it happens when a device queue fills up. Setting this option reports the packet as successfully delivered, which can be needed for some experimental setups where you want to simulate loss or congestion at a remote router. plr packet-loss-rate Packet loss rate. Argument packet-loss-rate is a floating-point number between 0 and 1, with 0 meaning no loss, 1 meaning 100% loss. The loss rate is internally represented on 31 bits. queue {slots | sizeKbytes} Queue size, in slots or KBytes. Default value is 50 slots, which is the typical queue size for Ethernet devices. Note that for slow speed links you should keep the queue size short or your traffic might be affected by a significant queueing delay. E.g., 50 max- sized ethernet packets (1500 bytes) mean 600Kbit or 20s of queue on a 30Kbit/s pipe. Even worse effect can result if you get packets from an interface with a much larger MTU, e.g. the loopback interface with its 16KB packets. red | gred w_q/min_th/max_th/max_p Make use of the RED (Random Early Detection) queue management algorithm. w_q and max_p are floating point numbers between 0 and 1 (0 not included), while min_th and max_th are integer numbers specifying thresholds for queue management (thresholds are computed in bytes if the queue has been defined in bytes, in slots otherwise). The dummynet(4) also supports the gentle RED variant (gred). Three sysctl(8) variables can be used to control the RED behaviour: net.inet.ip.dummynet.red_lookup_depth specifies the accuracy in computing the average queue when the link is idle (defaults to 256, must be greater than zero) net.inet.ip.dummynet.red_avg_pkt_size specifies the expected average packet size (defaults to 512, must be greater than zero) net.inet.ip.dummynet.red_max_pkt_size specifies the expected maximum packet size, only used when queue thresholds are in bytes (defaults to 1500, must be greater than zero). The following options are available: -a While listing, show counter values. The show command just implies this option. -f Don't ask for confirmation for commands that can cause problems if misused, i.e. flush. If there is no tty associated with the process, this is implied. -h Displays a short help. -n Only check syntax of the command strings, without actually passing them to the kernel. -q While adding, zeroing, resetlogging or flushing, be quiet about actions (implies -f). This is useful for adjusting rules by executing multiple dnctl commands in a script or by processing a file of many dnctl rules across a remote login session. If a flush is performed in normal (verbose) mode (with the default kernel configuration), it prints a message. Because all rules are flushed, the message might not be delivered to the login session, causing the remote login session to be closed and the remainder of the ruleset to not be processed. Access to the console would then be required to recover. -s [field] While listing pipes, sort according to one of the four counters (total or current packets or bytes). -v Be verbose. To ease configuration, rules can be put into a file which is processed using dnctl as shown in the last synopsis line. An absolute pathname must be used. The file will be read line by line and applied as arguments to the dnctl utility. Optionally, a preprocessor can be specified using -p preproc where pathname is to be piped through. Useful preprocessors include cpp(1) and m4(1). If preproc doesn't start with a slash (‘/’) as its first character, the usual PATH name search is performed. Care should be taken with this in environments where not all file systems are mounted (yet) by the time dnctl is being run (e.g. when they are mounted over NFS). Once -p has been specified, any additional arguments as passed on to the preprocessor for interpretation. This allows for flexible configuration files (like conditionalizing them on the local hostname) and the use of macros to centralize frequently required arguments like IP addresses. CHECKLIST Here are some important points to consider when designing your rules: • Remember that you filter both packets going in and out. Most connections need packets going in both directions. • Remember to test very carefully. It is a good idea to be near the console when doing this. • Don't forget the loopback interface. SYSCTL VARIABLES A set of sysctl(8) variables controls the behaviour of the dummynet module. These are shown below together with their default value (but always check with the sysctl(8) command what value is actually in use) and meaning: net.inet.ip.dummynet.expire: 1 Lazily delete dynamic pipes/queue once they have no pending traffic. You can disable this by setting the variable to 0, in which case the pipes/queues will only be deleted when the threshold is reached. net.inet.ip.dummynet.hash_size: 64 Default size of the hash table used for dynamic pipes/queues. This value is used when no buckets option is specified when configuring a pipe/queue. net.inet.ip.dummynet.max_chain_len: 16 Target value for the maximum number of pipes/queues in a hash bucket. The product max_chain_len*hash_size is used to determine the threshold over which empty pipes/queues will be expired even when net.inet.ip.dummynet.expire=0. net.inet.ip.dummynet.red_lookup_depth: 256 net.inet.ip.dummynet.red_avg_pkt_size: 512 net.inet.ip.dummynet.red_max_pkt_size: 1500 Parameters used in the computations of the drop probability for the RED algorithm.
|
dnctl – Traffic shaper control program
|
dnctl [-anqs] {list | show} dnctl [-f | -q] flush dnctl [-q] {delete} [number ...] dnctl {pipe | queue} number config config-options dnctl [-s [field]] {pipe | queue} {delete | list | show} [number ...] dnctl [-nq] [-p preproc [preproc-flags]] pathname
| null |
The following rules show some of the applications of for simulations and the like by using dummynet rules in pf.conf(8) configuration files. To drop random incoming IPv4 and IPv6 ICMP packets with a probability of 5%, create a pipe: dnctl pipe 10 config plr 0.05 and add these rules in your pf.conf file: dummynet in inet proto icmp all pipe 10 dummynet in inet6 proto ipv6-icmp all pipe 10 Should we want to simulate a bidirectional link with bandwidth limitations, the correct way is to create a pipe for each direction: dnctl pipe 1 config bw 14Kbit/s queue 10Kbytes dnctl pipe 2 config bw 1Kbit/s queue 10Kbytes and add these rules in your pf.conf file: dummynet in all pipe 1 dummynet out all pipe 2 The above can be very useful, e.g. if you want to see how your fancy Web page will look for a residential user who is connected only through a slow link. You should not use only one pipe for both directions, unless you want to simulate a half-duplex medium (e.g. AppleTalk, Ethernet, IRDA). Note that with the above rules the pipes receive traffic for both the IPv4 and IPv6 protocols. Should we want to verify network performance with the RED queue management algorithm, create this pipe: dnctl pipe 1 config bw 500Kbit/s queue 100 red 0.002/30/80/0.1 and then add these rules to you pf.conf file: dummynet all pipe 1 Another typical application of the traffic shaper is to introduce some delay in the communication. This can significantly affect applications which do a lot of Remote Procedure Calls, and where the round-trip-time of the connection often becomes a limiting factor much more than bandwidth: dnctl pipe 1 config delay 250ms bw 1Mbit/s dnctl pipe 2 config delay 250ms bw 1Mbit/s and add these rules in your pf.conf file: dummynet in all pipe 1 dummynet out all pipe 2 Per-flow queueing can be useful for a variety of purposes. A very simple one is counting traffic: dnctl pipe 1 config mask all and add these statements in your pf.conf file: dummynet in quick proto tcp all pipe 1 dummynet out quick proto tcp all pipe 1 dummynet in quick proto udp all pipe 1 dummynet out quick proto udp all pipe 1 dummynet in quick all pipe 1 dummynet out quick all pipe 1 The above set of rules will create queues (and collect statistics) for all traffic. Because the pipes have no limitations, the only effect is collecting statistics. Note that we need six rules, not just the last two one, because when dnctl tries to match IP packets it will not consider ports, so we would not see connections on separate ports as different ones. SEE ALSO cpp(1), dummynet(4), m4(1), ip(4), pfctl(8), pf.conf(5), protocols(5), services(5), sysctl(8) AUTHORS Ugen J. S. Antsilevich, Poul-Henning Kamp, Alex Nash, Archie Cobbs, Luigi Rizzo. API based upon code written by Daniel Boulet for BSDI. Work on dummynet(4) traffic shaper supported by Akamba Corp. HISTORY The dnctl utility first appeared in FreeBSD 2.0. dummynet(4) was introduced in FreeBSD 2.2.8. Stateful extensions were introduced in FreeBSD 4.0. Darwin August 13, 2002 Darwin
|
mDNSResponder
|
mDNSResponder (also known as mdnsd on some systems) is a daemon invoked at boot time to implement Multicast DNS and DNS Service Discovery. On Mac OS X 10.6 (Snow Leopard), mDNSResponder is also the system-wide Unicast DNS Resolver. mDNSResponder listens on UDP port 5353 for Multicast DNS Query packets. When it receives a query for which it knows an answer, mDNSResponder issues the appropriate Multicast DNS Reply packet. mDNSResponder also performs Unicast and Multicast DNS Queries on behalf of client processes, and maintains a cache of the replies. mDNSResponder has no user-specifiable command-line argument, and users should not run mDNSResponder manually. LOGGING There are several methods with which to examine mDNSResponder's internal state for debugging and diagnostic purposes. The syslog(1) logging levels map as follows: Error - Error messages Warning - Client-initiated operations Notice - Sleep proxy operations Info - Informational messages By default, only log level Error is logged. A SIGUSR1 signal toggles additional logging, with Warning and Notice enabled by default: % sudo killall -USR1 mDNSResponder Once this logging is enabled, users can additionally use syslog(1) to change the log filter for the process. For example, to enable log levels Emergency - Debug: % sudo syslog -c mDNSResponder -d A SIGUSR2 signal toggles packet logging: % sudo killall -USR2 mDNSResponder A SIGINFO signal will dump a snapshot summary of the internal state to /var/log/system.log: % sudo killall -INFO mDNSResponder OPTIONAL ARGUMENTS mDNSResponder accepts the following optional arguments: -AlwaysAppendSearchDomains Append search domains for multi-labeled Partially Qualified Domain Name as well as single-labeled Partially Qualified Domain Name. This argument is not recommended because of the extra DNS traffic it generates and its adverse effect on battery life. -NoMulticastAdvertisements Prevent the system from advertising Bonjour services via Multicast DNS. To cause mDNSResponder to run with these optional arguments when it launches on OS X 10.11 (El Capitan) and later, set the AlwaysAppendSearchDomains or NoMulticastAdvertisements boolean keys to true in /Library/Preferences/com.apple.mDNSResponder.plist and reboot. FILES /usr/sbin/mDNSResponder /Library/Preferences/com.apple.mDNSResponder.plist INFO For information on Multicast DNS, see http://www.multicastdns.org/ For information on DNS Service Discovery, see http://www.dns-sd.org/ For information on how to use the Multicast DNS and the DNS Service Discovery APIs on Mac OS X and other platforms, see http://developer.apple.com/bonjour/ For the source code to mDNSResponder, see http://developer.apple.com/darwin/projects/bonjour/ BUGS mDNSResponder bugs are tracked in Apple Radar component "mDNSResponder". HISTORY The mDNSResponder daemon first appeared in Mac OS X 10.2 (Jaguar). Also available from the Darwin open source repository (though not officially supported by Apple) are mDNSResponder daemons for other platforms, including Microsoft Windows, Linux, FreeBSD, NetBSD, Solaris, and other POSIX systems. Darwin April 2004 Darwin
|
mDNSResponder – Multicast and Unicast DNS daemon
|
mDNSResponder
| null | null |
repquota
|
Repquota prints a summary of the disk usage and quotas for the specified file systems. Available options: -a Print the quotas of all the filesystems configured with a quota mount option file at its root. -g Print only group quotas (the default is to print both group and user quotas if they exist). -u Print only user quotas (the default is to print both group and user quotas if they exist). -v Print a header line before printing each filesystem quotas. For each user or group, the current number of files and amount of space (in kilobytes) is printed, along with any quotas created with edquota(8). Only members of the operator group or the super-user may use this command. FILES Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence indicates that quotas are to be enabled for that filesystem. .quota.user data file containing user quotas .quota.group data file containing group quotas .quota.ops.user mount option file used to enable user quotas .quota.ops.group mount option file used to enable group quotas SEE ALSO quota(1), quotactl(2), edquota(8), quotacheck(8), quotaon(8) DIAGNOSTICS Various messages about inaccessible files; self-explanatory. HISTORY The repquota command appeared in 4.2BSD. BSD 4.2 March 28, 2002 BSD 4.2
|
repquota – summarize quotas for a file system
|
repquota [-g] [-u] [-v] filesystem ... repquota [-g] [-u] [-v] -a
| null | null |
cupsfilter
|
cupsfilter is a front-end to the CUPS filter subsystem which allows you to convert a file to a specific format, just as if you had printed the file through CUPS. By default, cupsfilter generates a PDF file. The converted file is sent to the standard output.
|
cupsfilter - convert a file to another format using cups filters (deprecated)
|
cupsfilter [ --list-filters ] [ -D ] [ -U user ] [ -c config-file ] [ -d printer ] [ -e ] [ -i mime/type ] [ -j job-id[,N] ] [ -m mime/type ] [ -n copies ] [ -o name=value ] [ -p filename.ppd ] [ -t title ] [ -u ] filename
|
--list-filters Do not actually run the filters, just print the filters used to stdout. -D Delete the input file after conversion. -U user Specifies the username passed to the filters. The default is the name of the current user. -c config-file Uses the named cups-files.conf configuration file. -d printer Uses information from the named printer. -e Use every filter from the PPD file. -i mime/type Specifies the source file type. The default file type is guessed using the filename and contents of the file. -j job-id[,N] Converts document N from the specified job. If N is omitted, document 1 is converted. -m mime/type Specifies the destination file type. The default file type is application/pdf. Use printer/foo to convert to the printer format defined by the filters in the PPD file. -n copies Specifies the number of copies to generate. -o name=value Specifies options to pass to the CUPS filters. -p filename.ppd Specifies the PPD file to use. -t title Specifies the document title. -u Delete the PPD file after conversion. EXIT STATUS cupsfilter returns a non-zero exit status on any error. ENVIRONMENT All of the standard cups(1) environment variables affect the operation of cupsfilter. FILES /etc/cups/cups-files.conf /etc/cups/*.convs /etc/cups/*.types /usr/share/cups/mime/*.convs /usr/share/cups/mime/*.types NOTES CUPS printer drivers, filters, and backends are deprecated and will no longer be supported in a future feature release of CUPS. Printers that do not support IPP can be supported using applications such as ippeveprinter(1). Unlike when printing, filters run using the cupsfilter command use the current user and security session. This may result in different output or unexpected behavior. EXAMPLE The following command will generate a PDF preview of job 42 for a printer named "myprinter" and save it to a file named "preview.pdf": cupsfilter -m application/pdf -d myprinter -j 42 >preview.pdf SEE ALSO cups(1), cupsd.conf(5), filter(7), mime.convs(7), mime.types(7), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS cupsfilter(8)
| null |
checkgid
|
Given one or more group identifers on the command line (e.g., "httpd" or "#-1"), figure out whether they'll be valid for the server to use at run- time. If a groupname isn't found, or we can't setgid() to it, return -1. If all groups are valid, return 0. This may need to be run as the superuser for the setgid() to succeed; running it as any other user may result in a false negative. SEE ALSO httpd(8) macOS 14.5 October 21, 2008 macOS 14.5
|
checkgid – validate group identifiers
|
checkgid group ...
| null | null |
uuconv
|
The uuconv program can be used to convert UUCP configuration files from one format to another. This can be useful for administrators converting from an older UUCP package. Taylor UUCP is able to read and use old configuration file formats, but some new features can not be selected using the old formats. The type of configuration file to read is specified using the -i or --input options. The type of configuration file to write is specified using the -o or --output options. The supported configuration file types are taylor, v2, and hdb. For a description of the taylor configuration files, use the info command and see "*Note Configuration Files::" for uucp. The other types of configuration files are used by traditional UUCP packages, and are not described in this manual. An input configuration of type taylor is read from a compiled in directory by default. The output configuration is written to files in the directory in which uuconv is run. Some information in the input files may not be representable in the desired output format, in which case uuconv will silently discard it. The output of uuconv should be carefully checked before it is used. The uuchk(8) program may be used for this purpose. The -p or --program option may be used to convert specific cu configuration information, rather than the default of only converting the uucp configuration information.
|
uuconv - convert UUCP configuration files
|
uuconv -i type -o type [-p program] [--program program] uuconv --input type --output type [-p program] [--program program]
|
-i, --input Set input type (one of taylor, v2, hdb) -o, --output Set output type (one of taylor, v2, hdb) -p, --program Program to convert (e.g., uucp or cu) Standard UUCP options: -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO cu(1), info(1), uucp(1), uuchk(8) AUTHOR Ian Lance Taylor <ian@airs.com>. Text for this Manpage comes from Taylor UUCP, version 1.07 Info documentation. Taylor UUCP 1.07 uuconv(1)
| null |
sharing
|
A list of flags and their descriptions: -a <path> Add a new share point for the directory specified by <path>. -e <share point name> Edit the share point record specified by <share point name>. -r <share point name> Delete the share point record specified by <share point name>. -l List all existing share point records. The following options modify share point record attributes: -S <smb name> Use customized name <smb name> when using share points with smb. -s <flags> Use this option to enable and disable sharing via smb. By default a share point is enabled for smb protocol. To enable and disable services, use the following flags as required: 001 (enable sharing for smb). Specify 000 to turn off sharing of a share point altogether. -g <guest flag> Use this option to enable and disable guest access for smb. By default guest access is enabled for smb. To enable and disable guest access services, use the following flags as required: 001 (enable guest for smb). Specify 000 to turn off guest access for a share point altogether. -n <customized record name> Specify a <customized record name> to be used as the share point record name. By default the record name is the name of the directory pointed to by the share point record. This directory is specified by the <path> when the record is created. -R <0/1> Make share read only for smb. Specify 1 to enable read only. Specify 0 to disable read only. -E <0/1> Make share encrypted for smb v3 and later. Specify 1 to enable encryption. Specify 0 to disable encryption. -f <format> Only used when listing share points and only json format is supported.
|
sharing – create share points for smb services.
|
sharing [-a <path> [options]] [-e <share point name> [options]] [-r <share point name>] [-l]
| null |
/usr/sbin/sharing -a /SomePath/ShareThisDirectory This example shows how to create a share point for the directory "/SomePath/ShareThisDirectory": /usr/sbin/sharing -e ShareThisDirectory -S SP1 -g 001 This example shows how to edit the share point record created above, adding a customized name "SP1" for smb services, and enabling guest access for smb. FILES /usr/sbin/sharing location of tool macOS Thu February 17 2017 macOS
|
vifs
|
The vifs utility simply locks the fstab file before invoking an editor on it. This is important to facilitate the modification of fstab by automated tools and system management software. Always use vifs to edit fstab, instead of invoking an editor directly. SEE ALSO vi(1), fstab(5) HISTORY The vifs utility originates from Mac OSX 10.5. macOS 14.5 November 18, 2005 macOS 14.5
|
vifs – safely edit fstab
|
vifs
| null | null |
ac
|
By default, a record of individual login and logout times are recorded by login(1) and init(8), respectively to syslogd(8). The ac utility examines these records and writes the accumulated connect time (in hours) for all logins to the standard output. The options are as follows: -d Display the connect times in 24 hour chunks. -p Print individual users' totals. -t tty Only do accounting logins on certain ttys. The tty specification can start with '!' to indicate not this tty and end with '*' to indicate all similarly named ttys. Multiple -t flags may be specified. -w wtmp Read connect time data from wtmp instead of the default, reading from the log(1). users ... Display totals for the given individuals only. If no arguments are given, ac displays the total connect time for all accounts with login sessions recorded in log(1). FILES /var/run/utmpx connect time accounting file EXIT STATUS The ac utility exits 0 on success, and >0 if an error occurs.
|
ac – connect time accounting
|
ac [-dp] [-t tty] [-w wtmp] [users ...]
| null |
Allow times recorded in modems to be charged out at a different rate than other: ac -p -t "ttyd*" > modems ac -p -t "!ttyd*" > other SEE ALSO log(1), login(1), getutxent(3), utmpx(5), launchd(8), sa(8), syslogd(8) HISTORY An ac command appeared in Version 5 AT&T UNIX. This version of ac was written for NetBSD 0.9A from the specification provided by various systems' manual pages. macOS 14.5 February 14, 2020 macOS 14.5
|
racoon
|
racoon is used to setup and maintain an IPSec tunnel or transport channel, between two devices, over which network traffic is conveyed securely. This security is made possible by cryptographic keys and operations on both devices. racoon relies on a standardized network protocol (IKE) to automatically negotiate and manage the cryptographic keys (e.g. security associations) that are necessary for the IPSec tunnel or transport channel to function. racoon speaks the IKE (ISAKMP/Oakley) key management protocol, to establish security associations with other hosts. The SPD (Security Policy Database) in the kernel usually triggers racoon. racoon usually sends all informational messages, warnings and error messages to syslogd(8) with the facility LOG_DAEMON and the priority LOG_INFO. Debugging messages are sent with the priority LOG_DEBUG. You should configure syslog.conf(5) appropriately to see these messages. -4 -6 Specify the default address family for the sockets. -B Install SA(s) from the file which is specified in racoon.conf(5). -d Increase the debug level. Multiple -d arguments will increase the debug level even more. -F Run racoon in the foreground. -f configfile Use configfile as the configuration file instead of the default. -L Include file_name:line_number:function_name in all messages. -l logfile Use logfile as the logging file instead of syslogd(8). -v This flag causes the packet dump be more verbose, with higher debugging level. racoon assumes the presence of the kernel random number device rnd(4) at /dev/urandom. RETURN VALUES The command exits with 0 on success, and non-zero on errors. FILES /private/etc/racoon/racoon.conf default configuration file. /private/etc/racoon/psk.txt default pre-shared key file. SEE ALSO ipsec(4), racoon.conf(5), syslog.conf(5), setkey(8), syslogd(8) HISTORY The racoon command first appeared in the “YIPS” Yokogawa IPsec implementation. SECURITY CONSIDERATIONS The use of IKE phase 1 aggressive mode is not recommended, as described in http://www.kb.cert.org/vuls/id/886601. macOS 14.5 November 20, 2000 macOS 14.5
|
racoon – IKE (ISAKMP/Oakley) key management daemon
|
racoon [-46BdFLv] [-f configfile] [-l logfile]
| null | null |
dsenableroot
|
dsenableroot sets the password for the root account if enabling the root user account. Otherwise, if disable [-d] is chosen, the root account passwords are removed and the root user is disabled. A list of flags and their descriptions: -u username Username of a user that has administrative privileges on this computer. -p password Password to use in conjunction with the specified username. If this is not specified, you will be prompted for entry. -r rootPassword Password to be used for the root account. If this is not specified for enabling, you will be prompted for entry.
|
dsenableroot – enables or disables the root account.
|
dsenableroot [-d] [-u username] [-p password] [-r rootPassword]
| null |
-dsenableroot Your username will be used and you will be queried for both your password and the new root password to be set to enable the root account. -dsenableroot -d Your username will be used and you will be queried for only your password to disable the root account. -dsenableroot -u username -p userpassword -r rootpassword The supplied arguments will be used to enable the root account. -dsenableroot -d -u username -p userpassword The supplied arguments will be used to disable the root account. Mac OS X August 08 2003 Mac OS X
|
xsanctl
|
xsanctl provides a basic control facility for the Xsan file system. It operates by sending commands to the Xsan file system management daemon xsand. xsanctl must be run by the superuser. COMMANDS xsanctl provides the following commands: Primary commands These commands are the primary ones needed for SAN management. help Display a list of the available xsanctl commands. ping Sends a ‘ping’ message to xsand. This can be used to verify that xsand is responding to management requests. mount volumeName [options] Creates the volume mount device for volume volumeName. If any mount options are given, xsand updates the local mount options for the volume before creating the volume mount device. diskarbitrationd will mount the volume after the volume mount device is created. This is the preferred method of mounting Xsan volumes from the command line. [options] include those options recognized by mount_acfs and three others: --at Specify a non-standard path at which to mount the volume. --rw Mount the volume for both reading and writing. This behavior is the default. --ro Mount the volume read-only. --clusteriosize=size Specify the maximum I/O transfer size (in bytes) that the cluster layer can submit to the file system's IO strategy routine. The minimum value allowed is 1MB and the maximum value allowed is 32MB. The default value is set to 8MB when the option is not specified. mount_acfs options should be preceded by two dashes. For instance, the number of kernel threads will increase to twenty as a result of this option: --threads=20. unmount volumeName [options] Unmounts the volume volumeName. --force Force the unmount. This operation may cause data loss Previous versions of Xsan explicitly forced mounting of selected volumes. This version of Xsan creates volume mount devices for all on-line and connected volumes and leaves mount state control to disk arbitration. list Displays a list of the available volumes. createSan sanName [createMaster arguments] This subcommand must be run as root and does not depend on xsand running. This subcommand creates a new SAN with this computer as the only controller. The SAN's name is sanName and may not begin with a dash. This subcommand has two variants. In both forms, it creates a new Xsan SAN. The subcommand's behavior depends on the configuration state of Open Directory when it runs. Xsan controllers must be Open Directory controllers for the cluster containing the SAN configuration. If the computer is not an Open Directory controller this subcommand configures the computer to be the master of a new Open Directory cluster, and then creates the SAN using that cluster. The subcommand options supplied after the SAN name are examined in the case where the computer is not an Open Directory controller. In this case, they are processed as if the createMaster subcommand had been run. In the case where the computer is already an Open Directory controller, none of the additional command options are valid. listSan Displays a list of available Xsan SANs in the local network. This subcommand does not depend on xsand running. joinSan sanName [options] [createReplica arguments] This subcommand must be run as root and does not depend on xsand running. This subcommand joins this computer with an existing SAN as a metadata controller. This computer will be an additional metadata controller for an existing SAN. The subcommand's behavior depends on the configuration state of Open Directory when it runs. Xsan controllers must be Open Directory controllers for the cluster containing the SAN configuration. If the computer is not an Open Directory controller, this subcommand configures the computer to be a replica in the Open Directory cluster, and then joins the SAN using that cluster. The subcommand options supplied after the joinSAN options are examined in the case where the computer is not an Open Directory controller. In this case, they are processed as if the createReplica subcommand had been run. In the case where the computer is already an Open Directory controller, none of the additional createReplica command options are valid. --controller-name ControllerName Specify the metadata controller name in the SAN in which this computer wants to join. --controller-user ControllerUserName Specify the administrator name for the metadata controller in which this computer wants to join. --controller-pass ControllerPassword Specify the administrator password for the metadata controller in which this computer wants to join. leaveSan This subcommand must be run as root and does not depend on xsand running. This subcommand removes this computer as a metadata controller from an existing SAN. removeControllerFromSan controllerName This subcommand removes the specified computer as a metadata controller from an existing SAN. destroySan This subcommand must be run as root and does not depend on xsand running. This subcommand sets the SAN configuration for this system's SAN to dead and updates the configuration in LDAP. It also posts a configuration update message to the SAN. Note: this command does NOT gracefully stop the SAN. Controllers and clients may need to be rebooted if they do not cleanly stop. Use with care. This operation can not be undone. exportClientProfile Exports Xsan configuration profile which can be installed on clients with Profile Manager. --path dirPath Specify the directory path in which the configuration profile will be created. If this option is not selected, the current working directory path will be used. --output outputFile Specify the file name to use for the configuration profile. If this option is not selected, the name of the SAN will be used as a default. addVolume volumeName [addOrEditVolumeOptions] This subcommand creates a new volume named volumeName. The command options used to describe a new volume's format are described in the VOLUME DESCRIPTION section below. The volume will be hosted on all current controllers, and will be started after creation. A new volume will consist of one or more Storage pools. One or more Storage pools must contain metadata, One or more Storage pools must contain userdata, and exactly one Storage pool must contain the journal. editVolume volumeName [addOrEditVolumeOptions] This subcommand edits the settings for an existing volume named volumeName. The command options used to describe volume's settings are described in the VOLUME DESCRIPTION section below. Many of the volume settings set at addVolume time may be subsequently changed. The ones which can not are documented in that section. This subcommand can also add new Storage pools to the volume. dropVolume [option] volumeName Removes a volume from SAN. This subcommand must be run as root. Note: the clients may need to be rebooted if '--force' option fails to cleanly stop the clients. --force Force the deletion even the volume is still mounted by the clients startVolume volumeName Start the volume volumeName. This subcommand must be run as root. stopVolume [option] volumeName Stops the volume volumeName. Further operations to the volume will be blocked in clients until the volume is started. This subcommand must be run as root. --force Force the stop even the volume is still mounted by the clients dumpVolumeConfig [option] Prints the Xsan volume configuration(s) hosted on the local machine as JSON. --volume The name of the volume to print. If specified, only the volume with the same name will get printed. unloadProfile This subcommand must be run as root and does not depend on xsand running. This subcommand unloads any profiles configuring Xsan which were not installed by Profile Manager. Profile removal will wipe the local Xsan configuration. Secondary commands These commands are less-frequently used commands for SAN management. changeIP oldIP newIP [oldHostName newHostName] This subcommand must be run as root. This subcommand changes the SAN configuration locally and in LDAP if the current Xsan address is oldIP. newIP is used in its place. If the fully-qualified domain name oldHostName is also passed as an arguement, the host name retained in the LDAP configuration for this host is changed to newHostName. Please ensure that all controllers have the SSL certificate for newHostName before running this command. Changing the host name of a controller will cause all clients in the SAN to re-read the controller certificates. createMaster Creates a new master LDAP server and a new directory node administrator. --cert-auth-name CertAuthName Specify the name to be used for Certificate Authority. --cert-admin-email CertAdminEmail Specify the email address to be used for Certificate Authority admin. --user AdminFullName Specify the full name for the new administrator account. --account AdminAccountShortName Specify the username for the new administrator account. --pass AdminPassword Specify the password for the new administrator account. createReplica Creates a new replica from an existing LDAP master and joins Open Directory. --master MasterAddress Specify the LDAP master IP address or name. --account AdminAccountShortName Specify the username for the administrator account. --pass AdminPassword Specify the password for the administrator account. destroyMaster Turns off the LDAP server and deletes its database. --account AdminAccountShortName Specify the username for the administrator account. --pass AdminPassword Specify the password for the administrator account. destroyReplica Unjoins Open Directory and removes a replica from an existing LDAP master. --account AdminAccountShortName Specify the username for the administrator account. --pass AdminPassword Specify the password for the administrator account. activateSan [createReplica arguments] This subcommand must be run as root and does not depend on xsand running. This subcommand activates the previous Xsan SAN configuration after macOS upgrade. On secondary MDC, the subcommand's behavior depends on the configuration state of Open Directory when it runs. Xsan controllers must be Open Directory controllers for the cluster containing the SAN configuration. If the computer is not an Open Directory controller, this subcommand configures the computer to be a replica in the Open Directory cluster, and then activates the previous Xsan SAN configuraton. The subcommand options supplied are examined in the case where the computer is not an Open Directory controller. In this case, they are processed as if the createReplica subcommand had been run. In the case where the computer is already an Open Directory controller, none of the additional createReplica command options are valid. cullSan sanName This subcommand must be run as root and does not depend on xsand running. This subcommand destroys the LDAP configuration for a SAN. This subcommand is intended to clean up SAN configurations in LDAP which have been in the dead state long enough that all clients have been unconfigured. This operation can not be undone. disksChanged Sends a notification to the Xsan file system that disks have changed and should be rescanned. eraseVolume volumeName Initializes the volume volumeName. See CAUTION section below. renameVolume oldName newName Renames an existing volume name to the new name. The existing config file will be renamed, and the existing data directory containing logs will be migrated to the new name. This subcommand must be run as root. importVolume volumeConfigFile Imports a volume into SAN using the specified volume config file. Upon successful import, the volume will be started. dumpLdapConfig Prints the SAN configuration. --json Print the configuration in JSON. Plumbing commands These commands expose specific points of SAN management functionality. They can be very powerful, and offer an administrator a lot of flexibility. Use these commands with care as they offer enough flexibility to trip and/or harm an administrator. sanConfigChanged Sends a notification to the Xsan file system that the SAN configuration has changed and should be reloaded. pushConfigUpdate Pushes out a new configuration update. This subcommand must be run as root and does not depend on xsand running. This subcommand adjusts the SAN configuration in ldap to match the configuration status in /Library/Preferences/Xsan. If the ldap configuration is changed, a configuration update message will be posted to the SAN. See CAUTION section below. ldapConfigChanged This subcommand must be run as root and does not depend on xsand running. This subcommand verifies the local configuration with the configuration in ldap, and updates the local configuration to match. See CAUTION section below. roleChanged Sends a notification to the Xsan file system that the role has changed. wipeConfig Causes the Xsan file system configuration to be reset to an unconfigured state. listTask volumeName [options] List the long running task for volumeName. --cleanup Cleanup the long running task if it has been completed. --wait Wait for the long running task to complete. listTasks List all long running tasks for all volumes. VOLUME DESCRIPTION The addVolume and editVolume verbs share the command options below. Most options are available to both verbs. A few are only available to addVolume as they control settings which can not be modified by editVolume. VOLUME SETTINGS --caseSensitive Enable case sensitive on Xsan file system. When enabled, the volume considers filenames to be different if they are spelled alike but capitalized differently. --caseInsensitive Enable case insensitive on Xsan file system. When enabled, the volume considers filenames to be the same if they are spelled alike but capitalized differently. This setting is the default for new volumes. --enableACLs Specify whether the Xsan file system uses access control lists (ACLs) on a volume. --ignoreOwners Enable the noowners flag when mounting the volume, as documented in the mount(8) man page. This setting is the default for new volumes. --idsFromGUIDs Specify that Windows clients should dynamically generate UIDs and GIDs based on globally unique identifer (GUID) information in Active Directory domain when mapping user and group information to Xsan-compatible user IDs (UIDs) and group IDs (GIDs). --idsFromLDAP Specify that Windows clients should get UID and GID values from the uidNumber and gidNumber attributes in Active Directory records when mapping user and group information to Xsan- compatible user IDs (UIDs) and group IDs (GIDs). This setting is the default for new volumes. --noExtendedAttrs Disable support for Apple Named Streams. Named Streams are utilized by Apple Xsan clients. Disabling support on a Xsan file system is a permanent change. It cannot be enabled once disabled. STORAGE POOL SETTINGS An Xsan volume contains one or more LUNs grouped into one or more Storage Pools. A Storage Pool's description begins with a --storagePool argument which specifies the Storage Pool's name. Subsequent arguments control the content stored in the pool and add LUNs to the pool. A pool's description ends when a subsequent --storagePool argument starts the next pool, or the command line ends. Storage Pool names must be unique within the volume. As every volume requires one pool containing metadata and the journal, the --defaultFirstPool argument facilitates quickly creating such a Storage Pool. This argument is equivalent to this sequence of command arguments: --storagePool MetadataAndJournal --metadata --journal Further, this Storage Pool is placed at the beginning of the Storage Pool list, regardless of where this argument is located in the command line. For typical usage, the only arguments needed for this storage pool are to add one or more LUNs to the pool. If none of the content types are set on a Storage Pool, it defaults to contain userdata. --storagePool StoragePoolName Begin specifying a storage pool named StoragePoolName. This argument implicitly ends any preceding Storage Pool description. --defaultFirstPool Begin specifying a storage pool named MetadataAndJournal which contains the journal and metadata. This Storage Pool is placed at the beginning of the Storage Pool list, regardless of where this argument is located on the command line. This argument implicitly ends any preceding Storage Pool description. --metadata This Storage Pool may contain metadata. --journal This Storage Pool will contain the journal. --data This Storage Pool may contain userdata. --any Shorthand for specifying --metadata --data --journal --addLUN DiskLabelName Add a disk to the Storage Pool. The Disk Label name can be determined using using cvlabel command. --addLUNs Disk1LabelName,Disk2LabelName,... Add multiple disks to the Storage Pool. --stripeBreadth StripeBreadthSizeInKB Specify the amount of data that will be written to a LUN before switching to the next LUN within a stripe group. For optimal performance, stripeBreadth size should be a multiple of RAID stripe size. The stripeBreadth size must also be a multiple file system block size of 4096 bytes. COMMAND SETTINGS --dry-run Verify the requested operation without actually applying the changes. --output Write the volume configuration settings to the specified output path. This option is intended exclusively for automated testing. This option is subject to change without notice. ---non-interactive Perform the requested operation without actually waiting for its completion. The status of the operation can later be queried using the listTask or listTasks verbs. This option is intended exclusively for automated testing. This option is subject to change without notice.
|
xsanctl – Xsan file system control utility SYNOPSYS xsanctl command [arg [...]]
| null | null |
addVolume superVolume --defaultFirstPool --addLUN metaLUN --storagePool lotsOfSpace --addLUNs firstAcreOfData,secondAcreOfData This command creates a new volume, superVolume with two Storage Pools, MetadataAndJournal and lotsOfSpace. The first Storage Pool is the one named MetadataAndJournal and contains metadata and the journal. This storage pool contains one LUN named metaLUN. The second Storage Pool is named lotsOfSpace and contains userdata due to the use of the default userdata specification. This Storage Pool contains two LUNs named firstAcreOfData and secondAcreOfData. addVolume superVolume --storagePool lotsOfSpace --addLUNs firstAcreOfData,secondAcreOfData --defaultFirstPool --addLUN metaLUN This command creates the same volume as before, and demonstrates how the Storage Pool created by --defaultFirstPool is always the first Storage Pool in the volume, regardless of where the argument is on the command line. editVolume superVolume --caseSensitive Change the volume superVolume to be case sensitive. editVolume superVolume --storagePool moreSpace --addLUNs thirdAcreOfData,fourthAcreOfData Add a new Storage Pool named moreSpace to the volume superVolume. This Storage Pool will contain two LUNs named thirdAcreOfData and fourthAcreOfData. CAUTION The pushConfigUpdate and ldapConfigChanged verbs can permanently damage a SANs configuration when run on a controller if LDAP replication is not functioning correctly. These verbs assume that the local LDAP node contains a correct configuration for the SAN, and can lose data if this assumption is incorrect. The pushConfigUpdate verb especially can be dangerous if the local LDAP configuration is not current. Any local differences between it and the state in the /Library/Preferences/Xsan configuration files will trigger an update to the local LDAP which the SAN will then take as the most-up- to-date configuration. Specifically, if a volume has been created in the SAN but it is not described in the LDAP configuration of a controller executing pushConfigUpdate, this volume's configuration will be lost and any controller currently hosting it will stop. Clients will not correctly disconnect and thus require a hard reboot. The eraseVolume verb will destroy ALL existing data in the volume. SEE ALSO diskutil(8), launchd(8), cvadmin(8), cvlabel(8), xsand(8), mount(8) Xsan April 20, 2015 Xsan
|
kdcsetup
|
kdcsetup is a tool for configuring an Apple Open Directory KDC. It creates the needed Kerberos files and data for an Open Director master. -v debug_level Controls the amount of output generated by kdcsetup. 0 prints errors and very basic information. 1 prints generatal status information. Higher levels may add progressively more detail. -a admin_name Name of a directory administrator authorized to make changes in Open Directory. This admin will be used as the administrator in the KDC database. Required parameter. Note: this is not a principal name. -p password The password for the above admin. Required parameter. REALM The name of the realm that this KDC serves. Required parameter. FILES /var/db/krb5kdc/ directory where all the config & database files for the KDC are stored /var/log/krb5kdc/ directory where the log files from the KDC are written NOTES kdcsetup is automatically run when creating an Open Directory Master. It should NEVER be run manually and will likely be deprecated in the future. SEE ALSO kadmind(8), kdc(8), kerberos(8), krbservicesetup(8), opendirectoryd(8), sso_util(8) Darwin Tue Mar 11 2003 Darwin
|
kdcsetup – Kerberos – Open Directory Single Sign On
|
kdcsetup [-v debug_level] [-a admin_name] [-p password] REALM
| null | null |
aslmanager
|
aslmanager manages rotated files and ASL data written by the syslogd server. It is started automatically at various times by syslogd. It may also be invoked from the command line by the superuser (root). It manages the life-cycle of data in the ASL database, rotated log files, and ASL directory data stores. Configuration information for aslmanager comes from the /etc/asl.conf configuration file, any ASL output module configuration files in the /etc/asl directory, and from command-line options that may be specified to override some settings found in the configuration files. In normal operation, it first checks the ASL database in /var/log/asl, then it checks the files and directories specified by /etc/asl.conf and each ASL output module. If the -asldb flag is specified, then only the ASL database will be processed. If the -module flag is specified, then the ASL database will not be processed. All ASL output modules, or a single module if name is specified, will be processed. If -checkpoint is specified, then aslmanager will signal syslogd to checkpoint files for all modules, or for a single named module, before processing. The -d flag causes aslmanager to print debug messages tracing it's actions as they are performed. An integer value (1, 2, or 3) may follow the -d flag. Higher values cause more fine-grained messages to be printed. The default value is 1. The -dd flag directs aslmanager to do a “dry run”. Debug messages are printed as with -d, but no actions are actually performed. An optional debug level may follow the -dd flag. ASL DATABASE MANAGEMENT aslmanager scans the ASL database in /var/log/asl, or some other path specified by the setting of the “store_path” parameter in asl.conf, or by the path supplied following the -s flag. Data files that are older than the time-to-live for the database are either archived or removed. Files that contain messages with explicit expire times are removed or archived monthly after all their contents expire. The default 7 day time-to-live value may be overridden by the setting of the “store_ttl” parameter in asl.conf or by supplying a value following the -store_ttl flag or the -ttl flag (which overrides the time-to-live for both the ASL database and for all ASL modules). A time-to-live value of zero allows files to remain in the store with no time limit. A maximum size for the entire database is provided by the setting of the “max_store_size” parameter in asl.conf, or as a value following the -size flag. This will cause aslmanager to archive (if enabled) and remove files to keep the database size below the specified limit. The default value is 150000000 bytes. A value of zero means the size is unlimited. An unlimited size specification should be used with great caution, since a runaway process could quickly fill all available disk space. Files are removed in order starting from oldest to newest. Files with the same date are removed in standard lexicographic sort order by file name. Files are either removed entirely or copied to an archive directory. If the -a flag is specified with no argument, files are copied to the /var/log/asl.archive directory. An alternate directory path may be specified following the -a flag. The archive parameter setting in asl.conf enables or disables archiving. The archive parameter requires a value of "1" to enable archiving, or a value of "0" to disable it. An option archive directory path may follow the "0" or "1". ASL OUTPUT MODULE MANAGEMENT For each ASL output module, or a single module specified as an argument following -module, aslmanager first locates all checkpoint files produced by syslogd for that module. aslmanager checks all ASL directory data stores and all rotated log files - those with a “rotate” option in the module's configuration rules. Checkpoint files are renamed if necessary to conform to the naming style specified for the file by a “style” option in the module's configuration file. aslmanager will compress the file if directed by a “compress” option, and it will move the file to a destination directory if a “dest” option is specified for the file. Following this, aslmanager will delete expired files. The time-to-live for files is 7 days by default, but may be specified using the “ttl” option for the file in the module's configuration rules. If -module_ttl or -ttl are specified command line, then value specified as an argument is used as a time-to-live instead. -module_ttl specifies time-to-live for module processing. -ttl specifies time-to-live for both the ASL database and for modules. Finally, if the “all_max” option is specified for the output file, aslmanager checks the total size of all the rotated versions, and will delete them, (oldest first) to limit the total size as specified by “all_max”. When processing ASL directory data stores, aslmanager will similarly delete data files after the expiry of their time-to-live, and will delete data files (oldest first) to limit the total size as specified by “all_max”. SEE ALSO syslogd(8), syslog(1), asl(3), asl.conf(5), syslog(3). HISTORY The aslmanager utility appeared in Mac OS X 10.6. Support for log file and ASL directory life-cycle management was added in OS X 10.9. Mac OS X December 7, 2007 Mac OS X
|
aslmanager – Apple System Log data life-cycle manager
|
aslmanager [-s store_dir] [-a [archive_dir]] [-ttl days] [-store_ttl days] [-module_ttl days] [-size max_size] [-asldb] [-module [name]] [-checkpoint] [-d [level]] [-dd [level]]
| null | null |
screencapture
|
The screencapture utility is not very well documented to date. A list of options follows. -c Force screen capture to go to the clipboard. -b Capture Touch Bar, only works in non-interactive modes. -C Capture the cursor as well as the screen. Only allowed in non- interactive modes. -d Display errors to the user graphically. -i Capture screen interactively, by selection or window. The control key will cause the screenshot to go to the clipboard. The space key will toggle between mouse selection and window selection modes. The escape key will cancel the interactive screenshot. -m Only capture the main monitor, undefined if -i is set. -D <display> Screen capture or record from the display specified. 1 is main, 2 secondary, etc -o In window capture mode, do not capture the shadow of the window. -p Screen capture will use the default settings for capture. The files argument will be ignored. -M Open the taken picture in a new Mail message. -P Open the taken picture in a Preview window or QuickTime Player if video. -I Open the taken picture in Messages. -B <bundleid> Open in the app matching bundleid. -s Only allow mouse selection mode. -S In window capture mode, capture the screen instead of the window. -J <style> Sets the starting style of interfactive capture "selection","window","video". -t <format> Image format to create, default is png (other options include pdf, jpg, tiff and other formats). -T <seconds> Take the picture after a delay of <seconds>, default is 5. -w Only allow window selection mode. -W Start interaction in window selection mode. -x Do not play sounds. -a Do not capture attached windows. -r Do not add screen dpi meta data to captured file. -l <windowid> Captures the window with windowid. -R <rectangle> Capture rectangle using format x,y,width,height. -v Capture video recording of the screen. -V <seconds> Capture video recording of the screen for the specified seconds. -G <id> Captures audio during a video recording using audio source specified by id. -g Captures audio during a video recording using default input. -k Show clicks in video recordings. -U Show interactive toolbar in interactive mode. -u Present UI after screencapture is complete. Files passed to commandline will be ignored. files where to save the screen capture, 1 file per screen BUGS Better documentation is needed for this utility. SECURITY CONSIDERATIONS To capture screen content while logged in via ssh, you must launch screencapture in the same mach bootstrap hierarchy as loginwindow: PID=pid of loginwindow sudo launchctl bsexec $PID screencapture [options] HISTORY A screencapture utility first appeared in Mac OS X v10.2. Mac OS June 16, 2004 Mac OS
|
screencapture – capture images from the screen and save them to a file or the clipboard
|
screencapture [-SWCTMPcimswxto] file
| null | null |
htdigest
| null |
htdigest - manage user files for digest authentication
|
htdigest [ -c ] passwdfile realm username SUMMARY htdigest is used to create and update the flat-files used to store usernames, realm and password for digest authentication of HTTP users. Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htdigest. This manual page only lists the command line arguments. For details of the directives necessary to configure digest authentication in httpd see the Apache manual, which is part of the Apache distribution or can be found at http://httpd.apache.org/.
|
-c Create the passwdfile. If passwdfile already exists, it is deleted first. passwdfile Name of the file to contain the username, realm and password. If -c is given, this file is created if it does not already exist, or deleted and recreated if it does exist. realm The realm name to which the user name belongs. See http://tools.ietf.org/html/rfc2617#section-3.2.1 for more details. username The user name to create or update in passwdfile. If username does not exist is this file, an entry is added. If it does exist, the password is changed. SECURITY CONSIDERATIONS This program is not safe as a setuid executable. Do not make it setuid. Apache HTTP Server 2018-07-06 HTDIGEST(1)
| null |
chat
|
The chat program defines a conversational exchange between the computer and the modem. Its primary purpose is to establish the connection between the Point-to-Point Protocol Daemon (pppd) and the remote's pppd process.
|
chat - Automated conversational script with a modem
|
chat [ options ] script
|
-f <chat file> Read the chat script from the chat file. The use of this option is mutually exclusive with the chat script parameters. The user must have read access to the file. Multiple lines are permitted in the file. Space or horizontal tab characters should be used to separate the strings. -t <timeout> Set the timeout for the expected string to be received. If the string is not received within the time limit then the reply string is not sent. An alternate reply may be sent or the script will fail if there is no alternate reply string. A failed script will cause the chat program to terminate with a non-zero error code. -r <report file> Set the file for output of the report strings. If you use the keyword REPORT, the resulting strings are written to this file. If this option is not used and you still use REPORT keywords, the stderr file is used for the report strings. -e Start with the echo option turned on. Echoing may also be turned on or off at specific points in the chat script by using the ECHO keyword. When echoing is enabled, all output from the modem is echoed to stderr. -E Enables environment variable substituion within chat scripts using the standard $xxx syntax. -v Request that the chat script be executed in a verbose mode. The chat program will then log the execution state of the chat script as well as all text received from the modem and the output strings sent to the modem. The default is to log through the SYSLOG; the logging method may be altered with the -S and -s flags. -V Request that the chat script be executed in a stderr verbose mode. The chat program will then log all text received from the modem and the output strings sent to the modem to the stderr device. This device is usually the local console at the station running the chat or pppd program. -s Use stderr. All log messages from '-v' and all error messages will be sent to stderr. -S Do not use the SYSLOG. By default, error messages are sent to the SYSLOG. The use of -S will prevent both log messages from '-v' and error messages from being sent to the SYSLOG. -T <phone number> Pass in an arbitary string, usually a phone number, that will be substituted for the \T substitution metacharacter in a send string. -U <phone number 2> Pass in a second string, usually a phone number, that will be substituted for the \U substitution metacharacter in a send string. This is useful when dialing an ISDN terminal adapter that requires two numbers. script If the script is not specified in a file with the -f option then the script is included as parameters to the chat program. CHAT SCRIPT The chat script defines the communications. A script consists of one or more "expect-send" pairs of strings, separated by spaces, with an optional "subexpect-subsend" string pair, separated by a dash as in the following example: ogin:-BREAK-ogin: ppp ssword: hello2u2 This line indicates that the chat program should expect the string "ogin:". If it fails to receive a login prompt within the time interval allotted, it is to send a break sequence to the remote and then expect the string "ogin:". If the first "ogin:" is received then the break sequence is not generated. Once it received the login prompt the chat program will send the string ppp and then expect the prompt "ssword:". When it receives the prompt for the password, it will send the password hello2u2. A carriage return is normally sent following the reply string. It is not expected in the "expect" string unless it is specifically requested by using the \r character sequence. The expect sequence should contain only what is needed to identify the string. Since it is normally stored on a disk file, it should not contain variable information. It is generally not acceptable to look for time strings, network identification strings, or other variable pieces of data as an expect string. To help correct for characters which may be corrupted during the initial sequence, look for the string "ogin:" rather than "login:". It is possible that the leading "l" character may be received in error and you may never find the string even though it was sent by the system. For this reason, scripts look for "ogin:" rather than "login:" and "ssword:" rather than "password:". A very simple script might look like this: ogin: ppp ssword: hello2u2 In other words, expect ....ogin:, send ppp, expect ...ssword:, send hello2u2. In actual practice, simple scripts are rare. At the vary least, you should include sub-expect sequences should the original string not be received. For example, consider the following script: ogin:--ogin: ppp ssword: hello2u2 This would be a better script than the simple one used earlier. This would look for the same login: prompt, however, if one was not received, a single return sequence is sent and then it will look for login: again. Should line noise obscure the first login prompt then sending the empty line will usually generate a login prompt again. COMMENTS Comments can be embedded in the chat script. A comment is a line which starts with the # (hash) character in column 1. Such comment lines are just ignored by the chat program. If a '#' character is to be expected as the first character of the expect sequence, you should quote the expect string. If you want to wait for a prompt that starts with a # (hash) character, you would have to write something like this: # Now wait for the prompt and send logout string ´# ' logout SENDING DATA FROM A FILE If the string to send starts with an at sign (@), the rest of the string is taken to be the name of a file to read to get the string to send. If the last character of the data read is a newline, it is removed. The file can be a named pipe (or fifo) instead of a regular file. This provides a way for chat to communicate with another program, for example, a program to prompt the user and receive a password typed in. ABORT STRINGS Many modems will report the status of the call as a string. These strings may be CONNECTED or NO CARRIER or BUSY. It is often desirable to terminate the script should the modem fail to connect to the remote. The difficulty is that a script would not know exactly which modem string it may receive. On one attempt, it may receive BUSY while the next time it may receive NO CARRIER. These "abort" strings may be specified in the script using the ABORT sequence. It is written in the script as in the following example: ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT This sequence will expect nothing; and then send the string ATZ. The expected response to this is the string OK. When it receives OK, the string ATDT5551212 to dial the telephone. The expected string is CONNECT. If the string CONNECT is received the remainder of the script is executed. However, should the modem find a busy telephone, it will send the string BUSY. This will cause the string to match the abort character sequence. The script will then fail because it found a match to the abort string. If it received the string NO CARRIER, it will abort for the same reason. Either string may be received. Either string will terminate the chat script. CLR_ABORT STRINGS This sequence allows for clearing previously set ABORT strings. ABORT strings are kept in an array of a pre-determined size (at compilation time); CLR_ABORT will reclaim the space for cleared entries so that new strings can use that space. SAY STRINGS The SAY directive allows the script to send strings to the user at the terminal via standard error. If chat is being run by pppd, and pppd is running as a daemon (detached from its controlling terminal), standard error will normally be redirected to the file /etc/ppp/connect-errors. SAY strings must be enclosed in single or double quotes. If carriage return and line feed are needed in the string to be output, you must explicitely add them to your string. The SAY strings could be used to give progress messages in sections of the script where you want to have 'ECHO OFF' but still let the user know what is happening. An example is: ABORT BUSY ECHO OFF SAY "Dialling your ISP...\n" ´' ATDT5551212 TIMEOUT 120 SAY "Waiting up to 2 minutes for connection ... " CONNECT '' SAY "Connected, now logging in ...0 ogin: account ssword: pass $ SAY "Logged in OK ...0 etc ... This sequence will only present the SAY strings to the user and all the details of the script will remain hidden. For example, if the above script works, the user will see: Dialling your ISP... Waiting up to 2 minutes for connection ... Connected, now logging in ... Logged in OK ... REPORT STRINGS A report string is similar to the ABORT string. The difference is that the strings, and all characters to the next control character such as a carriage return, are written to the report file. The report strings may be used to isolate the transmission rate of the modem's connect string and return the value to the chat user. The analysis of the report string logic occurs in conjunction with the other string processing such as looking for the expect string. The use of the same string for a report and abort sequence is probably not very useful, however, it is possible. The report strings to no change the completion code of the program. These "report" strings may be specified in the script using the REPORT sequence. It is written in the script as in the following example: REPORT CONNECT ABORT BUSY '' ATDT5551212 CONNECT '' ogin: account This sequence will expect nothing; and then send the string ATDT5551212 to dial the telephone. The expected string is CONNECT. If the string CONNECT is received the remainder of the script is executed. In addition the program will write to the expect-file the string "CONNECT" plus any characters which follow it such as the connection rate. CLR_REPORT STRINGS This sequence allows for clearing previously set REPORT strings. REPORT strings are kept in an array of a pre-determined size (at compilation time); CLR_REPORT will reclaim the space for cleared entries so that new strings can use that space. ECHO The echo options controls whether the output from the modem is echoed to stderr. This option may be set with the -e option, but it can also be controlled by the ECHO keyword. The "expect-send" pair ECHO ON enables echoing, and ECHO OFF disables it. With this keyword you can select which parts of the conversation should be visible. For instance, with the following script: ABORT 'BUSY' ABORT 'NO CARRIER' OK\r\n ATD1234567 \r\n \c ECHO ON CONNECT \c ogin: account all output resulting from modem configuration and dialing is not visible, but starting with the CONNECT (or BUSY) message, everything will be echoed. HANGUP The HANGUP options control whether a modem hangup should be considered as an error or not. This option is useful in scripts for dialling systems which will hang up and call your system back. The HANGUP options can be ON or OFF. When HANGUP is set OFF and the modem hangs up (e.g., after the first stage of logging in to a callback system), chat will continue running the script (e.g., waiting for the incoming call and second stage login prompt). As soon as the incoming call is connected, you should use the HANGUP ON directive to reinstall normal hang up signal behavior. Here is an (simple) example script: ABORT 'BUSY' OK\r\n ATD1234567 \r\n \c CONNECT \c ´Callback login:' call_back_ID HANGUP OFF ABORT "Bad Login" ´Callback Password:' Call_back_password TIMEOUT 120 CONNECT \c HANGUP ON ABORT "NO CARRIER" ogin:--BREAK--ogin: real_account etc ... TIMEOUT The initial timeout value is 45 seconds. This may be changed using the -t parameter. To change the timeout value for the next expect string, the following example may be used: ATZ OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin: TIMEOUT 5 assword: hello2u2 This will change the timeout to 10 seconds when it expects the login: prompt. The timeout is then changed to 5 seconds when it looks for the password prompt. The timeout, once changed, remains in effect until it is changed again. SENDING EOT The special reply string of EOT indicates that the chat program should send an EOT character to the remote. This is normally the End-of-file character sequence. A return character is not sent following the EOT. The EOT sequence may be embedded into the send string using the sequence ^D. GENERATING BREAK The special reply string of BREAK will cause a break condition to be sent. The break is a special signal on the transmitter. The normal processing on the receiver is to change the transmission rate. It may be used to cycle through the available transmission rates on the remote until you are able to receive a valid login prompt. The break sequence may be embedded into the send string using the \K sequence. ESCAPE SEQUENCES The expect and reply strings may contain escape sequences. All of the sequences are legal in the reply string. Many are legal in the expect. Those which are not valid in the expect sequence are so indicated. '' Expects or sends a null string. If you send a null string then it will still send the return character. This sequence may either be a pair of apostrophe or quote characters. \b represents a backspace character. \c Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. It must be at the end of the send string. For example, the sequence hello\c will simply send the characters h, e, l, l, o. (not valid in expect.) \d Delay for one second. The program uses sleep(1) which will delay to a maximum of one second. (not valid in expect.) \K Insert a BREAK (not valid in expect.) Send a newline or linefeed character. \N Send a null character. The same sequence may be represented by \0. (not valid in expect.) \p Pause for a fraction of a second. The delay is 1/10th of a second. (not valid in expect.) \q Suppress writing the string to the SYSLOG file. The string ?????? is written to the log in its place. (not valid in expect.) \r Send or expect a carriage return. \s Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\sTIM are the same. \t Send or expect a tab character. \T Send the phone number string as specified with the -T option (not valid in expect.) \U Send the phone number 2 string as specified with the -U option (not valid in expect.) Send or expect a backslash character. \ddd Collapse the octal digits (ddd) into a single ASCII character and send that character. (some characters are not valid in expect.) ^C Substitute the sequence with the control character represented by C. For example, the character DC1 (17) is shown as ^Q. (some characters are not valid in expect.) ENVIRONMENT VARIABLES Environment variables are available within chat scripts, if the -E option was specified in the command line. The metacharacter $ is used to introduce the name of the environment variable to substitute. If the substition fails, because the requested environment variable is not set, nothing is replaced for the variable. TERMINATION CODES The chat program will terminate with the following completion codes. 0 The normal termination of the program. This indicates that the script was executed without error to the normal conclusion. 1 One or more of the parameters are invalid or an expect string was too large for the internal buffers. This indicates that the program as not properly executed. 2 An error occurred during the execution of the program. This may be due to a read or write operation failing for some reason or chat receiving a signal such as SIGINT. 3 A timeout event occurred when there was an expect string without having a "-subsend" string. This may mean that you did not program the script correctly for the condition or that some unexpected event has occurred and the expected string could not be found. 4 The first string marked as an ABORT condition occurred. 5 The second string marked as an ABORT condition occurred. 6 The third string marked as an ABORT condition occurred. 7 The fourth string marked as an ABORT condition occurred. ... The other termination codes are also strings marked as an ABORT condition. Using the termination code, it is possible to determine which event terminated the script. It is possible to decide if the string "BUSY" was received from the modem as opposed to "NO DIAL TONE". While the first event may be retried, the second will probably have little chance of succeeding during a retry. SEE ALSO Additional information about chat scripts may be found with UUCP documentation. The chat script was taken from the ideas proposed by the scripts used by the uucico program. uucico(1), uucp(1) COPYRIGHT The chat program is in public domain. This is not the GNU public license. If it breaks then you get to keep both pieces. Chat Version 1.22 22 May 1999 CHAT(8)
| null |
DevToolsSecurity
|
This tool changes the security authorization policies for use of Apple- code-signed debugger and performance analysis tools on development systems. On normal user systems, the first time in a given login session that any such Apple-code-signed debugger or performance analysis tools are used to examine one of the user's processes, the user is queried for an administator password for authorization. DevToolsSecurity tool to change the authorization policies, such that a user who is a member of either the admin group or the _developer group does not need to enter an additional password to use the Apple-code-signed debugger or performance analysis tools. Developers will typically not need to run this tool manually. If for some reason it needs to be run manually, it can be run from /usr/sbin. macOS 14.5 Nov. 11, 2011 macOS 14.5
|
DevToolsSecurity – Change the security authorization policies for developer systems
|
DevToolsSecurity DevToolsSecurity [-status] [-enable] [-disable] [-verbose]
| null | null |
logresolve
| null |
logresolve - Resolve IP-addresses to hostnames in Apache log files
|
logresolve [ -s filename ] [ -c ] < access_log > access_log.new SUMMARY logresolve is a post-processing program to resolve IP-addresses in Apache's access logfiles. To minimize impact on your nameserver, logresolve has its very own internal hash-table cache. This means that each IP number will only be looked up the first time it is found in the log file. Takes an Apache log file on standard input. The IP addresses must be the first thing on each line and must be separated from the remainder of the line by a space.
|
-s filename Specifies a filename to record statistics. -c This causes logresolve to apply some DNS checks: after finding the hostname from the IP address, it looks up the IP addresses for the hostname and checks that one of these matches the original address. Apache HTTP Server 2018-07-06 LOGRESOLVE(1)
| null |
cvdbset
|
cvdbset is a tool for system administrators to control cvdb(8) tracing information from the Xsan File System client file system. The level of tracing emitted can be controlled on a per module basis. The set of modules for which tracing is enabled is called the trace set. The level of tracing can be refined further by specifying a set of tracepoints (such as entry/exit points). The set of enabled tracepoints is called the logmask. Warning: enabling tracing can have a substantial performance impact. cvdbset can be used to: List all the current client modules in the trace set. Add all modules to the trace set. Define the trace set. Add selected modules to trace set Remove selected modules from the trace set Set the logmask for a set of modules in the trace set. Resize the logging buffer Start/stop continuous tracing Disable tracing
|
cvdbset - A program to control cvdb tracing.
|
cvdbset [options]
|
no options Display the whether tracing is enabled/disabled, the size of the logging buffer, the modules in the trace set, and their corresponding logmasks. all Enable tracing of all modules. Once cvdbset with a list of modules is invoked, some modules are turned off. cvdbset all sets all modules for tracing. When used with + or -, add or remove all modules. [:]module1 [:]module2 ... When invoked with a list of modules, cvdbset first disables all modules. Then, it enables exactly the given list of modules. To see all modules that can be enabled, use the cvdbset -l command/option. If the module name is preceded by a :, all modules containing the module name will be affected. + [:]module1 [:]module2 ... When invoked with a plus sign (+) as the first argument followed by a list of modules, the given list of modules is added to the current trace set. If the module name is preceded by a :, all modules containing the module name will be affected. - [:]module1 [:]module2 ... When invoked with a minus sign (-) as the first argument followed by a list of modules, the given list of modules is removed from the current trace set. If the module name is preceded by a :, all modules containing the module name will be affected. -h Display a help message and exit. -c Enable continuous cvdb tracing. The trace log will be retrieved once per second and placed in files named cvdbout.000001, ... -d Disable cvdb tracing. -g Dump the current trace buffer to standard out. -l Display whether logging is enabled, the buffer size, and the logmask for all modules. -L Display the list of all available tracepoints for use with the -t option. -r mb Resize the trace buffer to mb megabytes. -t tracepoint For the indicated modules, enable tracing only for the indicated tracepoints. Multiple -t options can be supplied. Use the -L option to cvdbset to see a listing of tracepoints.
|
To see what modules are in the trace set and their logmasks, the command cvdbset with no parameters is used. Here is the output from this command at start-up. Debug logging is DISABLED, Bufsize 4194304 Currently set masks: Module ' proxy_clnt' module 0x0000000000000001 logmask 0xffffffffffffffff Module ' cvdir' module 0x0000000000000002 logmask 0xffffffffffffffff Module ' cvdisk' module 0x0000000000000004 logmask 0xffffffffffffffff Module ' cvnc' module 0x0000000000000008 logmask 0xffffffffffffffff Module ' cvpath' module 0x0000000000000010 logmask 0xffffffffffffffff Module ' portmap' module 0x0000000000000020 logmask 0xffffffffffffffff Module ' cvsock' module 0x0000000000000040 logmask 0xffffffffffffffff Module ' cvsubr' module 0x0000000000000080 logmask 0xffffffffffffffff Module ' dmigfs' module 0x0000000000000100 logmask 0xffffffffffffffff Module ' dmig' module 0x0000000000000200 logmask 0xffffffffffffffff Module ' dmon' module 0x0000000000000400 logmask 0xffffffffffffffff Module ' extapi' module 0x0000000000000800 logmask 0xffffffffffffffff Module ' extent' module 0x0000000000001000 logmask 0xffffffffffffffff Module ' fsmat' module 0x0000000000002000 logmask 0xffffffffffffffff Module ' fsmcom' module 0x0000000000004000 logmask 0xffffffffffffffff Module ' fsmdmig' module 0x0000000000008000 logmask 0xffffffffffffffff Module ' fsmproxy' module 0x0000000000010000 logmask 0xffffffffffffffff Module ' fsmrtio' module 0x0000000000020000 logmask 0xffffffffffffffff Module ' fsmtoken' module 0x0000000000040000 logmask 0xffffffffffffffff Module ' fsmvfs' module 0x0000000000080000 logmask 0xffffffffffffffff Module ' fsmvnops' module 0x0000000000100000 logmask 0xffffffffffffffff Module ' memalloc' module 0x0000000000200000 logmask 0xffffffffffffffff Module ' proxy_con' module 0x0000000000400000 logmask 0xffffffffffffffff Module ' quotas' module 0x0000000000800000 logmask 0xffffffffffffffff Module ' recon' module 0x0000000001000000 logmask 0xffffffffffffffff Module ' rtio' module 0x0000000002000000 logmask 0xffffffffffffffff Module ' rwbuf' module 0x0000000004000000 logmask 0xffffffffffffffff Module ' rwproxy' module 0x0000000008000000 logmask 0xffffffffffffffff Module ' rwlock' module 0x0000000010000000 logmask 0xffffffffffffffff Module ' rw' module 0x0000000020000000 logmask 0xffffffffffffffff Module 'slidingbucket' module 0x0000000040000000 logmask 0xffffffffffffffff Module ' sockinput' module 0x0000000080000000 logmask 0xffffffffffffffff Module ' proxy_srv' module 0x0000000100000000 logmask 0xffffffffffffffff Module ' proxy_subr' module 0x0000000200000000 logmask 0xffffffffffffffff Module ' vfsops' module 0x0000000400000000 logmask 0xffffffffffffffff Module ' vnops' module 0x0000000800000000 logmask 0xffffffffffffffff Module ' perf' module 0x0000001000000000 logmask 0xffffffffffffffff Module ' md_cvdir' module 0x0000002000000000 logmask 0xffffffffffffffff Module ' md_cvsock' module 0x0000004000000000 logmask 0xffffffffffffffff Module ' md_cvsubr' module 0x0000008000000000 logmask 0xffffffffffffffff Module ' md_dmon' module 0x0000010000000000 logmask 0xffffffffffffffff Module ' md_fsmcom' module 0x0000020000000000 logmask 0xffffffffffffffff Module ' md_memalloc' module 0x0000040000000000 logmask 0xffffffffffffffff Module ' md_rwlock' module 0x0000080000000000 logmask 0xffffffffffffffff Module ' md_rw' module 0x0000100000000000 logmask 0xffffffffffffffff Module ' md_rwproxy' module 0x0000200000000000 logmask 0xffffffffffffffff Module ' md_socksubr' module 0x0000400000000000 logmask 0xffffffffffffffff Module ' md_vfsops' module 0x0000800000000000 logmask 0xffffffffffffffff Module ' md_vnops' module 0x0001000000000000 logmask 0xffffffffffffffff Module ' sh_cvsubr' module 0x0002000000000000 logmask 0xffffffffffffffff Module ' sh_fsmcom' module 0x0004000000000000 logmask 0xffffffffffffffff Module ' sh_sockinput' module 0x0008000000000000 logmask 0xffffffffffffffff Module ' sh_vnops' module 0x0010000000000000 logmask 0xffffffffffffffff To enable tracing for selected modules: cvdbset md_vnops rw fsmvnops fsmtoken fsmdmig This enables tracing for only these five modules and prints the output: Setting md_vnops. Setting rw. Setting fsmvnops. Setting fsmtoken. Setting fsmdmig. cvdb -m modules=0x0001000020148000 logmask=0xffffffffffffffff If an argument is preceded by a colon (:), then any module whose name contains the argument as a substring is included. To enable the md_vnops tracing module and all of the proxy-related modules: cvdbset md_vnops :proxy This displays the following output: Setting md_vnops. Setting proxy_clnt. Setting fsmproxy. Setting proxy_con. Setting rwproxy. Setting proxy_srv. Setting proxy_subr. Setting md_rwproxy. cvdb -m modules=0x0001200308410001 logmask=0xffffffffffffffff To add rwbuf and vnops modules to the current tracing set with the cvENTRY and cvEXIT tracepoints enabled: cvdbset -t cvENTRY -t cvEXIT + rwbuf vnops This displays the following output: Adding rwbuf. Adding vnops. cvdb -m modules=0x0000000804000000 logmask=0x0000000000000003 To remove rwbuf and vnops from the current tracing set: cvdbset - rwbuf vnops This displays the following output: Clearing rwbuf. Clearing vnops. cvdb -m modules=0x0000000804000000 logmask=0x0000000000000000 The special module all can be used with both the + and - options to add/remove all modules from the trace. After tracing is enabled, cvdbset -g can be used to retrieve the trace. When desired, cvdbset -d can be used to disable tracing. Various cvdb(8) command/options can be used for even finer control of tracing. See cvdb(8) for more details. I/O PERFORMANCE ANALYSIS The 'perf' trace module is very useful to analyze I/O performance, for example: cvdbset perf Then cvdbset -g will display info like this: PERF: Device Write 41 MB/s IOs 2 exts 1 offs 0x0 len 0x400000 mics 95589 ino 0x5 PERF: VFS Write EofDmaAlgn 41 MB/s offs 0x0 len 0x400000 mics 95618 ino 0x5 The 'PERF: Device' trace shows throughput measured for the device I/O. It also shows the number of I/O's that it was broken into and number of extents (sequence of consecutive filesystem blocks). The 'PERF: VFS' trace shows throughput measured for the read or write system call and significant aspects of the I/O including: Dma - DMA Buf - Buffered Eof - File extended Algn - Well formed DMA I/O Shr - File is shared by another client Rt - File is real time Zr - Hole in file was zeroed Both traces also report file offset, I/O size, latency (mics), and inode number. Sample use cases: 1) Verify I/O properties are as expected. The VFS trace can be used to ensure that the displayed properties are consistent with expectations, for example, well formed, buffered vs. DMA, shared/non-shared, or I/O size. If a small I/O is being performed DMA then performance will be poor. If DMA I/O is not well formed then it requires an extra data copy and may even be broken into small chunks. Zeroing holes in files has a performance impact. 2) Determine if metadata operations are impacting performance. If VFS throughput is inconsistent or significantly less than Device throughput then it may be caused by metadata operations. In that case it would be useful to display 'fsmtoken', 'fsmvnops', and 'fsmdmig' traces in addition to 'perf'. 3) Identify disk performance issues. If Device throughput is inconsistent or less than expected then it may indicate a slow disk in a storage pool or that RAID tuning is necessary. 4) Identify file fragmentation. If the extent count 'exts' is high then it may indicate a fragmentation problem. This causes the device I/O's to broken into smaller chunks which can significantly impact throughput. 5) Identify read/modify/write condition. If buffered VFS writes are causing Device reads then it may be beneficial to match I/O request size to a multiple of the 'cachebufsize' (default 256KB or 1024K, see mount_acfs(8)). Another way to avoid this is by truncating the file before writing. SEE ALSO cvdb(8) Xsan File System November 2019 CVDBSET(8)
|
KernelEventAgent
|
The KernelEventAgent utility is responsible for displaying disk full and unresponsive file server messages. It is not intended to be run directly, but rather started by the system. The few options it has are intended as debugging aids. Typically, allowing the system to start KernelEventAgent by itself, without any additional options, is the ideal configuration. The options are as follows: -d Debug mode. Do not fork into a detached process, and write messages to stderr as well as the system log. -v Verbose mode. System messages of LOG_INFO level and LOG_DEBUG level are raised to the LOG_NOTICE level. -f fsname The file system identified by fsname is also passed the timeout value via the VFS_CTL_TIMEO sysctl. -t timeout The timeout value, specified in seconds, is the amount of time to wait before the user is notified again after dismissing notice of an unresponsive network mount point. macOS 14.5 October 4, 2005 macOS 14.5
|
KernelEventAgent – utility to provide user interface on behalf of the kernel
|
KernelEventAgent [-dv] [-f fsname] [-t timeout]
| null | null |
gpt
|
The gpt utility provides the necessary functionality to manipulate GUID partition tables (GPTs), but see BUGS below for how and where functionality is missing. The basic usage model of the gpt tool follows that of the cvs(1) tool. The general options are described in the following paragraph. The remaining paragraphs describe the individual commands with their options. Here we conclude by mentioning that a device is either a special file corresponding to a disk-like device or a regular file. The command is applied to each device listed on the command line. General Options The general options allow the user to change default settings or otherwise change the behaviour that is applicable to all commands. Not all commands use all default settings, so some general options may not have an effect on all commands. The -f option causes the gpt utility to open the device with O_SHLOCK|O_RDWR mode. Use this mode cautiously. It may conflict with other tasks currently have the write access to the same device. The -p count option allows the user to change the number of partitions the GPT can accommodate. This is used whenever a new GPT is created. By default, the gpt utility will create space for 128 partitions (or 32 sectors of 512 bytes). The -r option causes the gpt utility to open the device for reading only. Currently this option is primarily useful for the show command, but the intent is to use it to implement dry-run behaviour. The -v option controls the verbosity level. The level increases with every occurrence of this option. There is no formalized definition of the different levels yet. Commands gpt add [-b number] [-i index] [-s count] [-t type] device ... The add command allows the user to add a new partition to an existing table. By default, it will create an HFS partition covering the first available block of an unused disk space. The command-specific options can be used to control this behaviour. The -b number option allows the user to specify the starting (beginning) sector number of the partition. The minimum sector number is 1, but has to fall inside an unused region of disk space that is covered by the GPT. The -i index option allows the user to specify which (free) entry in the GPT table is to be used for the new partition. By default, the first free entry is selected. The -s count option allows the user to specify the size of the partition in sectors. The minimum size is 1. The -t type option allows the user to specify the partition type. The type is given as an UUID, but gpt accepts efi, hfs, apfs, linux and windows as aliases for the most commonly used partition types. gpt create [-fp] device ... The create command allows the user to create a new (empty) GPT. By default, one cannot create a GPT when the device contains a MBR, however this can be overridden with the -f option. If the -f option is specified, an existing MBR is destroyed and any partitions described by the MBR are lost. The -p option tells gpt to create only the primary table and not the backup table. This option is only useful for debugging and should not be used otherwise. gpt destroy [-r] device ... The destroy command allows the user to destroy an existing, possibly not empty GPT. The -r option instructs gpt to destroy the table in a way that it can be recovered. gpt label [-a] ⟨-f file | -l label⟩ device ... gpt label [-b number] [-i index] [-s count] [-t type] ⟨-f file | -l label⟩ device ... The label command allows the user to label any partitions that match the selection. At least one of the following selection options must be specified. The -a option specifies that all partitions should be labeled. It is mutually exclusive with all other selection options. The -b number option selects the partition that starts at the given block number. The -i index option selects the partition with the given partition number. The -s count option selects all partitions that have the given size. This can cause multiple partitions to be removed. The -t type option selects all partitions that have the given type. The type is given as an UUID or by the aliases that the add command accepts. This can cause multiple partitions to be removed. The -f file or -l label options specify the new label to be assigned to the selected partitions. The -f file option is used to read the label from the specified file. Only the first line is read from the file and the trailing newline character is stripped. If the file name is the dash or minus sign (-), the label is read from the standard input. The -l label option is used to specify the label in the command line. The label is assumed to be encoded in UTF-8. gpt recover device ... The recover command allows the user to recover the GPT from the backup table. gpt remove [-a] device ... gpt remove [-b number] [-i index] [-s count] [-t type] device ... The remove command allows the user to remove any and all partitions that match the selection. It uses the same selection options as the label command. See above for a description of these options. Partitions are removed by clearing the partition type. No other information is changed. gpt show [-l] device ... The show command displays the current partitioning on the listed devices and gives an overall view of the disk contents. With the -l option the GPT partition label will be displayed instead of the GPT partition type. The option has no effect on non-GPT partitions. SEE ALSO fdisk(8), mount(8), newfs(8), pdisk(8) HISTORY The gpt utility appeared in FreeBSD 5.0 for ia64. BUGS The development of the gpt utility is still work in progress. Many necessary features are missing or partially implemented. In practice this means that the manual page, supposed to describe these features, is farther removed from being complete or useful. As such, missing functionality is not even documented as missing. However, it is believed that the currently present functionality is reliable and stable enough that this tool can be used without bullet-proof footware if one thinks one does not make mistakes. It is expected that the basic usage model does not change, but it is possible that future versions will not be compatible in the strictest sense of the word. For example, the -p count option may be changed to a command option rather than a generic option. There are only two commands that use it so there is a chance that the natural tendency for people is to use it as a command option. Also, options primarily intended for diagnostic or debug purposes may be removed in future versions. Another possibility is that the current usage model is accompanied by other interfaces to make the tool usable as a back-end. This all depends on demand and thus feedback. macOS 14.5 May 7, 2012 macOS 14.5
|
gpt – GUID partition table maintenance utility
|
gpt [general_options] command [command_options] device ...
| null | null |
scutil
|
Invoked with no options, scutil provides a command line interface to the "dynamic store" data maintained by configd(8). Interaction with this data (using the SystemConfiguration.framework SCDynamicStore APIs) is handled with a set of commands read from standard input. A list of the available commands is available by entering the help directive. The --prefs option provides a command line interface to the [raw] stored preference data. Interaction with this data (using the SystemConfiguration.framework SCPreferences APIs) is handled with a set of commands read from standard input. A list of the available commands is availble by entering the help directive. The -r option provides a means of checking the network reachability of a host, an IP address, or a pair of local and remote IP addresses. Network "reachability" is a term that indicates whether network communication is possible between the current host and the specified host. The -w option provides a means of checking for (and optionally waiting for the creation of or posting of a notification to) a dynamic store key. The --get and --set options provide a means of reporting and updating a select group of persistent system preferences. The --dns option reports the current DNS configuration. The first listed resolver(5) configuration is considered to be the "default" configuration. Additional "supplemental" configurations follow. Those containing a "domain" name will be used for queries matching the specified domain. Those without will be used as a "default" configuration in addition to the first listed. The --proxy option reports the current system proxy configuration. The --nc option provides a set of commands for monitoring and interacting with VPN connections. Use --nc help for a full list of commands.
|
scutil – Manage system configuration parameters
|
scutil scutil --prefs [preference-file] scutil -r [-W] { nodename | address | local-address remote-address } scutil -w dynamic-store-key [-t timeout] scutil --get pref scutil --set pref [newval] scutil --dns scutil --proxy scutil --nc nc-arguments
|
-r [-W] { nodename | address | local-address remote-address } Check the network reachability of the specified host name, IP address, or a pair of local and remote IP addresses. One or more of the following strings will be reported to standard output. Not Reachable The specified nodename/address cannot be reached using the current network configuration. Reachable The specified nodename/address can be reached using the current network configuration. Transient Connection The specified nodename/address can be reached via a transient (e.g. PPP) connection. Connection Required The specified nodename/address can be reached using the current network configuration but a connection must first be established. As an example, this status would be returned for a dialup connection that was not currently active but could handle network traffic for the target system. Connection Automatic The specified nodename/address can be reached using the current network configuration but a connection must first be established. Any traffic directed to the specified name/address will initiate the connection. Local Address The specified nodename/address is one associated with a network interface on the system. Directly Reachable Addresss Network traffic to the specified nodename/address will not go through a gateway but is routed directly to one of the interfaces on the system. The reachability can also be monitored by specifying the -W (watch) option. This will result in the current status being reported as well as the status when/if the network configuration changes. A zero exit status will be returned when the reachability status is reported correctly. A non-zero exit status will be returned if errors are detected with an error reported to standard error. -w dynamic-store-key [-t timeout] Check if the specified key exists in the "dynamic store" data maintained by configd(8). If present, scutil will return with a zero exit status. If not present, scutil will wait for the specified time for data to be associated with or a notification to be posted using the key. A non-zero exit status will be returned if the key was not created/posted within the specified time. scutil will wait indefinitely if a timeout of 0 seconds is specified. The default timeout is 15 seconds. --get pref Retrieves the specified preference. The current value will be reported on standard output. Supported preferences include: ComputerName The user-friendly name for the system. LocalHostName The local (Bonjour) host name. HostName The name associated with hostname(1) and gethostname(3). --set pref [newval] Updates the specified preference with the new value. If the new value is not specified on the command line then it will be read from standard input. Supported preferences include: ComputerName LocalHostName HostName The --set option requires super-user access. --dns Reports the current DNS configuration. --proxy Reports the current proxy configuration. --nc nc-arguments Provides a set of commands for monitoring and interacting with VPN connections. Use --nc help for a full list of commands. SEE ALSO configd(8) HISTORY The scutil command appeared in Mac OS X Public Beta. Mac OS X January 23, 2008 Mac OS X
| null |
ioreg
|
ioreg displays the I/O Kit registry. It shows the hierarchical registry structure as an inverted tree. The provider-client relationships among those objects is shown as follows: +-o provider | +-o client By default, object properties are not shown. The use of the -c, -k, -l, or -n options cause ioreg to show properties for objects that match the specified criteria. By supplying the -r option, the user may specify the object which will appear at the root of the tree with the -c, -k, or -n options. If root matches more than one object, multiple trees will be displayed. The options are as follows: -a Archive the output in XML. -b Show the object name in bold. -c Show the object properties only if the object is an instance of, or derives from, the specified C++ class (e.g. IOService). -d Limit tree traversal to the specified depth. The depth limit is applied with respect to each subtree root individually. Therefore, supplying a depth of 1 will cause ioreg to display only (sub)tree root nodes; children will not be shown. -f Enable smart formatting. ioreg knows how to format certain properties so that the output is more readable and meaningful, decoding data fields where appropriate. Currently supported are `reg', `assigned-addresses', `slot-names', `ranges', `interrupt- map', `interrupt-parent`, and `interrupts'. -i Show the object inheritance. -k Show the object properties only if the object has the specified key. Substrings do not match; the specified key must be a full property name. -l Show properties for all displayed objects. -n Show the object properties only if the object has the specified name. The object location, if any, is considered part of the name, thus pci@f0000000 and pci@f4000000 are distinct names. -p Traverse the registry over the specified plane. The default plane value is ``IOService''. The other planes, such as ``IODeviceTree'', can be found under the ``IORegistryPlanes'' property of the root object (ioreg -d 1 -k IORegistryPlanes). -r Show subtrees rooted by objects that match the specified criteria. If none of -c, -k, or -n are supplied, -r has no effect. -t Show tree location of each subtree. This option causes ioreg to display all nodes between the I/O Kit Root and the root of the displayed subtree, i.e. the subtree's parent, grandparent, etc. -w Clip the output to the specified line width. The default width value is the current screen size. A value of 0 specifies an unlimited line width. -x Show data and numbers as hexadecimal. Do not consider DriverKit classes with -c. Darwin September 26, 2011 Darwin
|
ioreg – show I/O Kit registry
|
ioreg [-abfilrtxy] [-c class] [-d depth] [-k key] [-n name] [-p plane] [-w width]
| null | null |
ab
| null |
ab - Apache HTTP server benchmarking tool
|
ab [ -A auth-username:password ] [ -b windowsize ] [ -B local-address ] [ -c concurrency ] [ -C cookie-name=value ] [ -d ] [ -e csv-file ] [ -E client-certificate file ] [ -f protocol ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [ -i ] [ -k ] [ -l ] [ -m HTTP-method ] [ -n requests ] [ -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -r ] [ -s timeout ] [ -S ] [ -t timelimit ] [ -T content-type ] [ -u PUT-file ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -X proxy[:port] ] [ -y <tr>-attributes ] [ -z <td>-attributes ] [ -Z ciphersuite ] [http[s]://]hostname[:port]/path SUMMARY ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
|
-A auth-username:password Supply BASIC Authentication credentials to the server. The username and password are separated by a single : and sent on the wire base64 encoded. The string is sent regardless of whether the server needs it (i.e., has sent an 401 authentication needed). -b windowsize Size of TCP send/receive buffer, in bytes. -B local-address Address to bind to when making outgoing connections. -c concurrency Number of multiple requests to perform at a time. Default is one request at a time. -C cookie-name=value Add a Cookie: line to the request. The argument is typically in the form of a name=value pair. This field is repeatable. -d Do not display the "percentage served within XX [ms] table". (legacy support). -e csv-file Write a Comma separated value (CSV) file which contains for each percentage (from 1% to 100%) the time (in milliseconds) it took to serve that percentage of the requests. This is usually more useful than the 'gnuplot' file; as the results are already 'binned'. -E client-certificate-file When connecting to an SSL website, use the provided client certificate in PEM format to authenticate with the server. The file is expected to contain the client certificate, followed by intermediate certificates, followed by the private key. Available in 2.4.36 and later. -f protocol Specify SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). TLS1.1 and TLS1.2 support available in 2.4.4 and later. -g gnuplot-file Write all measured values out as a 'gnuplot' or TSV (Tab separate values) file. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor or even Excel. The labels are on the first line of the file. -h Display usage information. -H custom-header Append extra headers to the request. The argument is typically in the form of a valid header line, containing a colon-separated field-value pair (i.e., "Accept-Encoding: zip/zop;8bit"). -i Do HEAD requests instead of GET. -k Enable the HTTP KeepAlive feature, i.e., perform multiple requests within one HTTP session. Default is no KeepAlive. -l Do not report errors if the length of the responses is not constant. This can be useful for dynamic pages. Available in 2.4.7 and later. -m HTTP-method Custom HTTP method for the requests. Available in 2.4.10 and later. -n requests Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to non-representative benchmarking results. -p POST-file File containing data to POST. Remember to also set -T. -P proxy-auth-username:password Supply BASIC Authentication credentials to a proxy en-route. The username and password are separated by a single : and sent on the wire base64 encoded. The string is sent regardless of whether the proxy needs it (i.e., has sent an 407 proxy authentication needed). -q When processing more than 150 requests, ab outputs a progress count on stderr every 10% or 100 requests or so. The -q flag will suppress these messages. -r Don't exit on socket receive errors. -s timeout Maximum number of seconds to wait before the socket times out. Default is 30 seconds. Available in 2.4.4 and later. -S Do not display the median and standard deviation values, nor display the warning/error messages when the average and median are more than one or two times the standard deviation apart. And default to the min/avg/max values. (legacy support). -t timelimit Maximum number of seconds to spend for benchmarking. This implies a -n 50000 internally. Use this to benchmark the server within a fixed total amount of time. Per default there is no timelimit. -T content-type Content-type header to use for POST/PUT data, eg. application/x- www-form-urlencoded. Default is text/plain. -u PUT-file File containing data to PUT. Remember to also set -T. -v verbosity Set verbosity level - 4 and above prints information on headers, 3 and above prints response codes (404, 200, etc.), 2 and above prints warnings and info. -V Display version number and exit. -w Print out results in HTML tables. Default table is two columns wide, with a white background. -x <table>-attributes String to use as attributes for <table>. Attributes are inserted <table here >. -X proxy[:port] Use a proxy server for the requests. -y <tr>-attributes String to use as attributes for <tr>. -z <td>-attributes String to use as attributes for <td>. -Z ciphersuite Specify SSL/TLS cipher suite (See openssl ciphers) OUTPUT The following list describes the values returned by ab: Server Software The value, if any, returned in the server HTTP header of the first successful response. This includes all characters in the header from beginning to the point a character with decimal value of 32 (most notably: a space or CR/LF) is detected. Server Hostname The DNS or IP address given on the command line Server Port The port to which ab is connecting. If no port is given on the command line, this will default to 80 for http and 443 for https. SSL/TLS Protocol The protocol parameters negotiated between the client and server. This will only be printed if SSL is used. Document Path The request URI parsed from the command line string. Document Length This is the size in bytes of the first successfully returned document. If the document length changes during testing, the response is considered an error. Concurrency Level The number of concurrent clients used during the test Time taken for tests This is the time taken from the moment the first socket connection is created to the moment the last response is received Complete requests The number of successful responses received Failed requests The number of requests that were considered a failure. If the number is greater than zero, another line will be printed showing the number of requests that failed due to connecting, reading, incorrect content length, or exceptions. Write errors The number of errors that failed during write (broken pipe). Non-2xx responses The number of responses that were not in the 200 series of response codes. If all responses were 200, this field is not printed. Keep-Alive requests The number of connections that resulted in Keep-Alive requests Total body sent If configured to send data as part of the test, this is the total number of bytes sent during the tests. This field is omitted if the test did not include a body to send. Total transferred The total number of bytes received from the server. This number is essentially the number of bytes sent over the wire. HTML transferred The total number of document bytes received from the server. This number excludes bytes received in HTTP headers Requests per second This is the number of requests per second. This value is the result of dividing the number of requests by the total time taken Time per request The average time spent per request. The first value is calculated with the formula concurrency * timetaken * 1000 / done while the second value is calculated with the formula timetaken * 1000 / done Transfer rate The rate of transfer as calculated by the formula totalread / 1024 / timetaken BUGS There are various statically declared buffers of fixed length. Combined with the lazy parsing of the command line arguments, the response headers from the server and other external inputs, this might bite you. It does not implement HTTP/1.x fully; only accepts some 'expected' forms of responses. The rather heavy use of strstr(3) shows up top in profile, which might indicate a performance problem; i.e., you would measure the ab performance rather than the server's. Apache HTTP Server 2018-10-10 AB(1)
| null |
traceroute6
|
The traceroute6 utility uses the IPv6 protocol hop limit field to elicit an ICMPv6 TIME_EXCEEDED response from each gateway along the path to some host. The only mandatory parameter is the destination host name or IPv6 address. The default probe datagram carries 12 bytes of payload, in addition to the IPv6 header. The size of the payload can be specified by giving a length (in bytes) after the destination host name. Other options are: -a Turn on AS# lookups for each hop encountered. -A as_server Turn on AS# lookups and use the given server instead of the default. -d Debug mode. -e Firewall evasion mode. Use fixed destination ports for UDP and TCP probes. The destination port does NOT increment with each packet sent. -E Detect ECN bleaching. Set the IPTOS_ECN_ECT1 bit and report if that value has been bleached or mangled. -f firsthop Specify how many hops to skip in trace. -g gateway Specify intermediate gateway ( traceroute6 uses routing header). -I Use ICMP6 ECHO instead of UDP datagrams. -l Print both host hostnames and numeric addresses. Normally traceroute6 prints only hostnames if -n is not specified, and only numeric addresses if -n is specified. -m hoplimit Specify maximum hoplimit, up to 255. The default is 30 hops. -n Do not resolve numeric address to hostname. -N Use a packet with no upper layer header for the probes, instead of UDP datagrams. -p port Set UDP port number to port. -q probes Set the number of probe per hop count to probes. -r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-connected network, an error is returned. This option corresponds to the SO_DONTROUTE socket option; it can be used to ping a local host through an interface that has no route through it (e.g., after the interface was dropped by a routing daemon). -s src Src specifies the source IPv6 address to be used. -t tclass tclass specifies the traffic class used when sending probe packets. The value must be a decimal integer in the range 0 to 255. The default is 0. -T Use TCP segments for the probes. -U Use UDP datagrams for the probes. This is the default. -v Be verbose. -w waittime Specify the delay time between probes. This program prints the route to the given destination and the round-trip time to each gateway, in the same manner as traceroute. Here is a list of possible annotations after the round-trip time for each gateway: !N Destination Unreachable - No Route to Host. !P Destination Unreachable - Administratively Prohibited. !S Destination Unreachable - Not a Neighbour. !A Destination Unreachable - Address Unreachable. ! This is printed if the hop limit is <= 1 on a port unreachable message. This means that the packet got to the destination, but that the reply had a hop limit that was just large enough to allow it to get back to the source of the traceroute6. This was more interesting in the IPv4 case, where some IP stack bugs could be identified by this behaviour. RETURN VALUES The traceroute6 utility will exit with 0 on success, and non-zero on errors. SEE ALSO ping(8), ping6(8), traceroute(8) HISTORY The traceroute6 utility first appeared in WIDE hydrangea IPv6 protocol stack kit. macOS 14.5 May 17, 1998 macOS 14.5
|
traceroute6 – print the route IPv6 packets will take to a network node
|
traceroute6 [-adeEIlnNrTUv] [-f firsthop] [-g gateway] [-m hoplimit] [-p port] [-q probes] [-s src] [-t tclass] [-w waittime] target [datalen]
| null | null |
pwd_mkdb
|
The pwd_mkdb utility creates db(3) style secure and insecure databases for the specified file. These databases are then installed into /etc/spwd.db and /etc/pwd.db respectively. The file is installed into /etc/master.passwd. The file must be in the correct format (see passwd(5)). It is important to note that the format used in this system is different from the historic Version 7 style format. The options are as follows: -c Check if the password file is in the correct format. Do not change, add, or remove any files. -d directory Operate in a base directory other than the default of /etc. All absolute paths (including file) will be made relative to directory. Any directories specified as a part of file will be stripped off. This option is used to create password databases in directories other than etc; for instance in a chroot(8) jail. -p Create a Version 7 style password file and install it into /etc/passwd. -s Only update the secure version of the database. This is most commonly used in conjunction with the -u flag during a password change. Because the insecure database doesn't contain the password there is no reason to update it if the only change is in the password field. Cannot be used in conjunction with the -p flag. -u username Only update the record for the specified user. Utilities that operate on a single user can use this option to avoid the overhead of rebuilding the entire database. This option must never be used if the line number of the user's record in /etc/master.passwd has changed. file The absolute path to a file in master.passwd format, as described in passwd(5). The two databases differ in that the secure version contains the user's encrypted password and the insecure version has an asterisk (``*'') The databases are used by the C library password routines (see getpwent(3)). The pwd_mkdb utility exits zero on success, non-zero on failure. FILES /etc/pwd.db The insecure password database file. /etc/pwd.db.tmp A temporary file. /etc/spwd.db The secure password database file. /etc/spwd.db.tmp A temporary file. /etc/master.passwd The current password file. /etc/passwd A Version 7 format password file. COMPATIBILITY Previous versions of the system had a program similar to pwd_mkdb, mkpasswd(8), which built dbm(3) style databases for the password file but depended on the calling programs to install them. The program was renamed in order that previous users of the program not be surprised by the changes in functionality. SEE ALSO chpass(1), passwd(1), db(3), getpwent(3), passwd(5), vipw(8) BUGS Because of the necessity for atomic update of the password files, pwd_mkdb uses rename(2) to install them. This, however, requires that the file specified on the command line live on the same file system as the /etc directory. There are the obvious races with multiple people running pwd_mkdb on different password files at the same time. The front-ends to pwd_mkdb, chpass(1), passwd(1) and vipw(8), handle the locking necessary to avoid this problem. macOS 14.5 June 6, 1993 macOS 14.5
|
pwd_mkdb – generate the password databases
|
pwd_mkdb [-c] [-p | -s] [-d directory] [-u username] file
| null | null |
sysctl
|
The sysctl utility retrieves kernel state and allows processes with appropriate privilege to set kernel state. The state to be retrieved or set is described using a “Management Information Base” (“MIB”) style name, described as a dotted set of components. The following options are available: -A Equivalent to -o -a (for compatibility). -a List all the currently available values except for those which are opaque or excluded from listing via the CTLFLAG_SKIP flag. This option is ignored if one or more variable names are specified on the command line. -b Force the value of the variable(s) to be output in raw, binary format. No names are printed and no terminating newlines are output. This is mostly useful with a single variable. -B bufsize Set the buffer size to read from the sysctl to bufsize. This is necessary for a sysctl that has variable length, and the probe value of 0 is a valid length. -d Print the description of the variable instead of its value. -e Separate the name and the value of the variable(s) with ‘=’. This is useful for producing output which can be fed back to the sysctl utility. This option is ignored if either -N or -n is specified, or a variable is being set. -f filename Specify a file which contains a pair of name and value in each line. sysctl reads and processes the specified file first and then processes the name and value pairs in the command line argument. -F Print the format of the variable. This is additional information to describe the type of the variable and most useful with struct types such as clockinfo, timeval, and loadavg. -h Format output for human, rather than machine, readability. -i Ignore unknown OIDs. The purpose is to make use of sysctl for collecting data from a variety of machines (not all of which are necessarily running exactly the same software) easier. -l Show the length of variables along with their values. This option cannot be combined with the -N option. -N Show only variable names, not their values. This is particularly useful with shells that offer programmable completion. To enable completion of variable names in zsh(1) (ports/shells/zsh), use the following code: listsysctls () { set -A reply $(sysctl -AN ${1%.*}) } compctl -K listsysctls sysctl To enable completion of variable names in tcsh(1), use: complete sysctl 'n/*/`sysctl -Na`/' -n Do not show variable names. This option is useful for setting shell variables. For instance, to save the pagesize in variable psize, use: set psize=`sysctl -n hw.pagesize` -o Show opaque variables (which are normally suppressed). The format and length are printed, as well as a hex dump of the first sixteen bytes of the value. -q Suppress some warnings generated by sysctl to standard error. -t Print the type of the variable. -W Display only writable variables. Useful for determining the set of runtime tunable sysctls. -X Equivalent to -x -a (for compatibility). -x As -o, but prints a hex dump of the entire value instead of just the first few bytes. The information available from sysctl consists of integers, strings, and opaque types. The sysctl utility only knows about a couple of opaque types, and will resort to hexdumps for the rest. The opaque information is much more useful if retrieved by special purpose programs such as ps(1), systat(1), and netstat(1). The string and integer information is summarized below. For a detailed description of these variables see sysctl(3). The changeable column indicates whether a process with appropriate privilege can change the value. String and integer values can be set using sysctl. Name Type Changeable hw.activecpu integer no hw.busfrequency integer no hw.busfrequency_max integer no hw.busfrequency_min integer no hw.byteorder integer no hw.cacheconfig struct no hw.cachelinesize integer no hw.cachesize struct no hw.cpu64bit_capable integer no hw.cpufamily integer no hw.cpufrequency integer no hw.cpufrequency_max integer no hw.cpufrequency_min integer no hw.cpusubtype integer no hw.cputhreadtype integer no hw.cputype integer no hw.l1dcachesize integer no hw.l1icachesize integer no hw.l2cachesize integer no hw.l3cachesize integer no hw.logicalcpu integer no hw.logicalcpu_max integer no hw.memsize integer no hw.ncpu integer no hw.packages integer no hw.pagesize integer no hw.physicalcpu integer no hw.physicalcpu_max integer no hw.tbfrequency integer no kern.argmax integer no kern.bootargs string no kern.boottime struct no kern.clockrate struct no kern.coredump integer yes kern.corefile string yes kern.flush_cache_on_write integer yes kern.hostid integer yes kern.hostname string yes kern.job_control integer no kern.maxfiles integer yes kern.maxfilesperproc integer yes kern.maxnbuf integer yes kern.maxproc integer yes kern.maxprocperuid integer yes kern.maxvnodes integer yes kern.msgbuf integer yes kern.nbuf integer no kern.netboot integer no kern.ngroups integer no kern.nisdomainname string yes kern.num_files integer no kern.num_tasks integer no kern.num_taskthreads integer no kern.num_threads integer no kern.num_vnodes integer no kern.nx integer yes kern.osrelease string no kern.osrevision integer no kern.ostype string no kern.osversion string yes kern.posix1version integer no kern.procname string yes kern.safeboot integer no kern.saved_ids integer no kern.secure_kernel integer no kern.securelevel integer yes kern.singleuser integer no kern.sleeptime struct no kern.slide integer no kern.stack_depth_max integer no kern.stack_size integer no kern.sugid_coredump integer yes kern.sugid_scripts integer yes kern.symfile string no kern.usrstack integer no kern.usrstack64 integer no kern.uuid string no kern.version string no kern.waketime struct no machdep.cpu.address_bits.physical integer no machdep.cpu.address_bits.virtual integer no machdep.cpu.brand integer no machdep.cpu.brand_string string no machdep.cpu.cache.L2_associativity integer no machdep.cpu.cache.linesize integer no machdep.cpu.cache.size integer no machdep.cpu.core_count integer no machdep.cpu.cores_per_package integer no machdep.cpu.extfamily integer no machdep.cpu.extfeature_bits integer no machdep.cpu.extfeatures string no machdep.cpu.extmodel integer no machdep.cpu.family integer no machdep.cpu.feature_bits integer no machdep.cpu.features string no machdep.cpu.leaf7_feature_bits integer no machdep.cpu.leaf7_features string no machdep.cpu.logical_per_package integer no machdep.cpu.max_basic integer no machdep.cpu.max_ext integer no machdep.cpu.microcode_version integer no machdep.cpu.model integer no machdep.cpu.processor_flag integer no machdep.cpu.signature integer no machdep.cpu.stepping integer no machdep.cpu.thread_count integer no machdep.cpu.tlb.data.large integer no machdep.cpu.tlb.data.large_level1 integer no machdep.cpu.tlb.data.small integer no machdep.cpu.tlb.data.small_level1 integer no machdep.cpu.tlb.inst.large integer no machdep.cpu.tlb.inst.small integer no machdep.cpu.tlb.shared integer no machdep.cpu.ucupdate integer yes machdep.cpu.vendor string no machdep.cpu.xsave.extended_state integer no machdep.tsc.deep_idle_rebase integer yes machdep.tsc.frequency integer no machdep.tsc.nanotime.generation integer no machdep.tsc.nanotime.shift integer no net.inet.ip.forwarding integer yes net.inet.ip.portrange.first integer yes net.inet.ip.portrange.hifirst integer yes net.inet.ip.portrange.hilast integer yes net.inet.ip.portrange.last integer yes net.inet.ip.portrange.lowfirst integer yes net.inet.ip.portrange.lowlast integer yes net.inet.ip.redirect integer yes net.inet.ip.ttl integer yes net.inet.udp.checksum integer yes net.inet.udp.maxdgram integer yes vm.loadavg struct no vm.swapusage struct no user.bc_base_max integer no user.bc_dim_max integer no user.bc_scale_max integer no user.bc_string_max integer no user.coll_weights_max integer no user.cs_path string no user.expr_nest_max integer no user.line_max integer no user.posix2_c_bind integer no user.posix2_c_dev integer no user.posix2_char_term integer no user.posix2_fort_dev integer no user.posix2_fort_run integer no user.posix2_localedef integer no user.posix2_sw_dev integer no user.posix2_upe integer no user.posix2_version integer no user.re_dup_max integer no user.stream_max integer no user.tzname_max integer no Note that the hw.ncpu attribute is deprecated, and one of the more specific MIBs, hw.logicalcpu, hw.logicalcpu_max, hw.physicalcpu, or hw.physicalcpu_max, should be used instead. FILES <sys/sysctl.h> definitions for top level identifiers, second level kernel and hardware identifiers, and user level identifiers <sys/socket.h> definitions for second level network identifiers <sys/gmon.h> definitions for third level profiling identifiers <vm/vm_param.h> definitions for second level virtual memory identifiers <netinet/in.h> definitions for third level Internet identifiers and fourth level IP identifiers <netinet/icmp_var.h> definitions for fourth level ICMP identifiers <netinet/udp_var.h> definitions for fourth level UDP identifiers EXIT STATUS The sysctl utility exits 0 on success, and >0 if an error occurs.
|
sysctl – get or set kernel state
|
sysctl [-bdeFhilNnotqWx] [-B bufsize] [-f filename] name[=value[,value]] ... sysctl [-bdeFhlNnotqWx] [-B bufsize] -a
| null |
For example, to retrieve the maximum number of processes allowed in the system, one would use the following request: sysctl kern.maxproc To set the maximum number of processes allowed per uid to 1000, one would use the following request: sysctl kern.maxprocperuid=1000 Information about the system clock rate may be obtained with: sysctl kern.clockrate Information about the load average history may be obtained with: sysctl vm.loadavg More variables than these exist, and the best and likely only place to search for their deeper meaning is undoubtedly the source where they are defined. COMPATIBILITY The -w option has been deprecated and is silently ignored. SEE ALSO sysctl(3), sysctl.conf(5) HISTORY A sysctl utility first appeared in 4.4BSD. In FreeBSD 2.2, sysctl was significantly remodeled. macOS 14.5 December 24, 2022 macOS 14.5
|
appsleepd
|
appsleepd provides app sleep services. There are no configuration options to appsleepd. Users should not run appsleepd manually. Mac OS X February 1, 2013 Mac OS X
|
appsleepd – app sleep daemon
|
appsleepd
| null | null |
sshd
|
sshd (OpenSSH Daemon) is the daemon program for ssh(1). It provides secure encrypted communications between two untrusted hosts over an insecure network. sshd listens for connections from clients. It is normally started at boot from /etc/rc. It forks a new daemon for each incoming connection. The forked daemons handle key exchange, encryption, authentication, command execution, and data exchange. sshd can be configured using command-line options or a configuration file (by default sshd_config(5)); command-line options override values specified in the configuration file. sshd rereads its configuration file when it receives a hangup signal, SIGHUP, by executing itself with the name and options it was started with, e.g. /usr/sbin/sshd. The options are as follows: -4 Forces sshd to use IPv4 addresses only. -6 Forces sshd to use IPv6 addresses only. -C connection_spec Specify the connection parameters to use for the -T extended test mode. If provided, any Match directives in the configuration file that would apply are applied before the configuration is written to standard output. The connection parameters are supplied as keyword=value pairs and may be supplied in any order, either with multiple -C options or as a comma-separated list. The keywords are “addr”, “user”, “host”, “laddr”, “lport”, and “rdomain” and correspond to source address, user, resolved source host name, local address, local port number and routing domain respectively. -c host_certificate_file Specifies a path to a certificate file to identify sshd during key exchange. The certificate file must match a host key file specified using the -h option or the HostKey configuration directive. -D When this option is specified, sshd will not detach and does not become a daemon. This allows easy monitoring of sshd. -d Debug mode. The server sends verbose debug output to standard error, and does not put itself in the background. The server also will not fork(2) and will only process one connection. This option is only intended for debugging for the server. Multiple -d options increase the debugging level. Maximum is 3. -E log_file Append debug logs to log_file instead of the system log. -e Write debug logs to standard error instead of the system log. -f config_file Specifies the name of the configuration file. The default is /etc/ssh/sshd_config. sshd refuses to start if there is no configuration file. -G Parse and print configuration file. Check the validity of the configuration file, output the effective configuration to stdout and then exit. Optionally, Match rules may be applied by specifying the connection parameters using one or more -C options. -g login_grace_time Gives the grace time for clients to authenticate themselves (default 120 seconds). If the client fails to authenticate the user within this many seconds, the server disconnects and exits. A value of zero indicates no limit. -h host_key_file Specifies a file from which a host key is read. This option must be given if sshd is not run as root (as the normal host key files are normally not readable by anyone but root). The default is /etc/ssh/ssh_host_ecdsa_key, /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key. It is possible to have multiple host key files for the different host key algorithms. -i Specifies that sshd is being run from inetd(8). -o option Can be used to give options in the format used in the configuration file. This is useful for specifying options for which there is no separate command-line flag. For full details of the options, and their values, see sshd_config(5). -p port Specifies the port on which the server listens for connections (default 22). Multiple port options are permitted. Ports specified in the configuration file with the Port option are ignored when a command-line port is specified. Ports specified using the ListenAddress option override command-line ports. -q Quiet mode. Nothing is sent to the system log. Normally the beginning, authentication, and termination of each connection is logged. -T Extended test mode. Check the validity of the configuration file, output the effective configuration to stdout and then exit. Optionally, Match rules may be applied by specifying the connection parameters using one or more -C options. This is similar to the -G flag, but it includes the additional testing performed by the -t flag. -t Test mode. Only check the validity of the configuration file and sanity of the keys. This is useful for updating sshd reliably as configuration options may change. -u len This option is used to specify the size of the field in the utmp structure that holds the remote host name. If the resolved host name is longer than len, the dotted decimal value will be used instead. This allows hosts with very long host names that overflow this field to still be uniquely identified. Specifying -u0 indicates that only dotted decimal addresses should be put into the utmp file. -u0 may also be used to prevent sshd from making DNS requests unless the authentication mechanism or configuration requires it. Authentication mechanisms that may require DNS include HostbasedAuthentication and using a from="pattern-list" option in a key file. Configuration options that require DNS include using a USER@HOST pattern in AllowUsers or DenyUsers. -V Display the version number and exit. AUTHENTICATION The OpenSSH SSH daemon supports SSH protocol 2 only. Each host has a host-specific key, used to identify the host. Whenever a client connects, the daemon responds with its public host key. The client compares the host key against its own database to verify that it has not changed. Forward secrecy is provided through a Diffie-Hellman key agreement. This key agreement results in a shared session key. The rest of the session is encrypted using a symmetric cipher. The client selects the encryption algorithm to use from those offered by the server. Additionally, session integrity is provided through a cryptographic message authentication code (MAC). Finally, the server and the client enter an authentication dialog. The client tries to authenticate itself using host-based authentication, public key authentication, challenge-response authentication, or password authentication. Regardless of the authentication type, the account is checked to ensure that it is accessible. An account is not accessible if it is locked, listed in DenyUsers or its group is listed in DenyGroups . The definition of a locked account is system dependent. Some platforms have their own account database (eg AIX) and some modify the passwd field ( ‘*LK*’ on Solaris and UnixWare, ‘*’ on HP-UX, containing ‘Nologin’ on Tru64, a leading ‘*LOCKED*’ on FreeBSD and a leading ‘!’ on most Linuxes). If there is a requirement to disable password authentication for the account while allowing still public-key, then the passwd field should be set to something other than these values (eg ‘NP’ or ‘*NP*’ ). If the client successfully authenticates itself, a dialog for preparing the session is entered. At this time the client may request things like allocating a pseudo-tty, forwarding X11 connections, forwarding TCP connections, or forwarding the authentication agent connection over the secure channel. After this, the client either requests an interactive shell or execution of a non-interactive command, which sshd will execute via the user's shell using its -c option. The sides then enter session mode. In this mode, either side may send data at any time, and such data is forwarded to/from the shell or command on the server side, and the user terminal in the client side. When the user program terminates and all forwarded X11 and other connections have been closed, the server sends command exit status to the client, and both sides exit. LOGIN PROCESS When a user successfully logs in, sshd does the following: 1. If the login is on a tty, and no command has been specified, prints last login time and /etc/motd (unless prevented in the configuration file or by ~/.hushlogin; see the FILES section). 2. If the login is on a tty, records login time. 3. Checks /etc/nologin; if it exists, prints contents and quits (unless root). 4. Changes to run with normal user privileges. 5. Sets up basic environment. 6. Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironment option in sshd_config(5). 7. Changes to user's home directory. 8. If ~/.ssh/rc exists and the sshd_config(5) PermitUserRC option is set, runs it; else if /etc/ssh/sshrc exists, runs it; otherwise runs xauth(1). The “rc” files are given the X11 authentication protocol and cookie in standard input. See SSHRC, below. 9. Runs user's shell or command. All commands are run under the user's login shell as specified in the system password database. SSHRC If the file ~/.ssh/rc exists, sh(1) runs it after reading the environment files but before starting the user's shell or command. It must not produce any output on stdout; stderr must be used instead. If X11 forwarding is in use, it will receive the "proto cookie" pair in its standard input (and DISPLAY in its environment). The script must call xauth(1) because sshd will not run xauth automatically to add X11 cookies. The primary purpose of this file is to run any initialization routines which may be needed before the user's home directory becomes accessible; AFS is a particular example of such an environment. This file will probably contain some initialization code followed by something similar to: if read proto cookie && [ -n "$DISPLAY" ]; then if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then # X11UseLocalhost=yes echo add unix:`echo $DISPLAY | cut -c11-` $proto $cookie else # X11UseLocalhost=no echo add $DISPLAY $proto $cookie fi | xauth -q - fi If this file does not exist, /etc/ssh/sshrc is run, and if that does not exist either, xauth is used to add the cookie. AUTHORIZED_KEYS FILE FORMAT AuthorizedKeysFile specifies the files containing public keys for public key authentication; if this option is not specified, the default is ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. Each line of the file contains one key (empty lines and lines starting with a ‘#’ are ignored as comments). Public keys consist of the following space- separated fields: options, keytype, base64-encoded key, comment. The options field is optional. The supported key types are: sk-ecdsa-sha2-nistp256@openssh.com ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 sk-ssh-ed25519@openssh.com ssh-ed25519 ssh-dss ssh-rsa The comment field is not used for anything (but may be convenient for the user to identify the key). Note that lines in this file can be several hundred bytes long (because of the size of the public key encoding) up to a limit of 8 kilobytes, which permits RSA keys up to 16 kilobits. You don't want to type them in; instead, copy the id_dsa.pub, id_ecdsa.pub, id_ecdsa_sk.pub, id_ed25519.pub, id_ed25519_sk.pub, or the id_rsa.pub file and edit it. sshd enforces a minimum RSA key modulus size of 1024 bits. The options (if present) consist of comma-separated option specifications. No spaces are permitted, except within double quotes. The following option specifications are supported (note that option keywords are case-insensitive): agent-forwarding Enable authentication agent forwarding previously disabled by the restrict option. cert-authority Specifies that the listed key is a certification authority (CA) that is trusted to validate signed certificates for user authentication. Certificates may encode access restrictions similar to these key options. If both certificate restrictions and key options are present, the most restrictive union of the two is applied. command="command" Specifies that the command is executed whenever this key is used for authentication. The command supplied by the user (if any) is ignored. The command is run on a pty if the client requests a pty; otherwise it is run without a tty. If an 8-bit clean channel is required, one must not request a pty or should specify no-pty. A quote may be included in the command by quoting it with a backslash. This option might be useful to restrict certain public keys to perform just a specific operation. An example might be a key that permits remote backups but nothing else. Note that the client may specify TCP and/or X11 forwarding unless they are explicitly prohibited, e.g. using the restrict key option. The command originally supplied by the client is available in the SSH_ORIGINAL_COMMAND environment variable. Note that this option applies to shell, command or subsystem execution. Also note that this command may be superseded by a sshd_config(5) ForceCommand directive. If a command is specified and a forced-command is embedded in a certificate used for authentication, then the certificate will be accepted only if the two commands are identical. environment="NAME=value" Specifies that the string is to be added to the environment when logging in using this key. Environment variables set this way override other default environment values. Multiple options of this type are permitted. Environment processing is disabled by default and is controlled via the PermitUserEnvironment option. expiry-time="timespec" Specifies a time after which the key will not be accepted. The time may be specified as a YYYYMMDD[Z] date or a YYYYMMDDHHMM[SS][Z] time. Dates and times will be interpreted in the system time zone unless suffixed by a Z character, in which case they will be interpreted in the UTC time zone. from="pattern-list" Specifies that in addition to public key authentication, either the canonical name of the remote host or its IP address must be present in the comma-separated list of patterns. See PATTERNS in ssh_config(5) for more information on patterns. In addition to the wildcard matching that may be applied to hostnames or addresses, a from stanza may match IP addresses using CIDR address/masklen notation. The purpose of this option is to optionally increase security: public key authentication by itself does not trust the network or name servers or anything (but the key); however, if somebody somehow steals the key, the key permits an intruder to log in from anywhere in the world. This additional option makes using a stolen key more difficult (name servers and/or routers would have to be compromised in addition to just the key). no-agent-forwarding Forbids authentication agent forwarding when this key is used for authentication. no-port-forwarding Forbids TCP forwarding when this key is used for authentication. Any port forward requests by the client will return an error. This might be used, e.g. in connection with the command option. no-pty Prevents tty allocation (a request to allocate a pty will fail). no-user-rc Disables execution of ~/.ssh/rc. no-X11-forwarding Forbids X11 forwarding when this key is used for authentication. Any X11 forward requests by the client will return an error. permitlisten="[host:]port" Limit remote port forwarding with the ssh(1) -R option such that it may only listen on the specified host (optional) and port. IPv6 addresses can be specified by enclosing the address in square brackets. Multiple permitlisten options may be applied separated by commas. Hostnames may include wildcards as described in the PATTERNS section in ssh_config(5). A port specification of * matches any port. Note that the setting of GatewayPorts may further restrict listen addresses. Note that ssh(1) will send a hostname of “localhost” if a listen host was not specified when the forwarding was requested, and that this name is treated differently to the explicit localhost addresses “127.0.0.1” and “::1”. permitopen="host:port" Limit local port forwarding with the ssh(1) -L option such that it may only connect to the specified host and port. IPv6 addresses can be specified by enclosing the address in square brackets. Multiple permitopen options may be applied separated by commas. No pattern matching or name lookup is performed on the specified hostnames, they must be literal host names and/or addresses. A port specification of * matches any port. port-forwarding Enable port forwarding previously disabled by the restrict option. principals="principals" On a cert-authority line, specifies allowed principals for certificate authentication as a comma-separated list. At least one name from the list must appear in the certificate's list of principals for the certificate to be accepted. This option is ignored for keys that are not marked as trusted certificate signers using the cert-authority option. pty Permits tty allocation previously disabled by the restrict option. no-touch-required Do not require demonstration of user presence for signatures made using this key. This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk. verify-required Require that signatures made using this key attest that they verified the user, e.g. via a PIN. This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk. restrict Enable all restrictions, i.e. disable port, agent and X11 forwarding, as well as disabling PTY allocation and execution of ~/.ssh/rc. If any future restriction capabilities are added to authorized_keys files, they will be included in this set. tunnel="n" Force a tun(4) device on the server. Without this option, the next available device will be used if the client requests a tunnel. user-rc Enables execution of ~/.ssh/rc previously disabled by the restrict option. X11-forwarding Permits X11 forwarding previously disabled by the restrict option. An example authorized_keys file: # Comments are allowed at start of line. Blank lines are allowed. # Plain key, no restrictions ssh-rsa ... # Forced command, disable PTY and all forwarding restrict,command="dump /home" ssh-rsa ... # Restriction of ssh -L forwarding destinations permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-rsa ... # Restriction of ssh -R forwarding listeners permitlisten="localhost:8080",permitlisten="[::1]:22000" ssh-rsa ... # Configuration for tunnel forwarding tunnel="0",command="sh /etc/netstart tun0" ssh-rsa ... # Override of restriction to allow PTY allocation restrict,pty,command="nethack" ssh-rsa ... # Allow FIDO key without requiring touch no-touch-required sk-ecdsa-sha2-nistp256@openssh.com ... # Require user-verification (e.g. PIN or biometric) for FIDO key verify-required sk-ecdsa-sha2-nistp256@openssh.com ... # Trust CA key, allow touch-less FIDO if requested in certificate cert-authority,no-touch-required,principals="user_a" ssh-rsa ... SSH_KNOWN_HOSTS FILE FORMAT The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host public keys for all known hosts. The global file should be prepared by the administrator (optional), and the per-user file is maintained automatically: whenever the user connects to an unknown host, its key is added to the per-user file. Each line in these files contains the following fields: marker (optional), hostnames, keytype, base64-encoded key, comment. The fields are separated by spaces. The marker is optional, but if it is present then it must be one of “@cert-authority”, to indicate that the line contains a certification authority (CA) key, or “@revoked”, to indicate that the key contained on the line is revoked and must not ever be accepted. Only one marker should be used on a key line. Hostnames is a comma-separated list of patterns (‘*’ and ‘?’ act as wildcards); each pattern in turn is matched against the host name. When sshd is authenticating a client, such as when using HostbasedAuthentication, this will be the canonical client host name. When ssh(1) is authenticating a server, this will be the host name given by the user, the value of the ssh(1) HostkeyAlias if it was specified, or the canonical server hostname if the ssh(1) CanonicalizeHostname option was used. A pattern may also be preceded by ‘!’ to indicate negation: if the host name matches a negated pattern, it is not accepted (by that line) even if it matched another pattern on the line. A hostname or address may optionally be enclosed within ‘[’ and ‘]’ brackets then followed by ‘:’ and a non-standard port number. Alternately, hostnames may be stored in a hashed form which hides host names and addresses should the file's contents be disclosed. Hashed hostnames start with a ‘|’ character. Only one hashed hostname may appear on a single line and none of the above negation or wildcard operators may be applied. The keytype and base64-encoded key are taken directly from the host key; they can be obtained, for example, from /etc/ssh/ssh_host_rsa_key.pub. The optional comment field continues to the end of the line, and is not used. Lines starting with ‘#’ and empty lines are ignored as comments. When performing host authentication, authentication is accepted if any matching line has the proper key; either one that matches exactly or, if the server has presented a certificate for authentication, the key of the certification authority that signed the certificate. For a key to be trusted as a certification authority, it must use the “@cert-authority” marker described above. The known hosts file also provides a facility to mark keys as revoked, for example when it is known that the associated private key has been stolen. Revoked keys are specified by including the “@revoked” marker at the beginning of the key line, and are never accepted for authentication or as certification authorities, but instead will produce a warning from ssh(1) when they are encountered. It is permissible (but not recommended) to have several lines or different host keys for the same names. This will inevitably happen when short forms of host names from different domains are put in the file. It is possible that the files contain conflicting information; authentication is accepted if valid information can be found from either file. Note that the lines in these files are typically hundreds of characters long, and you definitely don't want to type in the host keys by hand. Rather, generate them by a script, ssh-keyscan(1) or by taking, for example, /etc/ssh/ssh_host_rsa_key.pub and adding the host names at the front. ssh-keygen(1) also offers some basic automated editing for ~/.ssh/known_hosts including removing hosts matching a host name and converting all host names to their hashed representations. An example ssh_known_hosts file: # Comments allowed at start of line cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....= # A hashed hostname |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa AAAA1234.....= # A revoked key @revoked * ssh-rsa AAAAB5W... # A CA key, accepted for any host in *.mydomain.com or *.mydomain.org @cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W... FILES ~/.hushlogin This file is used to suppress printing the last login time and /etc/motd, if PrintLastLog and PrintMotd, respectively, are enabled. It does not suppress printing of the banner specified by Banner. ~/.rhosts This file is used for host-based authentication (see ssh(1) for more information). On some machines this file may need to be world-readable if the user's home directory is on an NFS partition, because sshd reads it as root. Additionally, this file must be owned by the user, and must not have write permissions for anyone else. The recommended permission for most machines is read/write for the user, and not accessible by others. ~/.shosts This file is used in exactly the same way as .rhosts, but allows host-based authentication without permitting login with rlogin/rsh. ~/.ssh/ This directory is the default location for all user-specific configuration and authentication information. There is no general requirement to keep the entire contents of this directory secret, but the recommended permissions are read/write/execute for the user, and not accessible by others. ~/.ssh/authorized_keys Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used for logging in as this user. The format of this file is described above. The content of the file is not highly sensitive, but the recommended permissions are read/write for the user, and not accessible by others. If this file, the ~/.ssh directory, or the user's home directory are writable by other users, then the file could be modified or replaced by unauthorized users. In this case, sshd will not allow it to be used unless the StrictModes option has been set to “no”. ~/.ssh/environment This file is read into the environment at login (if it exists). It can only contain empty lines, comment lines (that start with ‘#’), and assignment lines of the form name=value. The file should be writable only by the user; it need not be readable by anyone else. Environment processing is disabled by default and is controlled via the PermitUserEnvironment option. ~/.ssh/known_hosts Contains a list of host keys for all hosts the user has logged into that are not already in the systemwide list of known host keys. The format of this file is described above. This file should be writable only by root/the owner and can, but need not be, world-readable. ~/.ssh/rc Contains initialization routines to be run before the user's home directory becomes accessible. This file should be writable only by the user, and need not be readable by anyone else. /etc/hosts.equiv This file is for host-based authentication (see ssh(1)). It should only be writable by root. /etc/moduli Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange" key exchange method. The file format is described in moduli(5). If no usable groups are found in this file then fixed internal groups will be used. /etc/motd See motd(5). /etc/nologin If this file exists, sshd refuses to let anyone except root log in. The contents of the file are displayed to anyone trying to log in, and non-root connections are refused. The file should be world-readable. /etc/shosts.equiv This file is used in exactly the same way as hosts.equiv, but allows host-based authentication without permitting login with rlogin/rsh. /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys. These files should only be owned by root, readable only by root, and not accessible to others. Note that sshd does not start if these files are group/world-accessible. /etc/ssh/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ed25519_key.pub /etc/ssh/ssh_host_rsa_key.pub These files contain the public parts of the host keys. These files should be world-readable but writable only by root. Their contents should match the respective private parts. These files are not really used for anything; they are provided for the convenience of the user so their contents can be copied to known hosts files. These files are created using ssh-keygen(1). /etc/ssh/ssh_known_hosts Systemwide list of known host keys. This file should be prepared by the system administrator to contain the public host keys of all machines in the organization. The format of this file is described above. This file should be writable only by root/the owner and should be world-readable. /etc/ssh/sshd_config Contains configuration data for sshd. The file format and configuration options are described in sshd_config(5). /etc/ssh/sshrc Similar to ~/.ssh/rc, it can be used to specify machine-specific login-time initializations globally. This file should be writable only by root, and should be world-readable. /var/empty chroot(2) directory used by sshd during privilege separation in the pre-authentication phase. The directory should not contain any files and must be owned by root and not group or world- writable. /var/run/sshd.pid Contains the process ID of the sshd listening for connections (if there are several daemons running concurrently for different ports, this contains the process ID of the one started last). The content of this file is not sensitive; it can be world- readable. SEE ALSO scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh-keyscan(1), chroot(2), login.conf(5), moduli(5), sshd_config(5), inetd(8), sftp-server(8) AUTHORS OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support for privilege separation. macOS 14.5 September 19, 2023 macOS 14.5
|
sshd – OpenSSH daemon
|
sshd [-46DdeGiqTtV] [-C connection_spec] [-c host_certificate_file] [-E log_file] [-f config_file] [-g login_grace_time] [-h host_key_file] [-o option] [-p port] [-u len]
| null | null |
mDNSResponderHelper
|
mDNSResponderHelper is an executable invoked by launchd to provide privilege separation to the mDNSResponder daemon. mDNSResponderHelper has no user-specifiable command-line arguments, and users should not run mDNSResponderHelper manually. FILES /usr/sbin/mDNSResponderHelper SEE ALSO mDNSResponder(8) BUGS mDNSResponderHelper bugs are tracked in Apple Radar component "mDNSResponder". HISTORY The mDNSResponderHelper first appeared in Mac OS X 10.5 (Leopard). Darwin August 2007 Darwin
|
mDNSResponderHelper – mDNS privilege separation helper
|
mDNSResponderHelper
| null | null |
appleh13camerad
| null | null | null | null | null |
postmulti
|
The postmulti(1) command allows a Postfix administrator to manage multiple Postfix instances on a single host. postmulti(1) implements two fundamental modes of operation. In iterator mode, it executes the same command for multiple Postfix instances. In life-cycle management mode, it adds or deletes one instance, or changes the multi-instance status of one instance. Each mode of operation has its own command syntax. For this reason, each mode is documented in separate sections below. BACKGROUND A multi-instance configuration consists of one primary Postfix instance, and one or more secondary instances whose configuration directory pathnames are recorded in the primary instance's main.cf file. Postfix instances share program files and documentation, but have their own configuration, queue and data directories. Currently, only the default Postfix instance can be used as primary instance in a multi-instance configuration. The postmulti(1) command does not currently support a -c option to select an alternative primary instance, and exits with a fatal error if the MAIL_CONFIG environment variable is set to a non-default configuration directory. See the MULTI_INSTANCE_README tutorial for a more detailed discussion of multi-instance management with postmulti(1). ITERATOR MODE In iterator mode, postmulti performs the same operation on all Postfix instances in turn. If multi-instance support is not enabled, the requested command is performed just for the primary instance. Iterator mode implements the following command options: Instance selection -a Perform the operation on all instances. This is the default. -g group Perform the operation only for members of the named group. -i name Perform the operation only for the instance with the specified name. You can specify either the instance name or the absolute pathname of the instance's configuration directory. Specify "-" to select the primary Postfix instance. -R Reverse the iteration order. This may be appropriate when updating a multi-instance system, where "sink" instances are started before "source" instances. This option cannot be used with -p. List mode -l List Postfix instances with their instance name, instance group name, enable/disable status and configuration directory. Postfix-wrapper mode -p postfix-command Invoke postfix(1) to execute postfix-command. This option implements the postfix-wrapper(5) interface. • With "start"-like commands, "postfix check" is executed for instances that are not enabled. The full list of commands is specified with the postmulti_start_commands parameter. • With "stop"-like commands, the iteration order is reversed, and disabled instances are skipped. The full list of commands is specified with the postmulti_stop_commands parameter. • With "reload" and other commands that require a started instance, disabled instances are skipped. The full list of commands is specified with the postmulti_control_commands parameter. • With "status" and other commands that don't require a started instance, the command is executed for all instances. The -p option can also be used interactively to start/stop/etc. a named instance or instance group. For example, to start just the instances in the group "msa", invoke postmulti(1) as follows: # postmulti -g msa -p start Command mode -x unix-command Execute the specified unix-command for all Postfix instances. The command runs with appropriate environment settings for MAIL_CONFIG, command_directory, daemon_directory, config_directory, queue_directory, data_directory, multi_instance_name, multi_instance_group and multi_instance_enable. Other options -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. LIFE-CYCLE MANAGEMENT MODE With the -e option postmulti(1) can be used to add or delete a Postfix instance, and to manage the multi-instance status of an existing instance. The following options are implemented: Existing instance selection -a When creating or importing an instance, place the new instance at the front of the secondary instance list. -g group When creating or importing an instance, place the new instance before the first secondary instance that is a member of the specified group. -i name When creating or importing an instance, place the new instance before the matching secondary instance. With other life-cycle operations, apply the operation to the named existing instance. Specify "-" to select the primary Postfix instance. New or existing instance name assignment -I name Assign the specified instance name to an existing instance, newly-created instance, or imported instance. Instance names other than "-" (which makes the instance "nameless") must start with "postfix-". This restriction reduces the likelihood of name collisions with system files. -G group Assign the specified group name to an existing instance or to a newly created or imported instance. Instance creation/deletion/status change -e action "Edit" managed instances. The following actions are supported: init This command is required before postmulti(1) can be used to manage Postfix instances. The "postmulti -e init" command updates the primary instance's main.cf file by setting: multi_instance_wrapper = ${command_directory}/postmulti -p -- multi_instance_enable = yes You can set these by other means if you prefer. create Create a new Postfix instance and add it to the multi_instance_directories parameter of the primary instance. The "-I name" option is recommended to give the instance a short name that is used to construct default values for the private directories of the new instance. The "-G group" option may be specified to assign the instance to a group, otherwise, the new instance is not a member of any groups. The new instance main.cf is the stock main.cf with the parameters that specify the locations of shared files cloned from the primary instance. For "nameless" instances, you should manually adjust "syslog_name" to yield a unique "logtag" starting with "postfix-" that will uniquely identify the instance in the mail logs. It is simpler to assign the instance a short name with the "-I name" option. Optional "name=value" arguments specify the instance config_directory, queue_directory and data_directory. For example: # postmulti -I postfix-mumble \ -G mygroup -e create \ config_directory=/my/config/dir \ queue_directory=/my/queue/dir \ data_directory=/my/data/dir If any of these pathnames is not supplied, the program attempts to generate the pathname by taking the corresponding primary instance pathname, and by replacing the last pathname component by the value of the -I option. If the instance configuration directory already exists, and contains both a main.cf and master.cf file, create will "import" the instance as-is. For existing instances, create and import are identical. import Import an existing instance into the list of instances managed by the postmulti(1) multi-instance manager. This adds the instance to the multi_instance_directories list of the primary instance. If the "-I name" option is provided it specifies the new name for the instance and is used to define a default location for the instance configuration directory (as with create above). The "-G group" option may be used to assign the instance to a group. Add a "config_directory=/path" argument to override a default pathname based on "-I name". destroy Destroy a secondary Postfix instance. To be a candidate for destruction an instance must be disabled, stopped and its queue must not contain any messages. Attempts to destroy the primary Postfix instance trigger a fatal error, without destroying the instance. The instance is removed from the primary instance main.cf file's alternate_config_directories parameter and its data, queue and configuration directories are cleaned of files and directories created by the Postfix system. The main.cf and master.cf files are removed from the configuration directory even if they have been modified since initial creation. Finally, the instance is "deported" from the list of managed instances. If other files are present in instance private directories, the directories may not be fully removed, a warning is logged to alert the administrator. It is expected that an instance built using "fresh" directories via the create action will be fully removed by the destroy action (if first disabled). If the instance configuration and queue directories are populated with additional files (access and rewriting tables, chroot jail content, etc.) the instance directories will not be fully removed. The destroy action triggers potentially dangerous file removal operations. Make sure the instance's data, queue and configuration directories are set correctly and do not contain any valuable files. deport Deport a secondary instance from the list of managed instances. This deletes the instance configuration directory from the primary instance's multi_instance_directories list, but does not remove any files or directories. assign Assign a new instance name or a new group name to the selected instance. Use "-G -" to specify "no group" and "-I -" to specify "no name". If you choose to make an instance "nameless", set a suitable syslog_name in the corresponding main.cf file. enable Mark the selected instance as enabled. This just sets the multi_instance_enable parameter to "yes" in the instance's main.cf file. disable Mark the selected instance as disabled. This means that the instance will not be started etc. with "postfix start", "postmulti -p start" and so on. The instance can still be started etc. with "postfix -c config-directory start". Other options -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. ENVIRONMENT The postmulti(1) command exports the following environment variables before executing the requested command for a given instance: MAIL_VERBOSE This is set when the -v command-line option is present. MAIL_CONFIG The location of the configuration directory of the instance. CONFIGURATION PARAMETERS config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf configuration files. daemon_directory (see 'postconf -d' output) The directory with Postfix support programs and daemon programs. import_environment (see 'postconf -d' output) The list of environment parameters that a Postfix process will import from a non-Postfix parent process. multi_instance_directories (empty) An optional list of non-default Postfix configuration directories; these directories belong to additional Postfix instances that share the Postfix executable files and documentation with the default Postfix instance, and that are started, stopped, etc., together with the default Postfix instance. multi_instance_group (empty) The optional instance group name of this Postfix instance. multi_instance_name (empty) The optional instance name of this Postfix instance. multi_instance_enable (no) Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager. postmulti_start_commands (start) The postfix(1) commands that the postmulti(1) instance manager treats as "start" commands. postmulti_stop_commands (see 'postconf -d' output) The postfix(1) commands that the postmulti(1) instance manager treats as "stop" commands. postmulti_control_commands (reload flush) The postfix(1) commands that the postmulti(1) instance manager treats as "control" commands, that operate on running instances. syslog_facility (mail) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". Available in Postfix 3.0 and later: meta_directory (see 'postconf -d' output) The location of non-executable files that are shared among multiple Postfix instances, such as postfix-files, dynamicmaps.cf, and the multi-instance template files main.cf.proto and master.cf.proto. shlib_directory (see 'postconf -d' output) The location of Postfix dynamically-linked libraries (libpostfix-*.so), and the default location of Postfix database plugins (postfix-*.so) that have a relative pathname in the dynamicmaps.cf file. FILES $meta_directory/main.cf.proto, stock configuration file $meta_directory/master.cf.proto, stock configuration file $daemon_directory/postmulti-script, life-cycle helper program SEE ALSO postfix(1), Postfix control program postfix-wrapper(5), Postfix multi-instance API README FILES Use "postconf readme_directory" or "postconf html_directory" to locate this information. MULTI_INSTANCE_README, Postfix multi-instance management HISTORY The postmulti(1) command was introduced with Postfix version 2.6. LICENSE The Secure Mailer license must be distributed with this software. AUTHOR(S) Victor Duchovni Morgan Stanley Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA POSTMULTI(1)
|
postmulti - Postfix multi-instance manager
|
Enabling multi-instance management: postmulti -e init [-v] Iterator mode: postmulti -l [-aRv] [-g group] [-i name] postmulti -p [-av] [-g group] [-i name] postfix-command... postmulti -x [-aRv] [-g group] [-i name] unix-command... Life-cycle management: postmulti -e create [-av] [-g group] [-i name] [-G group] [-I name] [param=value ...] postmulti -e import [-av] [-g group] [-i name] [-G group] [-I name] [config_directory=/path] postmulti -e destroy [-v] -i name postmulti -e deport [-v] -i name postmulti -e enable [-v] -i name postmulti -e disable [-v] -i name postmulti -e assign [-v] -i name [-I name] [-G group]
| null | null |
lsof
|
Lsof revision 4.91 lists on its standard output file information about files opened by processes for the following UNIX dialects: Apple Darwin 9 and Mac OS X 10.[567] FreeBSD 8.[234], 9.0 and 1[012].0 for AMD64-based systems Linux 2.1.72 and above for x86-based systems Solaris 9, 10 and 11 (See the DISTRIBUTION section of this manual page for information on how to obtain the latest lsof revision.) An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) A specific file or all the files in a file system may be selected by path. Instead of a formatted display, lsof will produce output that can be parsed by other programs. See the -F, option description, and the OUTPUT FOR OTHER PROGRAMS section for more information. In addition to producing a single output list, lsof will run in repeat mode. In repeat mode it will produce output, delay, then repeat the output operation until stopped with an interrupt or quit signal. See the +|-r [t[m<fmt>]] option description for more information.
|
lsof - list open files Reported Description (Common Symbol) KEEPALIVE keep alive time (SO_KEEPALIVE) LINGER linger time (SO_LINGER) MSS maximum segment size (TCP_MAXSEG) PQLEN partial listen queue connections QLEN established listen queue connections QLIM established listen queue limit RCVBUF receive buffer length (SO_RCVBUF) SNDBUF send buffer length (SO_SNDBUF) Details on what socket options and values, socket states, and TCP flags and values may be displayed for particular UNIX dialects may be found in the answer to the ``Why doesn't lsof report socket options, socket states, and TCP flags and values for my dialect?'' and ``Why doesn't lsof report the partial listen queue connection count for my dialect?'' questions in the lsof FAQ (The FAQ section gives its location.) -t specifies that lsof should produce terse output with process identifiers only and no header - e.g., so that the output may be piped to kill(1). -t selects the -w option. -u s selects the listing of files for the user whose login names or user ID numbers are in the comma-separated set s - e.g., ``abe'', or ``548,root''. (There should be no spaces in the set.) Multiple login names or user ID numbers are joined in a single ORed set before participating in AND option selection. If a login name or user ID is preceded by a `^', it becomes a negation - i.e., files of processes owned by the login name or user ID will never be listed. A negated login name or user ID selection is neither ANDed nor ORed with other selections; it is applied before all other selections and absolutely excludes the listing of the files of the process. For example, to direct lsof to exclude the listing of files belonging to root processes, specify ``-u^root'' or ``-u^0''. -U selects the listing of UNIX domain socket files. -v selects the listing of lsof version information, including: revision number; when the lsof binary was constructed; who constructed the binary and where; the name of the compiler used to construct the lsof binary; the version number of the compiler when readily available; the compiler and loader flags used to construct the lsof binary; and system information, typically the output of uname's -a option. -V directs lsof to indicate the items it was asked to list and failed to find - command names, file names, Internet addresses or files, login names, NFS files, PIDs, PGIDs, and UIDs. When other options are ANDed to search options, or compile-time options restrict the listing of some files, lsof may not report that it failed to find a search item when an ANDed option or compile-time option prevents the listing of the open file containing the located search item. For example, ``lsof -V -iTCP@foobar -a -d 999'' may not report a failure to locate open files at ``TCP@foobar'' and may not list any, if none have a file descriptor number of 999. A similar situation arises when HASSECURITY and HASNOSOCKSECURITY are defined at compile time and they prevent the listing of open files. +|-w Enables (+) or disables (-) the suppression of warning messages. The lsof builder may choose to have warning messages disabled or enabled by default. The default warning message state is indicated in the output of the -h or -? option. Disabling warning messages when they are already disabled or enabling them when already enabled is acceptable. The -t option selects the -w option. -x [fl] may accompany the +d and +D options to direct their processing to cross over symbolic links and|or file system mount points encountered when scanning the directory (+d) or directory tree (+D). If -x is specified by itself without a following parameter, cross-over processing of both symbolic links and file system mount points is enabled. Note that when -x is specified without a parameter, the next argument must begin with '-' or '+'. The optional 'f' parameter enables file system mount point cross-over processing; 'l', symbolic link cross-over processing. The -x option may not be supplied without also supplying a +d or +D option. -X This is a dialect-specific option. AIX: This IBM AIX RISC/System 6000 option requests the reporting of executed text file and shared library references. WARNING: because this option uses the kernel readx() function, its use on a busy AIX system might cause an application process to hang so completely that it can neither be killed nor stopped. I have never seen this happen or had a report of its happening, but I think there is a remote possibility it could happen. By default use of readx() is disabled. On AIX 5L and above lsof may need setuid-root permission to perform the actions this option requests. The lsof builder may specify that the -X option be restricted to processes whose real UID is root. If that has been done, the -X option will not appear in the -h or -? help output unless the real UID of the lsof process is root. The default lsof distribution allows any UID to specify -X, so by default it will appear in the help output. When AIX readx() use is disabled, lsof may not be able to report information for all text and loader file references, but it may also avoid exacerbating an AIX kernel directory search kernel error, known as the Stale Segment ID bug. The readx() function, used by lsof or any other program to access some sections of kernel virtual memory, can trigger the Stale Segment ID bug. It can cause the kernel's dir_search() function to believe erroneously that part of an in-memory copy of a file system directory has been zeroed. Another application process, distinct from lsof, asking the kernel to search the directory - e.g., by using open(2) - can cause dir_search() to loop forever, thus hanging the application process. Consult the lsof FAQ (The FAQ section gives its location.) and the 00README file of the lsof distribution for a more complete description of the Stale Segment ID bug, its APAR, and methods for defining readx() use when compiling lsof. Darwin: This Darwin option requests that lsof reports exclusively information about files from the process file descriptor table and process file ports. Linux: This Linux option requests that lsof skip the reporting of information on all open TCP, UDP and UDPLITE IPv4 and IPv6 files. This Linux option is most useful when the system has an extremely large number of open TCP, UDP and UDPLITE files, the processing of whose information in the /proc/net/tcp* and /proc/net/udp* files would take lsof a long time, and whose reporting is not of interest. Use this option with care and only when you are sure that the information you want lsof to display isn't associated with open TCP, UDP or UDPLITE socket files. Solaris 10 and above: This Solaris 10 and above option requests the reporting of cached paths for files that have been deleted - i.e., removed with rm(1) or unlink(2). The cached path is followed by the string `` (deleted)'' to indicate that the path by which the file was opened has been deleted. Because intervening changes made to the path - i.e., renames with mv(1) or rename(2) - are not recorded in the cached path, what lsof reports is only the path by which the file was opened, not its possibly different final path. -z [z] specifies how Solaris 10 and higher zone information is to be handled. Without a following argument - e.g., NO z - the option specifies that zone names are to be listed in the ZONE output column. The -z option may be followed by a zone name, z. That causes lsof to list only open files for processes in that zone. Multiple -z z option and argument pairs may be specified to form a list of named zones. Any open file of any process in any of the zones will be listed, subject to other conditions specified by other options and arguments. -Z [Z] specifies how SELinux security contexts are to be handled. It and 'Z' field output character support are inhibited when SELinux is disabled in the running Linux kernel. See OUTPUT FOR OTHER PROGRAMS for more information on the 'Z' field output character. Without a following argument - e.g., NO Z - the option specifies that security contexts are to be listed in the SECURITY-CONTEXT output column. The -Z option may be followed by a wildcard security context name, Z. That causes lsof to list only open files for processes in that security context. Multiple -Z Z option and argument pairs may be specified to form a list of security contexts. Any open file of any process in any of the security contexts will be listed, subject to other conditions specified by other options and arguments. Note that Z can be A:B:C or *:B:C or A:B:* or *:*:C to match against the A:B:C context. -- The double minus sign option is a marker that signals the end of the keyed options. It may be used, for example, when the first file name begins with a minus sign. It may also be used when the absence of a value for the last keyed option must be signified by the presence of a minus sign in the following option and before the start of the file names. names These are path names of specific files to list. Symbolic links are resolved before use. The first name may be separated from the preceding options with the ``--'' option. If a name is the mounted-on directory of a file system or the device of the file system, lsof will list all the files open on the file system. To be considered a file system, the name must match a mounted-on directory name in mount(8) output, or match the name of a block device associated with a mounted-on directory name. The +|-f option may be used to force lsof to consider a name a file system identifier (+f) or a simple file (-f). If name is a path to a directory that is not the mounted-on directory name of a file system, it is treated just as a regular file is treated - i.e., its listing is restricted to processes that have it open as a file or as a process-specific directory, such as the root or current working directory. To request that lsof look for open files inside a directory name, use the +d s and +D D options. If a name is the base name of a family of multiplexed files - e.g, AIX's /dev/pt[cs] - lsof will list all the associated multiplexed files on the device that are open - e.g., /dev/pt[cs]/1, /dev/pt[cs]/2, etc. If a name is a UNIX domain socket name, lsof will usually search for it by the characters of the name alone - exactly as it is specified and is recorded in the kernel socket structure. (See the next paragraph for an exception to that rule for Linux.) Specifying a relative path - e.g., ./file - in place of the file's absolute path - e.g., /tmp/file - won't work because lsof must match the characters you specify with what it finds in the kernel UNIX domain socket structures. If a name is a Linux UNIX domain socket name, in one case lsof is able to search for it by its device and inode number, allowing name to be a relative path. The case requires that the absolute path -- i.e., one beginning with a slash ('/') be used by the process that created the socket, and hence be stored in the /proc/net/unix file; and it requires that lsof be able to obtain the device and node numbers of both the absolute path in /proc/net/unix and name via successful stat(2) system calls. When those conditions are met, lsof will be able to search for the UNIX domain socket when some path to it is is specified in name. Thus, for example, if the path is /dev/log, and an lsof search is initiated when the working directory is /dev, then name could be ./log. If a name is none of the above, lsof will list any open files whose device and inode match that of the specified path name. If you have also specified the -b option, the only names you may safely specify are file systems for which your mount table supplies alternate device numbers. See the AVOIDING KERNEL BLOCKS and ALTERNATE DEVICE NUMBERS sections for more information. Multiple file names are joined in a single ORed set before participating in AND option selection. AFS Lsof supports the recognition of AFS files for these dialects (and AFS versions): AIX 4.1.4 (AFS 3.4a) HP-UX 9.0.5 (AFS 3.4a) Linux 1.2.13 (AFS 3.3) Solaris 2.[56] (AFS 3.4a) It may recognize AFS files on other versions of these dialects, but has not been tested there. Depending on how AFS is implemented, lsof may recognize AFS files in other dialects, or may have difficulties recognizing AFS files in the supported dialects. Lsof may have trouble identifying all aspects of AFS files in supported dialects when AFS kernel support is implemented via dynamic modules whose addresses do not appear in the kernel's variable name list. In that case, lsof may have to guess at the identity of AFS files, and might not be able to obtain volume information from the kernel that is needed for calculating AFS volume node numbers. When lsof can't compute volume node numbers, it reports blank in the NODE column. The -A A option is available in some dialect implementations of lsof for specifying the name list file where dynamic module kernel addresses may be found. When this option is available, it will be listed in the lsof help output, presented in response to the -h or -? See the lsof FAQ (The FAQ section gives its location.) for more information about dynamic modules, their symbols, and how they affect lsof options. Because AFS path lookups don't seem to participate in the kernel's name cache operations, lsof can't identify path name components for AFS files. SECURITY Lsof has three features that may cause security concerns. First, its default compilation mode allows anyone to list all open files with it. Second, by default it creates a user-readable and user-writable device cache file in the home directory of the real user ID that executes lsof. (The list-all-open-files and device cache features may be disabled when lsof is compiled.) Third, its -k and -m options name alternate kernel name list or memory files. Restricting the listing of all open files is controlled by the compile-time HASSECURITY and HASNOSOCKSECURITY options. When HASSECURITY is defined, lsof will allow only the root user to list all open files. The non-root user may list only open files of processes with the same user IDentification number as the real user ID number of the lsof process (the one that its user logged on with). However, if HASSECURITY and HASNOSOCKSECURITY are both defined, anyone may list open socket files, provided they are selected with the -i option. When HASSECURITY is not defined, anyone may list all open files. Help output, presented in response to the -h or -? option, gives the status of the HASSECURITY and HASNOSOCKSECURITY definitions. See the Security section of the 00README file of the lsof distribution for information on building lsof with the HASSECURITY and HASNOSOCKSECURITY options enabled. Creation and use of a user-readable and user-writable device cache file is controlled by the compile-time HASDCACHE option. See the DEVICE CACHE FILE section and the sections that follow it for details on how its path is formed. For security considerations it is important to note that in the default lsof distribution, if the real user ID under which lsof is executed is root, the device cache file will be written in root's home directory - e.g., / or /root. When HASDCACHE is not defined, lsof does not write or attempt to read a device cache file. When HASDCACHE is defined, the lsof help output, presented in response to the -h, -D?, or -? options, will provide device cache file handling information. When HASDCACHE is not defined, the -h or -? output will have no -D option description. Before you decide to disable the device cache file feature - enabling it improves the performance of lsof by reducing the startup overhead of examining all the nodes in /dev (or /devices) - read the discussion of it in the 00DCACHE file of the lsof distribution and the lsof FAQ (The FAQ section gives its location.) WHEN IN DOUBT, YOU CAN TEMPORARILY DISABLE THE USE OF THE DEVICE CACHE FILE WITH THE -Di OPTION. When lsof user declares alternate kernel name list or memory files with the -k and -m options, lsof checks the user's authority to read them with access(2). This is intended to prevent whatever special power lsof's modes might confer on it from letting it read files not normally accessible via the authority of the real user ID. OUTPUT This section describes the information lsof lists for each open file. See the OUTPUT FOR OTHER PROGRAMS section for additional information on output that can be processed by another program. Lsof only outputs printable (declared so by isprint(3)) 8 bit characters. Non-printable characters are printed in one of three forms: the C ``\[bfrnt]'' form; the control character `^' form (e.g., ``^@''); or hexadecimal leading ``\x'' form (e.g., ``\xab''). Space is non-printable in the COMMAND column (``\x20'') and printable elsewhere. For some dialects - if HASSETLOCALE is defined in the dialect's machine.h header file - lsof will print the extended 8 bit characters of a language locale. The lsof process must be supplied a language locale environment variable (e.g., LANG) whose value represents a known language locale in which the extended characters are considered printable by isprint(3). Otherwise lsof considers the extended characters non-printable and prints them according to its rules for non-printable characters, stated above. Consult your dialect's setlocale(3) man page for the names of other environment variables that may be used in place of LANG - e.g., LC_ALL, LC_CTYPE, etc. Lsof's language locale support for a dialect also covers wide characters - e.g., UTF-8 - when HASSETLOCALE and HASWIDECHAR are defined in the dialect's machine.h header file, and when a suitable language locale has been defined in the appropriate environment variable for the lsof process. Wide characters are printable under those conditions if iswprint(3) reports them to be. If HASSETLOCALE, HASWIDECHAR and a suitable language locale aren't defined, or if iswprint(3) reports wide characters that aren't printable, lsof considers the wide characters non-printable and prints each of their 8 bits according to its rules for non-printable characters, stated above. Consult the answers to the "Language locale support" questions in the lsof FAQ (The FAQ section gives its location.) for more information. Lsof dynamically sizes the output columns each time it runs, guaranteeing that each column is a minimum size. It also guarantees that each column is separated from its predecessor by at least one space. COMMAND contains the first nine characters of the name of the UNIX command associated with the process. If a non-zero w value is specified to the +c w option, the column contains the first w characters of the name of the UNIX command associated with the process up to the limit of characters supplied to lsof by the UNIX dialect. (See the description of the +c w command or the lsof FAQ for more information. The FAQ section gives its location.) If w is less than the length of the column title, ``COMMAND'', it will be raised to that length. If a zero w value is specified to the +c w option, the column contains all the characters of the name of the UNIX command associated with the process. All command name characters maintained by the kernel in its structures are displayed in field output when the command name descriptor (`c') is specified. See the OUTPUT FOR OTHER COMMANDS section for information on selecting field output and the associated command name descriptor. PID is the Process IDentification number of the process. TID is the task (thread) IDentification number, if task (thread) reporting is supported by the dialect and a task (thread) is being listed. (If help output - i.e., the output of the -h or -? options - shows this option, then task (thread) reporting is supported by the dialect.) A blank TID column in Linux indicates a process - i.e., a non-task. TASKCMD is the task command name. Generally this will be the same as the process named in the COMMAND column, but some task implementations (e.g., Linux) permit a task to change its command name. The TASKCMD column width is subject to the same size limitation as the COMMAND column. ZONE is the Solaris 10 and higher zone name. This column must be selected with the -z option. SECURITY-CONTEXT is the SELinux security context. This column must be selected with the -Z option. Note that the -Z option is inhibited when SELinux is disabled in the running Linux kernel. PPID is the Parent Process IDentification number of the process. It is only displayed when the -R option has been specified. PGID is the process group IDentification number associated with the process. It is only displayed when the -g option has been specified. USER is the user ID number or login name of the user to whom the process belongs, usually the same as reported by ps(1). However, on Linux USER is the user ID number or login that owns the directory in /proc where lsof finds information about the process. Usually that is the same value reported by ps(1), but may differ when the process has changed its effective user ID. (See the -l option description for information on when a user ID number or login name is displayed.) FD is the File Descriptor number of the file or: cwd current working directory; Lnn library references (AIX); err FD information error (see NAME column); jld jail directory (FreeBSD); ltx shared library text (code and data); Mxx hex memory-mapped type number xx. m86 DOS Merge mapped file; mem memory-mapped file; mmap memory-mapped device; pd parent directory; rtd root directory; tr kernel trace file (OpenBSD); txt program text (code and data); v86 VP/ix mapped file; FD is followed by one of these characters, describing the mode under which the file is open: r for read access; w for write access; u for read and write access; space if mode unknown and no lock character follows; `-' if mode unknown and lock character follows. The mode character is followed by one of these lock characters, describing the type of lock applied to the file: N for a Solaris NFS lock of unknown type; r for read lock on part of the file; R for a read lock on the entire file; w for a write lock on part of the file; W for a write lock on the entire file; u for a read and write lock of any length; U for a lock of unknown type; x for an SCO OpenServer Xenix lock on part of the file; X for an SCO OpenServer Xenix lock on the entire file; space if there is no lock. See the LOCKS section for more information on the lock information character. The FD column contents constitutes a single field for parsing in post-processing scripts. TYPE is the type of the node associated with the file - e.g., GDIR, GREG, VDIR, VREG, etc. or ``IPv4'' for an IPv4 socket; or ``IPv6'' for an open IPv6 network file - even if its address is IPv4, mapped in an IPv6 address; or ``ax25'' for a Linux AX.25 socket; or ``inet'' for an Internet domain socket; or ``lla'' for a HP-UX link level access file; or ``rte'' for an AF_ROUTE socket; or ``sock'' for a socket of unknown domain; or ``unix'' for a UNIX domain socket; or ``x.25'' for an HP-UX x.25 socket; or ``BLK'' for a block special file; or ``CHR'' for a character special file; or ``DEL'' for a Linux map file that has been deleted; or ``DIR'' for a directory; or ``DOOR'' for a VDOOR file; or ``FIFO'' for a FIFO special file; or ``KQUEUE'' for a BSD style kernel event queue file; or ``LINK'' for a symbolic link file; or ``MPB'' for a multiplexed block file; or ``MPC'' for a multiplexed character file; or ``NOFD'' for a Linux /proc/<PID>/fd directory that can't be opened -- the directory path appears in the NAME column, followed by an error message; or ``PAS'' for a /proc/as file; or ``PAXV'' for a /proc/auxv file; or ``PCRE'' for a /proc/cred file; or ``PCTL'' for a /proc control file; or ``PCUR'' for the current /proc process; or ``PCWD'' for a /proc current working directory; or ``PDIR'' for a /proc directory; or ``PETY'' for a /proc executable type (etype); or ``PFD'' for a /proc file descriptor; or ``PFDR'' for a /proc file descriptor directory; or ``PFIL'' for an executable /proc file; or ``PFPR'' for a /proc FP register set; or ``PGD'' for a /proc/pagedata file; or ``PGID'' for a /proc group notifier file; or ``PIPE'' for pipes; or ``PLC'' for a /proc/lwpctl file; or ``PLDR'' for a /proc/lpw directory; or ``PLDT'' for a /proc/ldt file; or ``PLPI'' for a /proc/lpsinfo file; or ``PLST'' for a /proc/lstatus file; or ``PLU'' for a /proc/lusage file; or ``PLWG'' for a /proc/gwindows file; or ``PLWI'' for a /proc/lwpsinfo file; or ``PLWS'' for a /proc/lwpstatus file; or ``PLWU'' for a /proc/lwpusage file; or ``PLWX'' for a /proc/xregs file; or ``PMAP'' for a /proc map file (map); or ``PMEM'' for a /proc memory image file; or ``PNTF'' for a /proc process notifier file; or ``POBJ'' for a /proc/object file; or ``PODR'' for a /proc/object directory; or ``POLP'' for an old format /proc light weight process file; or ``POPF'' for an old format /proc PID file; or ``POPG'' for an old format /proc page data file; or ``PORT'' for a SYSV named pipe; or ``PREG'' for a /proc register file; or ``PRMP'' for a /proc/rmap file; or ``PRTD'' for a /proc root directory; or ``PSGA'' for a /proc/sigact file; or ``PSIN'' for a /proc/psinfo file; or ``PSTA'' for a /proc status file; or ``PSXSEM'' for a POSIX semaphore file; or ``PSXSHM'' for a POSIX shared memory file; or ``PTS'' for a /dev/pts file; or ``PUSG'' for a /proc/usage file; or ``PW'' for a /proc/watch file; or ``PXMP'' for a /proc/xmap file; or ``REG'' for a regular file; or ``SMT'' for a shared memory transport file; or ``STSO'' for a stream socket; or ``UNNM'' for an unnamed type file; or ``XNAM'' for an OpenServer Xenix special file of unknown type; or ``XSEM'' for an OpenServer Xenix semaphore file; or ``XSD'' for an OpenServer Xenix shared data file; or the four type number octets if the corresponding name isn't known. FILE-ADDR contains the kernel file structure address when f has been specified to +f; FCT contains the file reference count from the kernel file structure when c has been specified to +f; FILE-FLAG when g or G has been specified to +f, this field contains the contents of the f_flag[s] member of the kernel file structure and the kernel's per-process open file flags (if available); `G' causes them to be displayed in hexadecimal; `g', as short-hand names; two lists may be displayed with entries separated by commas, the lists separated by a semicolon (`;'); the first list may contain short-hand names for f_flag[s] values from the following table: AIO asynchronous I/O (e.g., FAIO) AP append ASYN asynchronous I/O (e.g., FASYNC) BAS block, test, and set in use BKIU block if in use BL use block offsets BSK block seek CA copy avoid CIO concurrent I/O CLON clone CLRD CL read CR create DF defer DFI defer IND DFLU data flush DIR direct DLY delay DOCL do clone DSYN data-only integrity DTY must be a directory EVO event only EX open for exec EXCL exclusive open FSYN synchronous writes GCDF defer during unp_gc() (AIX) GCMK mark during unp_gc() (AIX) GTTY accessed via /dev/tty HUP HUP in progress KERN kernel KIOC kernel-issued ioctl LCK has lock LG large file MBLK stream message block MK mark MNT mount MSYN multiplex synchronization NATM don't update atime NB non-blocking I/O NBDR no BDRM check NBIO SYSV non-blocking I/O NBF n-buffering in effect NC no cache ND no delay NDSY no data synchronization NET network NFLK don't follow links NMFS NM file system NOTO disable background stop NSH no share NTTY no controlling TTY OLRM OLR mirror PAIO POSIX asynchronous I/O PP POSIX pipe R read RC file and record locking cache REV revoked RSH shared read RSYN read synchronization RW read and write access SL shared lock SNAP cooked snapshot SOCK socket SQSH Sequent shared set on open SQSV Sequent SVM set on open SQR Sequent set repair on open SQS1 Sequent full shared open SQS2 Sequent partial shared open STPI stop I/O SWR synchronous read SYN file integrity while writing TCPM avoid TCP collision TR truncate W write WKUP parallel I/O synchronization WTG parallel I/O synchronization VH vhangup pending VTXT virtual text XL exclusive lock this list of names was derived from F* #define's in dialect header files <fcntl.h>, <linux</fs.h>, <sys/fcntl.c>, <sys/fcntlcom.h>, and <sys/file.h>; see the lsof.h header file for a list showing the correspondence between the above short-hand names and the header file definitions; the second list (after the semicolon) may contain short-hand names for kernel per-process open file flags from this table: ALLC allocated BR the file has been read BHUP activity stopped by SIGHUP BW the file has been written CLSG closing CX close-on-exec (see fcntl(F_SETFD)) LCK lock was applied MP memory-mapped OPIP open pending - in progress RSVW reserved wait SHMT UF_FSHMAT set (AIX) USE in use (multi-threaded) NODE-ID (or INODE-ADDR for some dialects) contains a unique identifier for the file node (usually the kernel vnode or inode address, but also occasionally a concatenation of device and node number) when n has been specified to +f; DEVICE contains the device numbers, separated by commas, for a character special, block special, regular, directory or NFS file; or ``memory'' for a memory file system node under Tru64 UNIX; or the address of the private data area of a Solaris socket stream; or a kernel reference address that identifies the file (The kernel reference address may be used for FIFO's, for example.); or the base address or device name of a Linux AX.25 socket device. Usually only the lower thirty two bits of Tru64 UNIX kernel addresses are displayed. SIZE, SIZE/OFF, or OFFSET is the size of the file or the file offset in bytes. A value is displayed in this column only if it is available. Lsof displays whatever value - size or offset - is appropriate for the type of the file and the version of lsof. On some UNIX dialects lsof can't obtain accurate or consistent file offset information from its kernel data sources, sometimes just for particular kinds of files (e.g., socket files.) In other cases, files don't have true sizes - e.g., sockets, FIFOs, pipes - so lsof displays for their sizes the content amounts it finds in their kernel buffer descriptors (e.g., socket buffer size counts or TCP/IP window sizes.) Consult the lsof FAQ (The FAQ section gives its location.) for more information. The file size is displayed in decimal; the offset is normally displayed in decimal with a leading ``0t'' if it contains 8 digits or less; in hexadecimal with a leading ``0x'' if it is longer than 8 digits. (Consult the -o o option description for information on when 8 might default to some other value.) Thus the leading ``0t'' and ``0x'' identify an offset when the column may contain both a size and an offset (i.e., its title is SIZE/OFF). If the -o option is specified, lsof always displays the file offset (or nothing if no offset is available) and labels the column OFFSET. The offset always begins with ``0t'' or ``0x'' as described above. The lsof user can control the switch from ``0t'' to ``0x'' with the -o o option. Consult its description for more information. If the -s option is specified, lsof always displays the file size (or nothing if no size is available) and labels the column SIZE. The -o and -s options are mutually exclusive; they can't both be specified. For files that don't have a fixed size - e.g., don't reside on a disk device - lsof will display appropriate information about the current size or position of the file if it is available in the kernel structures that define the file. NLINK contains the file link count when +L has been specified; NODE is the node number of a local file; or the inode number of an NFS file in the server host; or the Internet protocol type - e.g, ``TCP''; or ``STR'' for a stream; or ``CCITT'' for an HP-UX x.25 socket; or the IRQ or inode number of a Linux AX.25 socket device. NAME is the name of the mount point and file system on which the file resides; or the name of a file specified in the names option (after any symbolic links have been resolved); or the name of a character special or block special device; or the local and remote Internet addresses of a network file; the local host name or IP number is followed by a colon (':'), the port, ``->'', and the two-part remote address; IP addresses may be reported as numbers or names, depending on the +|-M, -n, and -P options; colon-separated IPv6 numbers are enclosed in square brackets; IPv4 INADDR_ANY and IPv6 IN6_IS_ADDR_UNSPECIFIED addresses, and zero port numbers are represented by an asterisk ('*'); a UDP destination address may be followed by the amount of time elapsed since the last packet was sent to the destination; TCP, UDP and UDPLITE remote addresses may be followed by TCP/TPI information in parentheses - state (e.g., ``(ESTABLISHED)'', ``(Unbound)''), queue sizes, and window sizes (not all dialects) - in a fashion similar to what netstat(1) reports; see the -T option description or the description of the TCP/TPI field in OUTPUT FOR OTHER PROGRAMS for more information on state, queue size, and window size; or the address or name of a UNIX domain socket, possibly including a stream clone device name, a file system object's path name, local and foreign kernel addresses, socket pair information, and a bound vnode address; or the local and remote mount point names of an NFS file; or ``STR'', followed by the stream name; or a stream character device name, followed by ``->'' and the stream name or a list of stream module names, separated by ``->''; or ``STR:'' followed by the SCO OpenServer stream device and module names, separated by ``->''; or system directory name, `` -- '', and as many components of the path name as lsof can find in the kernel's name cache for selected dialects (See the KERNEL NAME CACHE section for more information.); or ``PIPE->'', followed by a Solaris kernel pipe destination address; or ``COMMON:'', followed by the vnode device information structure's device name, for a Solaris common vnode; or the address family, followed by a slash (`/'), followed by fourteen comma-separated bytes of a non-Internet raw socket address; or the HP-UX x.25 local address, followed by the virtual connection number (if any), followed by the remote address (if any); or ``(dead)'' for disassociated Tru64 UNIX files - typically terminal files that have been flagged with the TIOCNOTTY ioctl and closed by daemons; or ``rd=<offset>'' and ``wr=<offset>'' for the values of the read and write offsets of a FIFO; or ``clone n:/dev/event'' for SCO OpenServer file clones of the /dev/event device, where n is the minor device number of the file; or ``(socketpair: n)'' for a Solaris 2.6, 8, 9 or 10 UNIX domain socket, created by the socketpair(3N) network function; or ``no PCB'' for socket files that do not have a protocol block associated with them, optionally followed by ``, CANTSENDMORE'' if sending on the socket has been disabled, or ``, CANTRCVMORE'' if receiving on the socket has been disabled (e.g., by the shutdown(2) function); or the local and remote addresses of a Linux IPX socket file in the form <net>:[<node>:]<port>, followed in parentheses by the transmit and receive queue sizes, and the connection state; or ``dgram'' or ``stream'' for the type UnixWare 7.1.1 and above in-kernel UNIX domain sockets, followed by a colon (':') and the local path name when available, followed by ``->'' and the remote path name or kernel socket address in hexadecimal when available; or the association value, association index, endpoint value, local address, local port, remote address and remote port for Linux SCTP sockets; or ``protocol: '' followed by the Linux socket's protocol attribute. For dialects that support a ``namefs'' file system, allowing one file to be attached to another with fattach(3C), lsof will add ``(FA:<address1><direction><address2>)'' to the NAME column. <address1> and <address2> are hexadecimal vnode addresses. <direction> will be ``<-'' if <address2> has been fattach'ed to this vnode whose address is <address1>; and ``->'' if <address1>, the vnode address of this vnode, has been fattach'ed to <address2>. <address1> may be omitted if it already appears in the DEVICE column. Lsof may add two parenthetical notes to the NAME column for open Solaris 10 files: ``(?)'' if lsof considers the path name of questionable accuracy; and ``(deleted)'' if the -X option has been specified and lsof detects the open file's path name has been deleted. Consult the lsof FAQ (The FAQ section gives its location.) for more information on these NAME column additions. LOCKS Lsof can't adequately report the wide variety of UNIX dialect file locks in a single character. What it reports in a single character is a compromise between the information it finds in the kernel and the limitations of the reporting format. Moreover, when a process holds several byte level locks on a file, lsof only reports the status of the first lock it encounters. If it is a byte level lock, then the lock character will be reported in lower case - i.e., `r', `w', or `x' - rather than the upper case equivalent reported for a full file lock. Generally lsof can only report on locks held by local processes on local files. When a local process sets a lock on a remotely mounted (e.g., NFS) file, the remote server host usually records the lock state. One exception is Solaris - at some patch levels of 2.3, and in all versions above 2.4, the Solaris kernel records information on remote locks in local structures. Lsof has trouble reporting locks for some UNIX dialects. Consult the BUGS section of this manual page or the lsof FAQ (The FAQ section gives its location.) for more information. OUTPUT FOR OTHER PROGRAMS When the -F option is specified, lsof produces output that is suitable for processing by another program - e.g, an awk or Perl script, or a C program. Each unit of information is output in a field that is identified with a leading character and terminated by a NL (012) (or a NUL (000) if the 0 (zero) field identifier character is specified.) The data of the field follows immediately after the field identification character and extends to the field terminator. It is possible to think of field output as process and file sets. A process set begins with a field whose identifier is `p' (for process IDentifier (PID)). It extends to the beginning of the next PID field or the beginning of the first file set of the process, whichever comes first. Included in the process set are fields that identify the command, the process group IDentification (PGID) number, the task (thread) ID (TID), and the user ID (UID) number or login name. A file set begins with a field whose identifier is `f' (for file descriptor). It is followed by lines that describe the file's access mode, lock state, type, device, size, offset, inode, protocol, name and stream module names. It extends to the beginning of the next file or process set, whichever comes first. When the NUL (000) field terminator has been selected with the 0 (zero) field identifier character, lsof ends each process and file set with a NL (012) character. Lsof always produces one field, the PID (`p') field. All other fields may be declared optionally in the field identifier character list that follows the -F option. When a field selection character identifies an item lsof does not normally list - e.g., PPID, selected with -R - specification of the field character - e.g., ``-FR'' - also selects the listing of the item. It is entirely possible to select a set of fields that cannot easily be parsed - e.g., if the field descriptor field is not selected, it may be difficult to identify file sets. To help you avoid this difficulty, lsof supports the -F option; it selects the output of all fields with NL terminators (the -F0 option pair selects the output of all fields with NUL terminators). For compatibility reasons neither -F nor -F0 select the raw device field. These are the fields that lsof will produce. The single character listed first is the field identifier. a file access mode c process command name (all characters from proc or user structure) C file structure share count d file's device character code D file's major/minor device number (0x<hexadecimal>) f file descriptor (always selected) F file structure address (0x<hexadecimal>) G file flaGs (0x<hexadecimal>; names if +fg follows) g process group ID i file's inode number K tasK ID k link count l file's lock status L process login name m marker between repeated output M the task comMand name n file name, comment, Internet address N node identifier (ox<hexadecimal> o file's offset (decimal) p process ID (always selected) P protocol name r raw device number (0x<hexadecimal>) R parent process ID s file's size (decimal) S file's stream identification t file's type T TCP/TPI information, identified by prefixes (the `=' is part of the prefix): QR=<read queue size> QS=<send queue size> SO=<socket options and values> (not all dialects) SS=<socket states> (not all dialects) ST=<connection state> TF=<TCP flags and values> (not all dialects) WR=<window read size> (not all dialects) WW=<window write size> (not all dialects) (TCP/TPI information isn't reported for all supported UNIX dialects. The -h or -? help output for the -T option will show what TCP/TPI reporting can be requested.) u process user ID z Solaris 10 and higher zone name Z SELinux security context (inhibited when SELinux is disabled) 0 use NUL field terminator character in place of NL 1-9 dialect-specific field identifiers (The output of -F? identifies the information to be found in dialect-specific fields.) You can get on-line help information on these characters and their descriptions by specifying the -F? option pair. (Escape the `?' character as your shell requires.) Additional information on field content can be found in the OUTPUT section. As an example, ``-F pcfn'' will select the process ID (`p'), command name (`c'), file descriptor (`f') and file name (`n') fields with an NL field terminator character; ``-F pcfn0'' selects the same output with a NUL (000) field terminator character. Lsof doesn't produce all fields for every process or file set, only those that are available. Some fields are mutually exclusive: file device characters and file major/minor device numbers; file inode number and protocol name; file name and stream identification; file size and offset. One or the other member of these mutually exclusive sets will appear in field output, but not both. Normally lsof ends each field with a NL (012) character. The 0 (zero) field identifier character may be specified to change the field terminator character to a NUL (000). A NUL terminator may be easier to process with xargs (1), for example, or with programs whose quoting mechanisms may not easily cope with the range of characters in the field output. When the NUL field terminator is in use, lsof ends each process and file set with a NL (012). Three aids to producing programs that can process lsof field output are included in the lsof distribution. The first is a C header file, lsof_fields.h, that contains symbols for the field identification characters, indexes for storing them in a table, and explanation strings that may be compiled into programs. Lsof uses this header file. The second aid is a set of sample scripts that process field output, written in awk, Perl 4, and Perl 5. They're located in the scripts subdirectory of the lsof distribution. The third aid is the C library used for the lsof test suite. The test suite is written in C and uses field output to validate the correct operation of lsof. The library can be found in the tests/LTlib.c file of the lsof distribution. The library uses the first aid, the lsof_fields.h header file. BLOCKS AND TIMEOUTS Lsof can be blocked by some kernel functions that it uses - lstat(2), readlink(2), and stat(2). These functions are stalled in the kernel, for example, when the hosts where mounted NFS file systems reside become inaccessible. Lsof attempts to break these blocks with timers and child processes, but the techniques are not wholly reliable. When lsof does manage to break a block, it will report the break with an error message. The messages may be suppressed with the -t and -w options. The default timeout value may be displayed with the -h or -? option, and it may be changed with the -S [t] option. The minimum for t is two seconds, but you should avoid small values, since slow system responsiveness can cause short timeouts to expire unexpectedly and perhaps stop lsof before it can produce any output. When lsof has to break a block during its access of mounted file system information, it normally continues, although with less information available to display about open files. Lsof can also be directed to avoid the protection of timers and child processes when using the kernel functions that might block by specifying the -O option. While this will allow lsof to start up with less overhead, it exposes lsof completely to the kernel situations that might block it. Use this option cautiously. AVOIDING KERNEL BLOCKS You can use the -b option to tell lsof to avoid using kernel functions that would block. Some cautions apply. First, using this option usually requires that your system supply alternate device numbers in place of the device numbers that lsof would normally obtain with the lstat(2) and stat(2) kernel functions. See the ALTERNATE DEVICE NUMBERS section for more information on alternate device numbers. Second, you can't specify names for lsof to locate unless they're file system names. This is because lsof needs to know the device and inode numbers of files listed with names in the lsof options, and the -b option prevents lsof from obtaining them. Moreover, since lsof only has device numbers for the file systems that have alternates, its ability to locate files on file systems depends completely on the availability and accuracy of the alternates. If no alternates are available, or if they're incorrect, lsof won't be able to locate files on the named file systems. Third, if the names of your file system directories that lsof obtains from your system's mount table are symbolic links, lsof won't be able to resolve the links. This is because the -b option causes lsof to avoid the kernel readlink(2) function it uses to resolve symbolic links. Finally, using the -b option causes lsof to issue warning messages when it needs to use the kernel functions that the -b option directs it to avoid. You can suppress these messages by specifying the -w option, but if you do, you won't see the alternate device numbers reported in the warning messages. ALTERNATE DEVICE NUMBERS On some dialects, when lsof has to break a block because it can't get information about a mounted file system via the lstat(2) and stat(2) kernel functions, or because you specified the -b option, lsof can obtain some of the information it needs - the device number and possibly the file system type - from the system mount table. When that is possible, lsof will report the device number it obtained. (You can suppress the report by specifying the -w option.) You can assist this process if your mount table is supported with an /etc/mtab or /etc/mnttab file that contains an options field by adding a ``dev=xxxx'' field for mount points that do not have one in their options strings. Note: you must be able to edit the file - i.e., some mount tables like recent Solaris /etc/mnttab or Linux /proc/mounts are read-only and can't be modified. You may also be able to supply device numbers using the +m and +m m options, provided they are supported by your dialect. Check the output of lsof's -h or -? options to see if the +m and +m m options are available. The ``xxxx'' portion of the field is the hexadecimal value of the file system's device number. (Consult the st_dev field of the output of the lstat(2) and stat(2) functions for the appropriate values for your file systems.) Here's an example from a Sun Solaris 2.6 /etc/mnttab for a file system remotely mounted via NFS: nfs ignore,noquota,dev=2a40001 There's an advantage to having ``dev=xxxx'' entries in your mount table file, especially for file systems that are mounted from remote NFS servers. When a remote server crashes and you want to identify its users by running lsof on one of its clients, lsof probably won't be able to get output from the lstat(2) and stat(2) functions for the file system. If it can obtain the file system's device number from the mount table, it will be able to display the files open on the crashed NFS server. Some dialects that do not use an ASCII /etc/mtab or /etc/mnttab file for the mount table may still provide an alternative device number in their internal mount tables. This includes AIX, Apple Darwin, FreeBSD, NetBSD, OpenBSD, and Tru64 UNIX. Lsof knows how to obtain the alternative device number for these dialects and uses it when its attempt to lstat(2) or stat(2) the file system is blocked. If you're not sure your dialect supplies alternate device numbers for file systems from its mount table, use this lsof incantation to see if it reports any alternate device numbers: lsof -b Look for standard error file warning messages that begin ``assuming "dev=xxxx" from ...''. KERNEL NAME CACHE Lsof is able to examine the kernel's name cache or use other kernel facilities (e.g., the ADVFS 4.x tag_to_path() function under Tru64 UNIX) on some dialects for most file system types, excluding AFS, and extract recently used path name components from it. (AFS file system path lookups don't use the kernel's name cache; some Solaris VxFS file system operations apparently don't use it, either.) Lsof reports the complete paths it finds in the NAME column. If lsof can't report all components in a path, it reports in the NAME column the file system name, followed by a space, two `-' characters, another space, and the name components it has located, separated by the `/' character. When lsof is run in repeat mode - i.e., with the -r option specified - the extent to which it can report path name components for the same file may vary from cycle to cycle. That's because other running processes can cause the kernel to remove entries from its name cache and replace them with others. Lsof's use of the kernel name cache to identify the paths of files can lead it to report incorrect components under some circumstances. This can happen when the kernel name cache uses device and node number as a key (e.g., SCO OpenServer) and a key on a rapidly changing file system is reused. If the UNIX dialect's kernel doesn't purge the name cache entry for a file when it is unlinked, lsof may find a reference to the wrong entry in the cache. The lsof FAQ (The FAQ section gives its location.) has more information on this situation. Lsof can report path name components for these dialects: FreeBSD HP-UX Linux NetBSD NEXTSTEP OpenBSD OPENSTEP SCO OpenServer SCO|Caldera UnixWare Solaris Tru64 UNIX Lsof can't report path name components for these dialects: AIX If you want to know why lsof can't report path name components for some dialects, see the lsof FAQ (The FAQ section gives its location.) DEVICE CACHE FILE Examining all members of the /dev (or /devices) node tree with stat(2) functions can be time consuming. What's more, the information that lsof needs - device number, inode number, and path - rarely changes. Consequently, lsof normally maintains an ASCII text file of cached /dev (or /devices) information (exception: the /proc-based Linux lsof where it's not needed.) The local system administrator who builds lsof can control the way the device cache file path is formed, selecting from these options: Path from the -D option; Path from an environment variable; System-wide path; Personal path (the default); Personal path, modified by an environment variable. Consult the output of the -h, -D? , or -? help options for the current state of device cache support. The help output lists the default read-mode device cache file path that is in effect for the current invocation of lsof. The -D? option output lists the read-only and write device cache file paths, the names of any applicable environment variables, and the personal device cache path format. Lsof can detect that the current device cache file has been accidentally or maliciously modified by integrity checks, including the computation and verification of a sixteen bit Cyclic Redundancy Check (CRC) sum on the file's contents. When lsof senses something wrong with the file, it issues a warning and attempts to remove the current cache file and create a new copy, but only to a path that the process can legitimately write. The path from which a lsof process may attempt to read a device cache file may not be the same as the path to which it can legitimately write. Thus when lsof senses that it needs to update the device cache file, it may choose a different path for writing it from the path from which it read an incorrect or outdated version. If available, the -Dr option will inhibit the writing of a new device cache file. (It's always available when specified without a path name argument.) When a new device is added to the system, the device cache file may need to be recreated. Since lsof compares the mtime of the device cache file with the mtime and ctime of the /dev (or /devices) directory, it usually detects that a new device has been added; in that case lsof issues a warning message and attempts to rebuild the device cache file. Whenever lsof writes a device cache file, it sets its ownership to the real UID of the executing process, and its permission modes to 0600, this restricting its reading and writing to the file's owner. LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS Two permissions of the lsof executable affect its ability to access device cache files. The permissions are set by the local system administrator when lsof is installed. The first and rarer permission is setuid-root. It comes into effect when lsof is executed; its effective UID is then root, while its real (i.e., that of the logged-on user) UID is not. The lsof distribution recommends that versions for these dialects run setuid-root. HP-UX 11.11 and 11.23 Linux The second and more common permission is setgid. It comes into effect when the effective group IDentification number (GID) of the lsof process is set to one that can access kernel memory devices - e.g., ``kmem'', ``sys'', or ``system''. An lsof process that has setgid permission usually surrenders the permission after it has accessed the kernel memory devices. When it does that, lsof can allow more liberal device cache path formations. The lsof distribution recommends that versions for these dialects run setgid and be allowed to surrender setgid permission. AIX 5.[12] and 5.3-ML1 Apple Darwin 7.x Power Macintosh systems FreeBSD 4.x, 4.1x, 5.x and [6789].x for x86-based systems FreeBSD 5.x, [6789].x and 1[012].8for Alpha, AMD64 and Sparc64 based systems HP-UX 11.00 NetBSD 1.[456], 2.x and 3.x for Alpha, x86, and SPARC-based systems NEXTSTEP 3.[13] for NEXTSTEP architectures OpenBSD 2.[89] and 3.[0-9] for x86-based systems OPENSTEP 4.x SCO OpenServer Release 5.0.6 for x86-based systems SCO|Caldera UnixWare 7.1.4 for x86-based systems Solaris 2.6, 8, 9 and 10 Tru64 UNIX 5.1 (Note: lsof for AIX 5L and above needs setuid-root permission if its -X option is used.) Lsof for these dialects does not support a device cache, so the permissions given to the executable don't apply to the device cache file. Linux DEVICE CACHE FILE PATH FROM THE -D OPTION The -D option provides limited means for specifying the device cache file path. Its ? function will report the read-only and write device cache file paths that lsof will use. When the -D b, r, and u functions are available, you can use them to request that the cache file be built in a specific location (b[path]); read but not rebuilt (r[path]); or read and rebuilt (u[path]). The b, r, and u functions are restricted under some conditions. They are restricted when the lsof process is setuid-root. The path specified with the r function is always read-only, even when it is available. The b, r, and u functions are also restricted when the lsof process runs setgid and lsof doesn't surrender the setgid permission. (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for a list of implementations that normally don't surrender their setgid permission.) A further -D function, i (for ignore), is always available. When available, the b function tells lsof to read device information from the kernel with the stat(2) function and build a device cache file at the indicated path. When available, the r function tells lsof to read the device cache file, but not update it. When a path argument accompanies -Dr, it names the device cache file path. The r function is always available when it is specified without a path name argument. If lsof is not running setuid-root and surrenders its setgid permission, a path name argument may accompany the r function. When available, the u function tells lsof to attempt to read and use the device cache file. If it can't read the file, or if it finds the contents of the file incorrect or outdated, it will read information from the kernel, and attempt to write an updated version of the device cache file, but only to a path it considers legitimate for the lsof process effective and real UIDs. DEVICE CACHE PATH FROM AN ENVIRONMENT VARIABLE Lsof's second choice for the device cache file is the contents of the LSOFDEVCACHE environment variable. It avoids this choice if the lsof process is setuid-root, or the real UID of the process is root. A further restriction applies to a device cache file path taken from the LSOFDEVCACHE environment variable: lsof will not write a device cache file to the path if the lsof process doesn't surrender its setgid permission. (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for information on implementations that don't surrender their setgid permission.) The local system administrator can disable the use of the LSOFDEVCACHE environment variable or change its name when building lsof. Consult the output of -D? for the environment variable's name. SYSTEM-WIDE DEVICE CACHE PATH The local system administrator may choose to have a system-wide device cache file when building lsof. That file will generally be constructed by a special system administration procedure when the system is booted or when the contents of /dev or /devices) changes. If defined, it is lsof's third device cache file path choice. You can tell that a system-wide device cache file is in effect for your local installation by examining the lsof help option output - i.e., the output from the -h or -? option. Lsof will never write to the system-wide device cache file path by default. It must be explicitly named with a -D function in a root-owned procedure. Once the file has been written, the procedure must change its permission modes to 0644 (owner-read and owner-write, group-read, and other-read). PERSONAL DEVICE CACHE PATH (DEFAULT) The default device cache file path of the lsof distribution is one recorded in the home directory of the real UID that executes lsof. Added to the home directory is a second path component of the form .lsof_hostname. This is lsof's fourth device cache file path choice, and is usually the default. If a system-wide device cache file path was defined when lsof was built, this fourth choice will be applied when lsof can't find the system-wide device cache file. This is the only time lsof uses two paths when reading the device cache file. The hostname part of the second component is the base name of the executing host, as returned by gethostname(2). The base name is defined to be the characters preceding the first `.' in the gethostname(2) output, or all the gethostname(2) output if it contains no `.'. The device cache file belongs to the user ID and is readable and writable by the user ID alone - i.e., its modes are 0600. Each distinct real user ID on a given host that executes lsof has a distinct device cache file. The hostname part of the path distinguishes device cache files in an NFS-mounted home directory into which device cache files are written from several different hosts. The personal device cache file path formed by this method represents a device cache file that lsof will attempt to read, and will attempt to write should it not exist or should its contents be incorrect or outdated. The -Dr option without a path name argument will inhibit the writing of a new device cache file. The -D? option will list the format specification for constructing the personal device cache file. The conversions used in the format specification are described in the 00DCACHE file of the lsof distribution. MODIFIED PERSONAL DEVICE CACHE PATH If this option is defined by the local system administrator when lsof is built, the LSOFPERSDCPATH environment variable contents may be used to add a component of the personal device cache file path. The LSOFPERSDCPATH variable contents are inserted in the path at the place marked by the local system administrator with the ``%p'' conversion in the HASPERSDC format specification of the dialect's machine.h header file. (It's placed right after the home directory in the default lsof distribution.) Thus, for example, if LSOFPERSDCPATH contains ``LSOF'', the home directory is ``/Homes/abe'', the host name is ``lsof.itap.purdue.edu'', and the HASPERSDC format is the default (``%h/%p.lsof_%L''), the modified personal device cache file path is: /Homes/abe/LSOF/.lsof_vic The LSOFPERSDCPATH environment variable is ignored when the lsof process is setuid-root or when the real UID of the process is root. Lsof will not write to a modified personal device cache file path if the lsof process doesn't surrender setgid permission. (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for a list of implementations that normally don't surrender their setgid permission.) If, for example, you want to create a sub-directory of personal device cache file paths by using the LSOFPERSDCPATH environment variable to name it, and lsof doesn't surrender its setgid permission, you will have to allow lsof to create device cache files at the standard personal path and move them to your subdirectory with shell commands. The local system administrator may: disable this option when lsof is built; change the name of the environment variable from LSOFPERSDCPATH to something else; change the HASPERSDC format to include the personal path component in another place; or exclude the personal path component entirely. Consult the output of the -D? option for the environment variable's name and the HASPERSDC format specification. DIAGNOSTICS Errors are identified with messages on the standard error file. Lsof returns a one (1) if any error was detected, including the failure to locate command names, file names, Internet addresses or files, login names, NFS files, PIDs, PGIDs, or UIDs it was asked to list. If the -V option is specified, lsof will indicate the search items it failed to list. It returns a zero (0) if no errors were detected and if it was able to list some information about all the specified search arguments. When lsof cannot open access to /dev (or /devices) or one of its subdirectories, or get information on a file in them with stat(2), it issues a warning message and continues. That lsof will issue warning messages about inaccessible files in /dev (or /devices) is indicated in its help output - requested with the -h or >B -? options - with the message: Inaccessible /dev warnings are enabled. The warning message may be suppressed with the -w option. It may also have been suppressed by the system administrator when lsof was compiled by the setting of the WARNDEVACCESS definition. In this case, the output from the help options will include the message: Inaccessible /dev warnings are disabled. Inaccessible device warning messages usually disappear after lsof has created a working device cache file.
|
lsof [ -?abChlnNOPRtUvVX ] [ -A A ] [ -c c ] [ +c c ] [ +|-d d ] [ +|-D D ] [ +|-e s ] [ +|-E ] [ +|-f [cfgGn] ] [ -F [f] ] [ -g [s] ] [ -i [i] ] [ -k k ] [ -K k ] [ +|-L [l] ] [ +|-m m ] [ +|-M ] [ -o [o] ] [ -p s ] [ +|-r [t[m<fmt>]] ] [ -s [p:s] ] [ -S [t] ] [ -T [t] ] [ -u s ] [ +|-w ] [ -x [fl] ] [ +|-X ] [ -z [z] ] [ -Z [Z] ] [ -- ] [names]
|
In the absence of any options, lsof lists all open files belonging to all active processes. If any list request option is specified, other list requests must be specifically requested - e.g., if -U is specified for the listing of UNIX socket files, NFS files won't be listed unless -N is also specified; or if a user list is specified with the -u option, UNIX domain socket files, belonging to users not in the list, won't be listed unless the -U option is also specified. Normally list options that are specifically stated are ORed - i.e., specifying the -i option without an address and the -ufoo option produces a listing of all network files OR files belonging to processes owned by user ``foo''. The exceptions are: 1) the `^' (negated) login name or user ID (UID), specified with the -u option; 2) the `^' (negated) process ID (PID), specified with the -p option; 3) the `^' (negated) process group ID (PGID), specified with the -g option; 4) the `^' (negated) command, specified with the -c option; 5) the (`^') negated TCP or UDP protocol state names, specified with the -s [p:s] option. Since they represent exclusions, they are applied without ORing or ANDing and take effect before any other selection criteria are applied. The -a option may be used to AND the selections. For example, specifying -a, -U, and -ufoo produces a listing of only UNIX socket files that belong to processes owned by user ``foo''. Caution: the -a option causes all list selection options to be ANDed; it can't be used to cause ANDing of selected pairs of selection options by placing it between them, even though its placement there is acceptable. Wherever -a is placed, it causes the ANDing of all selection options. Items of the same selection set - command names, file descriptors, network addresses, process identifiers, user identifiers, zone names, security contexts - are joined in a single ORed set and applied before the result participates in ANDing. Thus, for example, specifying -i@aaa.bbb, -i@ccc.ddd, -a, and -ufff,ggg will select the listing of files that belong to either login ``fff'' OR ``ggg'' AND have network connections to either host aaa.bbb OR ccc.ddd. Options may be grouped together following a single prefix -- e.g., the option set ``-a -b -C'' may be stated as -abC. However, since values are optional following +|-f, -F, -g, -i, +|-L, -o, +|-r, -s, -S, -T, -x and -z. when you have no values for them be careful that the following character isn't ambiguous. For example, -Fn might represent the -F and -n options, or it might represent the n field identifier character following the -F option. When ambiguity is possible, start a new option with a `-' character - e.g., ``-F -n''. If the next option is a file name, follow the possibly ambiguous option with ``--'' - e.g., ``-F -- name''. Either the `+' or the `-' prefix may be applied to a group of options. Options that don't take on separate meanings for each prefix - e.g., -i - may be grouped under either prefix. Thus, for example, ``+M -i'' may be stated as ``+Mi'' and the group means the same as the separate options. Be careful of prefix grouping when one or more options in the group does take on separate meanings under different prefixes - e.g., +|-M; ``-iM'' is not the same request as ``-i +M''. When in doubt, use separate options with appropriate prefixes. -? -h These two equivalent options select a usage (help) output list. Lsof displays a shortened form of this output when it detects an error in the options supplied to it, after it has displayed messages explaining each error. (Escape the `?' character as your shell requires.) -a causes list selection options to be ANDed, as described above. -A A is available on systems configured for AFS whose AFS kernel code is implemented via dynamic modules. It allows the lsof user to specify A as an alternate name list file where the kernel addresses of the dynamic modules might be found. See the lsof FAQ (The FAQ section gives its location.) for more information about dynamic modules, their symbols, and how they affect lsof. -b causes lsof to avoid kernel functions that might block - lstat(2), readlink(2), and stat(2). See the BLOCKS AND TIMEOUTS and AVOIDING KERNEL BLOCKS sections for information on using this option. -c c selects the listing of files for processes executing the command that begins with the characters of c. Multiple commands may be specified, using multiple -c options. They are joined in a single ORed set before participating in AND option selection. If c begins with a `^', then the following characters specify a command name whose processes are to be ignored (excluded.) If c begins and ends with a slash ('/'), the characters between the slashes are interpreted as a regular expression. Shell meta-characters in the regular expression must be quoted to prevent their interpretation by the shell. The closing slash may be followed by these modifiers: b the regular expression is a basic one. i ignore the case of letters. x the regular expression is an extended one (default). See the lsof FAQ (The FAQ section gives its location.) for more information on basic and extended regular expressions. The simple command specification is tested first. If that test fails, the command regular expression is applied. If the simple command test succeeds, the command regular expression test isn't made. This may result in ``no command found for regex:'' messages when lsof's -V option is specified. +c w defines the maximum number of initial characters of the name, supplied by the UNIX dialect, of the UNIX command associated with a process to be printed in the COMMAND column. (The lsof default is nine.) Note that many UNIX dialects do not supply all command name characters to lsof in the files and structures from which lsof obtains command name. Often dialects limit the number of characters supplied in those sources. For example, Linux 2.4.27 and Solaris 9 both limit command name length to 16 characters. If w is zero ('0'), all command characters supplied to lsof by the UNIX dialect will be printed. If w is less than the length of the column title, ``COMMAND'', it will be raised to that length. -C disables the reporting of any path name components from the kernel's name cache. See the KERNEL NAME CACHE section for more information. +d s causes lsof to search for all open instances of directory s and the files and directories it contains at its top level. +d does NOT descend the directory tree, rooted at s. The +D D option may be used to request a full-descent directory tree search, rooted at directory D. Processing of the +d option does not follow symbolic links within s unless the -x or -x l option is also specified. Nor does it search for open files on file system mount points on subdirectories of s unless the -x or -x f option is also specified. Note: the authority of the user of this option limits it to searching for files that the user has permission to examine with the system stat(2) function. -d s specifies a list of file descriptors (FDs) to exclude from or include in the output listing. The file descriptors are specified in the comma-separated set s - e.g., ``cwd,1,3'', ``^6,^2''. (There should be no spaces in the set.) The list is an exclusion list if all entries of the set begin with `^'. It is an inclusion list if no entry begins with `^'. Mixed lists are not permitted. A file descriptor number range may be in the set as long as neither member is empty, both members are numbers, and the ending member is larger than the starting one - e.g., ``0-7'' or ``3-10''. Ranges may be specified for exclusion if they have the `^' prefix - e.g., ``^0-7'' excludes all file descriptors 0 through 7. Multiple file descriptor numbers are joined in a single ORed set before participating in AND option selection. When there are exclusion and inclusion members in the set, lsof reports them as errors and exits with a non-zero return code. See the description of File Descriptor (FD) output values in the OUTPUT section for more information on file descriptor names. +D D causes lsof to search for all open instances of directory D and all the files and directories it contains to its complete depth. Processing of the +D option does not follow symbolic links within D unless the -x or -x l option is also specified. Nor does it search for open files on file system mount points on subdirectories of D unless the -x or -x f option is also specified. Note: the authority of the user of this option limits it to searching for files that the user has permission to examine with the system stat(2) function. Further note: lsof may process this option slowly and require a large amount of dynamic memory to do it. This is because it must descend the entire directory tree, rooted at D, calling stat(2) for each file and directory, building a list of all the files it finds, and searching that list for a match with every open file. When directory D is large, these steps can take a long time, so use this option prudently. -D D directs lsof's use of the device cache file. The use of this option is sometimes restricted. See the DEVICE CACHE FILE section and the sections that follow it for more information on this option. -D must be followed by a function letter; the function letter may optionally be followed by a path name. Lsof recognizes these function letters: ? - report device cache file paths b - build the device cache file i - ignore the device cache file r - read the device cache file u - read and update the device cache file The b, r, and u functions, accompanied by a path name, are sometimes restricted. When these functions are restricted, they will not appear in the description of the -D option that accompanies -h or -? option output. See the DEVICE CACHE FILE section and the sections that follow it for more information on these functions and when they're restricted. The ? function reports the read-only and write paths that lsof can use for the device cache file, the names of any environment variables whose values lsof will examine when forming the device cache file path, and the format for the personal device cache file path. (Escape the `?' character as your shell requires.) When available, the b, r, and u functions may be followed by the device cache file's path. The standard default is .lsof_hostname in the home directory of the real user ID that executes lsof, but this could have been changed when lsof was configured and compiled. (The output of the -h and -? options show the current default prefix - e.g., ``.lsof''.) The suffix, hostname, is the first component of the host's name returned by gethostname(2). When available, the b function directs lsof to build a new device cache file at the default or specified path. The i function directs lsof to ignore the default device cache file and obtain its information about devices via direct calls to the kernel. The r function directs lsof to read the device cache at the default or specified path, but prevents it from creating a new device cache file when none exists or the existing one is improperly structured. The r function, when specified without a path name, prevents lsof from updating an incorrect or outdated device cache file, or creating a new one in its place. The r function is always available when it is specified without a path name argument; it may be restricted by the permissions of the lsof process. When available, the u function directs lsof to read the device cache file at the default or specified path, if possible, and to rebuild it, if necessary. This is the default device cache file function when no -D option has been specified. +|-e s exempts the file system whose path name is s from being subjected to kernel function calls that might block. The +e option exempts stat(2), lstat(2) and most readlink(2) kernel function calls. The -e option exempts only stat(2) and lstat(2) kernel function calls. Multiple file systems may be specified with separate +|-e specifications and each may have readlink(2) calls exempted or not. This option is currently implemented only for Linux. CAUTION: this option can easily be mis-applied to other than the file system of interest, because it uses path name rather than the more reliable device and inode numbers. (Device and inode numbers are acquired via the potentially blocking stat(2) kernel call and are thus not available, but see the +|-m m option as a possible alternative way to supply device numbers.) Use this option with great care and fully specify the path name of the file system to be exempted. When open files on exempted file systems are reported, it may not be possible to obtain all their information. Therefore, some information columns will be blank, the characters ``UNKN'' preface the values in the TYPE column, and the applicable exemption option is added in parentheses to the end of the NAME column. (Some device number information might be made available via the +|-m m option.) +|-E +E specifies that Linux pipe, Linux UNIX socket and Linux pseudoterminal files should be displayed with endpoint information and the files of the endpoints should also be displayed. Note: UNIX socket file endpoint information is only available when the compile flags line of -v output contains HASUXSOCKEPT, and psudoterminal endpoint information is only available when the compile flags line contains HASPTYEPT. Pipe endpoint information is displayed in the NAME column in the form ``PID,cmd,FDmode'', where PID is the endpoint process ID; cmd is the endpoint process command; FD is the endpoint file's descriptor; and mode is the endpoint file's access mode. Pseudoterminal endpoint information is displayed in the NAME column as ``->/dev/ptsmin PID,cmd,FDmode'' or ``PID,cmd,FDmode''. The first form is for a primary device; the second, for a replica device. min is a replica device's minor device number; and PID, cmd, FD and mode are the same as with pipe endpoint information. Note: psudoterminal endpoint information is only available when the compile flags line of -V output contains HASPTYEPT. UNIX socket file endpoint information is displayed in the NAME column in the form ``type=TYPE ->INO=INODE PID,cmd,FDmode'', where TYPE is the socket type; INODE is the i-node number of the connected socket; and PID, cmd, FD and mode are the same as with pipe endpoint information. Note: UNIX socket file endpoint information is available only when the compile flags line of -v output contains HASUXSOCKEPT. Multiple occurrences of this information can appear in a file's NAME column. -E specfies that Linux pipe and Linux UNIX socket files should be displayed with endpoint information, but not the files of the endpoints. +|-f [cfgGn] f by itself clarifies how path name arguments are to be interpreted. When followed by c, f, g, G, or n in any combination it specifies that the listing of kernel file structure information is to be enabled (`+') or inhibited (`-'). Normally a path name argument is taken to be a file system name if it matches a mounted-on directory name reported by mount(8), or if it represents a block device, named in the mount output and associated with a mounted directory name. When +f is specified, all path name arguments will be taken to be file system names, and lsof will complain if any are not. This can be useful, for example, when the file system name (mounted-on device) isn't a block device. This happens for some CD-ROM file systems. When -f is specified by itself, all path name arguments will be taken to be simple files. Thus, for example, the ``-f -- /'' arguments direct lsof to search for open files with a `/' path name, not all open files in the `/' (root) file system. Be careful to make sure +f and -f are properly terminated and aren't followed by a character (e.g., of the file or file system name) that might be taken as a parameter. For example, use ``--'' after +f and -f as in these examples. $ lsof +f -- /file/system/name $ lsof -f -- /file/name The listing of information from kernel file structures, requested with the +f [cfgGn] option form, is normally inhibited, and is not available in whole or part for some dialects - e.g., /proc-based Linux kernels below 2.6.22. When the prefix to f is a plus sign (`+'), these characters request file structure information: c file structure use count (not Linux) f file structure address (not Linux) g file flag abbreviations (Linux 2.6.22 and up) G file flags in hexadecimal (Linux 2.6.22 and up) n file structure node address (not Linux) When the prefix is minus (`-') the same characters disable the listing of the indicated values. File structure addresses, use counts, flags, and node addresses may be used to detect more readily identical files inherited by child processes and identical files in use by different processes. Lsof column output can be sorted by output columns holding the values and listed to identify identical file use, or lsof field output can be parsed by an AWK or Perl post-filter script, or by a C program. -F f specifies a character list, f, that selects the fields to be output for processing by another program, and the character that terminates each output field. Each field to be output is specified with a single character in f. The field terminator defaults to NL, but may be changed to NUL (000). See the OUTPUT FOR OTHER PROGRAMS section for a description of the field identification characters and the field output process. When the field selection character list is empty, all standard fields are selected (except the raw device field, security context and zone field for compatibility reasons) and the NL field terminator is used. When the field selection character list contains only a zero (`0'), all fields are selected (except the raw device field for compatibility reasons) and the NUL terminator character is used. Other combinations of fields and their associated field terminator character must be set with explicit entries in f, as described in the OUTPUT FOR OTHER PROGRAMS section. When a field selection character identifies an item lsof does not normally list - e.g., PPID, selected with -R - specification of the field character - e.g., ``-FR'' - also selects the listing of the item. When the field selection character list contains the single character `?', lsof will display a help list of the field identification characters. (Escape the `?' character as your shell requires.) -g [s] excludes or selects the listing of files for the processes whose optional process group IDentification (PGID) numbers are in the comma-separated set s - e.g., ``123'' or ``123,^456''. (There should be no spaces in the set.) PGID numbers that begin with `^' (negation) represent exclusions. Multiple PGID numbers are joined in a single ORed set before participating in AND option selection. However, PGID exclusions are applied without ORing or ANDing and take effect before other selection criteria are applied. The -g option also enables the output display of PGID numbers. When specified without a PGID set that's all it does. -i [i] selects the listing of files any of whose Internet address matches the address specified in i. If no address is specified, this option selects the listing of all Internet and x.25 (HP-UX) network files. If -i4 or -i6 is specified with no following address, only files of the indicated IP version, IPv4 or IPv6, are displayed. (An IPv6 specification may be used only if the dialects supports IPv6, as indicated by ``[46]'' and ``IPv[46]'' in lsof's -h or -? output.) Sequentially specifying -i4, followed by -i6 is the same as specifying -i, and vice-versa. Specifying -i4, or -i6 after -i is the same as specifying -i4 or -i6 by itself. Multiple addresses (up to a limit of 100) may be specified with multiple -i options. (A port number or service name range is counted as one address.) They are joined in a single ORed set before participating in AND option selection. An Internet address is specified in the form (Items in square brackets are optional.): [46][protocol][@hostname|hostaddr][:service|port] where: 46 specifies the IP version, IPv4 or IPv6 that applies to the following address. '6' may be be specified only if the UNIX dialect supports IPv6. If neither '4' nor '6' is specified, the following address applies to all IP versions. protocol is a protocol name - TCP, UDP hostname is an Internet host name. Unless a specific IP version is specified, open network files associated with host names of all versions will be selected. hostaddr is a numeric Internet IPv4 address in dot form; or an IPv6 numeric address in colon form, enclosed in brackets, if the UNIX dialect supports IPv6. When an IP version is selected, only its numeric addresses may be specified. service is an /etc/services name - e.g., smtp - or a list of them. port is a port number, or a list of them. IPv6 options may be used only if the UNIX dialect supports IPv6. To see if the dialect supports IPv6, run lsof and specify the -h or -? (help) option. If the displayed description of the -i option contains ``[46]'' and ``IPv[46]'', IPv6 is supported. IPv4 host names and addresses may not be specified if network file selection is limited to IPv6 with -i 6. IPv6 host names and addresses may not be specified if network file selection is limited to IPv4 with -i 4. When an open IPv4 network file's address is mapped in an IPv6 address, the open file's type will be IPv6, not IPv4, and its display will be selected by '6', not '4'. At least one address component - 4, 6, protocol, hostname, hostaddr, or service - must be supplied. The `@' character, leading the host specification, is always required; as is the `:', leading the port specification. Specify either hostname or hostaddr. Specify either service name list or port number list. If a service name list is specified, the protocol may also need to be specified if the TCP, UDP and UDPLITE port numbers for the service name are different. Use any case - lower or upper - for protocol. Service names and port numbers may be combined in a list whose entries are separated by commas and whose numeric range entries are separated by minus signs. There may be no embedded spaces, and all service names must belong to the specified protocol. Since service names may contain embedded minus signs, the starting entry of a range can't be a service name; it can be a port number, however. Here are some sample addresses: -i6 - IPv6 only TCP:25 - TCP and port 25 @1.2.3.4 - Internet IPv4 host address 1.2.3.4 @[3ffe:1ebc::1]:1234 - Internet IPv6 host address 3ffe:1ebc::1, port 1234 UDP:who - UDP who service port TCP@lsof.itap:513 - TCP, port 513 and host name lsof.itap tcp@foo:1-10,smtp,99 - TCP, ports 1 through 10, service name smtp, port 99, host name foo tcp@bar:1-smtp - TCP, ports 1 through smtp, host bar :time - either TCP, UDP or UDPLITE time service port -K k selects the listing of tasks (threads) of processes, on dialects where task (thread) reporting is supported. (If help output - i.e., the output of the -h or -? options - shows this option, then task (thread) reporting is supported by the dialect.) If -K is followed by a value, k, it must be ``i''. That causes lsof to ignore tasks, particularly in the default, list-everything case when no other options are specified. When -K and -a are both specified on Linux, and the tasks of a main process are selected by other options, the main process will also be listed as though it were a task, but without a task ID. (See the description of the TID column in the OUTPUT section.) Where the FreeBSD version supports threads, all threads will be listed with their IDs. In general threads and tasks inherit the files of the caller, but may close some and open others, so lsof always reports all the open files of threads and tasks. -k k specifies a kernel name list file, k, in place of /vmunix, /mach, etc. -k is not available under AIX on the IBM RISC/System 6000. -l inhibits the conversion of user ID numbers to login names. It is also useful when login name lookup is working improperly or slowly. +|-L [l] enables (`+') or disables (`-') the listing of file link counts, where they are available - e.g., they aren't available for sockets, or most FIFOs and pipes. When +L is specified without a following number, all link counts will be listed. When -L is specified (the default), no link counts will be listed. When +L is followed by a number, only files having a link count less than that number will be listed. (No number may follow -L.) A specification of the form ``+L1'' will select open files that have been unlinked. A specification of the form ``+aL1 <file_system>'' will select unlinked open files on the specified file system. For other link count comparisons, use field output (-F) and a post-processing script or program. +|-m m specifies an alternate kernel memory file or activates mount table supplement processing. The option form -m m specifies a kernel memory file, m, in place of /dev/kmem or /dev/mem - e.g., a crash dump file. The option form +m requests that a mount supplement file be written to the standard output file. All other options are silently ignored. There will be a line in the mount supplement file for each mounted file system, containing the mounted file system directory, followed by a single space, followed by the device number in hexadecimal "0x" format - e.g., / 0x801 Lsof can use the mount supplement file to get device numbers for file systems when it can't get them via stat(2) or lstat(2). The option form +m m identifies m as a mount supplement file. Note: the +m and +m m options are not available for all supported dialects. Check the output of lsof's -h or -? options to see if the +m and +m m options are available. +|-M Enables (+) or disables (-) the reporting of portmapper registrations for local TCP, UDP and UDPLITE ports, where port mapping is supported. (See the last paragraph of this option description for information about where portmapper registration reporting is supported.) The default reporting mode is set by the lsof builder with the HASPMAPENABLED #define in the dialect's machine.h header file; lsof is distributed with the HASPMAPENABLED #define deactivated, so portmapper reporting is disabled by default and must be requested with +M. Specifying lsof's -h or -? option will report the default mode. Disabling portmapper registration when it is already disabled or enabling it when already enabled is acceptable. When portmapper registration reporting is enabled, lsof displays the portmapper registration (if any) for local TCP, UDP or UDPLITE ports in square brackets immediately following the port numbers or service names - e.g., ``:1234[name]'' or ``:name[100083]''. The registration information may be a name or number, depending on what the registering program supplied to the portmapper when it registered the port. When portmapper registration reporting is enabled, lsof may run a little more slowly or even become blocked when access to the portmapper becomes congested or stopped. Reverse the reporting mode to determine if portmapper registration reporting is slowing or blocking lsof. For purposes of portmapper registration reporting lsof considers a TCP, UDP or UDPLITE port local if: it is found in the local part of its containing kernel structure; or if it is located in the foreign part of its containing kernel structure and the local and foreign Internet addresses are the same; or if it is located in the foreign part of its containing kernel structure and the foreign Internet address is INADDR_LOOPBACK (127.0.0.1). This rule may make lsof ignore some foreign ports on machines with multiple interfaces when the foreign Internet address is on a different interface from the local one. See the lsof FAQ (The FAQ section gives its location.) for further discussion of portmapper registration reporting issues. Portmapper registration reporting is supported only on dialects that have RPC header files. (Some Linux distributions with GlibC 2.14 do not have them.) When portmapper registration reporting is supported, the -h or -? help output will show the +|-M option. -n inhibits the conversion of network numbers to host names for network files. Inhibiting conversion may make lsof run faster. It is also useful when host name lookup is not working properly. -N selects the listing of NFS files. -o directs lsof to display file offset at all times. It causes the SIZE/OFF output column title to be changed to OFFSET. Note: on some UNIX dialects lsof can't obtain accurate or consistent file offset information from its kernel data sources, sometimes just for particular kinds of files (e.g., socket files.) Consult the lsof FAQ (The FAQ section gives its location.) for more information. The -o and -s options are mutually exclusive; they can't both be specified. When neither is specified, lsof displays whatever value - size or offset - is appropriate and available for the type of the file. -o o defines the number of decimal digits (o) to be printed after the ``0t'' for a file offset before the form is switched to ``0x...''. An o value of zero (unlimited) directs lsof to use the ``0t'' form for all offset output. This option does NOT direct lsof to display offset at all times; specify -o (without a trailing number) to do that. -o o only specifies the number of digits after ``0t'' in either mixed size and offset or offset-only output. Thus, for example, to direct lsof to display offset at all times with a decimal digit count of 10, use: -o -o 10 or -oo10 The default number of digits allowed after ``0t'' is normally 8, but may have been changed by the lsof builder. Consult the description of the -o o option in the output of the -h or -? option to determine the default that is in effect. -O directs lsof to bypass the strategy it uses to avoid being blocked by some kernel operations - i.e., doing them in forked child processes. See the BLOCKS AND TIMEOUTS and AVOIDING KERNEL BLOCKS sections for more information on kernel operations that may block lsof. While use of this option will reduce lsof startup overhead, it may also cause lsof to hang when the kernel doesn't respond to a function. Use this option cautiously. -p s excludes or selects the listing of files for the processes whose optional process IDentification (PID) numbers are in the comma-separated set s - e.g., ``123'' or ``123,^456''. (There should be no spaces in the set.) PID numbers that begin with `^' (negation) represent exclusions. Multiple process ID numbers are joined in a single ORed set before participating in AND option selection. However, PID exclusions are applied without ORing or ANDing and take effect before other selection criteria are applied. -P inhibits the conversion of port numbers to port names for network files. Inhibiting the conversion may make lsof run a little faster. It is also useful when port name lookup is not working properly. +|-r [t[m<fmt>]] puts lsof in repeat mode. There lsof lists open files as selected by other options, delays t seconds (default fifteen), then repeats the listing, delaying and listing repetitively until stopped by a condition defined by the prefix to the option. If the prefix is a `-', repeat mode is endless. Lsof must be terminated with an interrupt or quit signal. If the prefix is `+', repeat mode will end the first cycle no open files are listed - and of course when lsof is stopped with an interrupt or quit signal. When repeat mode ends because no files are listed, the process exit code will be zero if any open files were ever listed; one, if none were ever listed. Lsof marks the end of each listing: if field output is in progress (the -F, option has been specified), the default marker is `m'; otherwise the default marker is ``========''. The marker is followed by a NL character. The optional "m<fmt>" argument specifies a format for the marker line. The <fmt> characters following `m' are interpreted as a format specification to the strftime(3) function, when both it and the localtime(3) function are available in the dialect's C library. Consult the strftime(3) documentation for what may appear in its format specification. Note that when field output is requested with the -F option, <fmt> cannot contain the NL format, ``%n''. Note also that when <fmt> contains spaces or other characters that affect the shell's interpretation of arguments, <fmt> must be quoted appropriately. Repeat mode reduces lsof startup overhead, so it is more efficient to use this mode than to call lsof repetitively from a shell script, for example. To use repeat mode most efficiently, accompany +|-r with specification of other lsof selection options, so the amount of kernel memory access lsof does will be kept to a minimum. Options that filter at the process level - e.g., -c, -g, -p, -u - are the most efficient selectors. Repeat mode is useful when coupled with field output (see the -F, option description) and a supervising awk or Perl script, or a C program. -R directs lsof to list the Parent Process IDentification number in the PPID column. -s [p:s] s alone directs lsof to display file size at all times. It causes the SIZE/OFF output column title to be changed to SIZE. If the file does not have a size, nothing is displayed. The optional -s p:s form is available only for selected dialects, and only when the -h or -? help output lists it. When the optional form is available, the s may be followed by a protocol name (p), either TCP or UDP, a colon (`:') and a comma-separated protocol state name list, the option causes open TCP and UDP files to be excluded if their state name(s) are in the list (s) preceded by a `^'; or included if their name(s) are not preceded by a `^'. Dialects that support this option may support only one protocol. When an unsupported protocol is specified, a message will be displayed indicating state names for the protocol are unavailable. When an inclusion list is defined, only network files with state names in the list will be present in the lsof output. Thus, specifying one state name means that only network files with that lone state name will be listed. Case is unimportant in the protocol or state names, but there may be no spaces and the colon (`:') separating the protocol name (p) and the state name list (s) is required. If only TCP and UDP files are to be listed, as controlled by the specified exclusions and inclusions, the -i option must be specified, too. If only a single protocol's files are to be listed, add its name as an argument to the -i option. For example, to list only network files with TCP state LISTEN, use: -iTCP -sTCP:LISTEN Or, for example, to list network files with all UDP states except Idle, use: -iUDP -sUDP:Idle State names vary with UNIX dialects, so it's not possible to provide a complete list. Some common TCP state names are: CLOSED, IDLE, BOUND, LISTEN, ESTABLISHED, SYN_SENT, SYN_RCDV, ESTABLISHED, CLOSE_WAIT, FIN_WAIT1, CLOSING, LAST_ACK, FIN_WAIT_2, and TIME_WAIT. Two common UDP state names are Unbound and Idle. See the lsof FAQ (The FAQ section gives its location.) for more information on how to use protocol state exclusion and inclusion, including examples. The -o (without a following decimal digit count) and -s option (without a following protocol and state name list) are mutually exclusive; they can't both be specified. When neither is specified, lsof displays whatever value - size or offset - is appropriate and available for the type of file. Since some types of files don't have true sizes - sockets, FIFOs, pipes, etc. - lsof displays for their sizes the content amounts in their associated kernel buffers, if possible. -S [t] specifies an optional time-out seconds value for kernel functions - lstat(2), readlink(2), and stat(2) - that might otherwise deadlock. The minimum for t is two; the default, fifteen; when no value is specified, the default is used. See the BLOCKS AND TIMEOUTS section for more information. -T [t] controls the reporting of some TCP/TPI information, also reported by netstat(1), following the network addresses. In normal output the information appears in parentheses, each item except TCP or TPI state name identified by a keyword, followed by `=', separated from others by a single space: <TCP or TPI state name> QR=<read queue length> QS=<send queue length> SO=<socket options and values> SS=<socket states> TF=<TCP flags and values> WR=<window read length> WW=<window write length> Not all values are reported for all UNIX dialects. Items values (when available) are reported after the item name and '='. When the field output mode is in effect (See OUTPUT FOR OTHER PROGRAMS.) each item appears as a field with a `T' leading character. -T with no following key characters disables TCP/TPI information reporting. -T with following characters selects the reporting of specific TCP/TPI information: f selects reporting of socket options, states and values, and TCP flags and values. q selects queue length reporting. s selects connection state reporting. w selects window size reporting. Not all selections are enabled for some UNIX dialects. State may be selected for all dialects and is reported by default. The -h or -? help output for the -T option will show what selections may be used with the UNIX dialect. When -T is used to select information - i.e., it is followed by one or more selection characters - the displaying of state is disabled by default, and it must be explicitly selected again in the characters following -T. (In effect, then, the default is equivalent to -Ts.) For example, if queue lengths and state are desired, use -Tqs. Socket options, socket states, some socket values, TCP flags and one TCP value may be reported (when available in the UNIX dialect) in the form of the names that commonly appear after SO_, so_, SS_, TCP_ and TF_ in the dialect's header files - most often <sys/socket.h>, <sys/socketvar.h> and <netinet/tcp_var.h>. Consult those header files for the meaning of the flags, options, states and values. ``SO='' precedes socket options and values; ``SS='', socket states; and ``TF='', TCP flags and values. If a flag or option has a value, the value will follow an '=' and the name -- e.g., ``SO=LINGER=5'', ``SO=QLIM=5'', ``TF=MSS=512''. The following seven values may be reported:
|
For a more extensive set of examples, documented more fully, see the 00QUICKSTART file of the lsof distribution. To list all open files, use: lsof To list all open Internet, x.25 (HP-UX), and UNIX domain files, use: lsof -i -U To list all open IPv4 network files in use by the process whose PID is 1234, use: lsof -i 4 -a -p 1234 Presuming the UNIX dialect supports IPv6, to list only open IPv6 network files, use: lsof -i 6 To list all files using any protocol on ports 513, 514, or 515 of host wonderland.cc.purdue.edu, use: lsof -i @wonderland.cc.purdue.edu:513-515 To list all files using any protocol on any port of mace.cc.purdue.edu (cc.purdue.edu is the default domain), use: lsof -i @mace To list all open files for login name ``abe'', or user ID 1234, or process 456, or process 123, or process 789, use: lsof -p 456,123,789 -u 1234,abe To list all open files on device /dev/hd4, use: lsof /dev/hd4 To find the process that has /u/abe/foo open, use: lsof /u/abe/foo To send a SIGHUP to the processes that have /u/abe/bar open, use: kill -HUP `lsof -t /u/abe/bar` To find any open file, including an open UNIX domain socket file, with the name /dev/log, use: lsof /dev/log To find processes with open files on the NFS file system named /nfs/mount/point whose server is inaccessible, and presuming your mount table supplies the device number for /nfs/mount/point, use: lsof -b /nfs/mount/point To do the preceding search with warning messages suppressed, use: lsof -bw /nfs/mount/point To ignore the device cache file, use: lsof -Di To obtain PID and command name field output for each process, file descriptor, file device number, and file inode number for each file of each process, use: lsof -FpcfDi To list the files at descriptors 1 and 3 of every process running the lsof command for login ID ``abe'' every 10 seconds, use: lsof -c lsof -a -d 1 -d 3 -u abe -r10 To list the current working directory of processes running a command that is exactly four characters long and has an 'o' or 'O' in character three, use this regular expression form of the -c c option: lsof -c /^..o.$/i -a -d cwd To find an IP version 4 socket file by its associated numeric dot-form address, use: lsof -i@128.210.15.17 To find an IP version 6 socket file (when the UNIX dialect supports IPv6) by its associated numeric colon-form address, use: lsof -i@[0:1:2:3:4:5:6:7] To find an IP version 6 socket file (when the UNIX dialect supports IPv6) by an associated numeric colon-form address that has a run of zeroes in it - e.g., the loop-back address - use: lsof -i@[::1] To obtain a repeat mode marker line that contains the current time, use: lsof -rm====%T==== To add spaces to the previous marker line, use: lsof -r "m==== %T ====" BUGS Since lsof reads kernel memory in its search for open files, rapid changes in kernel memory may produce unpredictable results. When a file has multiple record locks, the lock status character (following the file descriptor) is derived from a test of the first lock structure, not from any combination of the individual record locks that might be described by multiple lock structures. Lsof can't search for files with restrictive access permissions by name unless it is installed with root set-UID permission. Otherwise it is limited to searching for files to which its user or its set-GID group (if any) has access permission. The display of the destination address of a raw socket (e.g., for ping) depends on the UNIX operating system. Some dialects store the destination address in the raw socket's protocol control block, some do not. Lsof can't always represent Solaris device numbers in the same way that ls(1) does. For example, the major and minor device numbers that the lstat(2) and stat(2) functions report for the directory on which CD-ROM files are mounted (typically /cdrom) are not the same as the ones that it reports for the device on which CD-ROM files are mounted (typically /dev/sr0). (Lsof reports the directory numbers.) The support for /proc file systems is available only for BSD and Tru64 UNIX dialects, Linux, and dialects derived from SYSV R4 - e.g., FreeBSD, NetBSD, OpenBSD, Solaris, UnixWare. Some /proc file items - device number, inode number, and file size - are unavailable in some dialects. Searching for files in a /proc file system may require that the full path name be specified. No text (txt) file descriptors are displayed for Linux processes. All entries for files other than the current working directory, the root directory, and numerical file descriptors are labeled mem descriptors. Lsof can't search for Tru64 UNIX named pipes by name, because their kernel implementation of lstat(2) returns an improper device number for a named pipe. Lsof can't report fully or correctly on HP-UX 9.01, 10.20, and 11.00 locks because of insufficient access to kernel data or errors in the kernel data. See the lsof FAQ (The FAQ section gives its location.) for details. The AIX SMT file type is a fabrication. It's made up for file structures whose type (15) isn't defined in the AIX /usr/include/sys/file.h header file. One way to create such file structures is to run X clients with the DISPLAY variable set to ``:0.0''. The +|-f[cfgGn] option is not supported under /proc-based Linux lsof, because it doesn't read kernel structures from kernel memory. ENVIRONMENT Lsof may access these environment variables. LANG defines a language locale. See setlocale(3) for the names of other variables that can be used in place of LANG - e.g., LC_ALL, LC_TYPE, etc. LSOFDEVCACHE defines the path to a device cache file. See the DEVICE CACHE PATH FROM AN ENVIRONMENT VARIABLE section for more information. LSOFPERSDCPATH defines the middle component of a modified personal device cache file path. See the MODIFIED PERSONAL DEVICE CACHE PATH section for more information. FAQ Frequently-asked questions and their answers (an FAQ) are available in the 00FAQ file of the lsof distribution. That file is also available via anonymous ftp from lsof.itap.purdue.edu at pub/tools/unix/lsofFAQ. The URL is: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ FILES /dev/kmem kernel virtual memory device /dev/mem physical memory device /dev/swap system paging device .lsof_hostname lsof's device cache file (The suffix, hostname, is the first component of the host's name returned by gethostname(2).) AUTHORS Lsof was written by Victor A.Abell <abe@purdue.edu> of Purdue University. Many others have contributed to lsof. They're listed in the 00CREDITS file of the lsof distribution. DISTRIBUTION The latest distribution of lsof is available via anonymous ftp from the host lsof.itap.purdue.edu. You'll find the lsof distribution in the pub/tools/unix/lsof directory. You can also use this URL: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof Lsof is also mirrored elsewhere. When you access lsof.itap.purdue.edu and change to its pub/tools/unix/lsof directory, you'll be given a list of some mirror sites. The pub/tools/unix/lsof directory also contains a more complete list in its mirrors file. Use mirrors with caution - not all mirrors always have the latest lsof revision. Some pre-compiled Lsof executables are available on lsof.itap.purdue.edu, but their use is discouraged - it's better that you build your own from the sources. If you feel you must use a pre-compiled executable, please read the cautions that appear in the README files of the pub/tools/unix/lsof/binaries subdirectories and in the 00* files of the distribution. More information on the lsof distribution can be found in its README.lsof_<version> file. If you intend to get the lsof distribution and build it, please read README.lsof_<version> and the other 00* files of the distribution before sending questions to the author. SEE ALSO Not all the following manual pages may exist in every UNIX dialect to which lsof has been ported. access(2), awk(1), crash(1), fattach(3C), ff(1), fstat(8), fuser(1), gethostname(2), isprint(3), kill(1), localtime(3), lstat(2), modload(8), mount(8), netstat(1), ofiles(8L), perl(1), ps(1), readlink(2), setlocale(3), stat(2), strftime(3), time(2), uname(1). Revision-4.91 LSOF(8)
|
pkgutil
|
pkgutil reads and manipulates Mac OS X Installer flat packages, and provides access to the “receipt” database used by the Installer. Options are processed first, and affect the operation of all commands. Multiple commands are performed sequentially in the given order. The files and directories where receipts are stored are subject to change. Always use pkgutil to query or modify them.
|
pkgutil – Query and manipulate Mac OS X Installer packages and receipts.
|
pkgutil [options] [commands]
|
--help, -h A brief summary of commands and usage. --force, -f Don't ask for confirmation before performing a potentially destructive or ambiguous operation. --verbose, -v Output in a "human-readable" format with extra headers, footers, indentation, and other contextual information. --volume path Perform all operations on the specified volume or home directory. The root volume '/' will be used if unspecified. --edit-pkg package-id Specifies an existing receipt to be modified in-place by --learn. --only-files List only files (not directories) in --files listing. --only-dirs List only directories (not files) in --files listing. --regexp Try to match package-id arguments as a regular expression if an exact match isn't found. See egrep(1) and re_format(7) for syntax. RECEIPT DATABASE COMMANDS --packages, --pkgs List all installed package IDs on the specified --volume. --pkgs-plist List all installed package IDs on the specified --volume in Mac OS X plist(5) format. --pkgs=REGEXP List all installed package IDs matching REGEXP on the specified --volume. The equal sign (=) is required or the search string will be ignored and all package IDs will be returned. Be mindful of escaping characters in both your shell and the regular expression. (Eg, 'pkgutil --pkgs=\\.D' searches for package IDs matching the literal '.D' after escaping the backslash from your shell and then the dot from the regex to make it literal.) Regular expressions are more complex than simple shell globbing. A dot (.) matches any character, while '*' matches zero or more of the previous character. See re_format(7) for a complete description of the syntax. --files package-id List all of the files installed under the package-id. --export-plist package-id Print all receipt information about the specified package-id in the standard Mac OS X plist(5) format. --pkg-info package-id Print extended information about the specified package-id. --pkg-info-plist package-id Print extended information about the specified package-id in Mac OS X plist(5) format. --forget package-id Discard all receipt data about package-id, but do not touch the installed files. DO NOT use this command from an installer package script to fix broken package design. --learn path Update the ACLs of the given path in the receipt identified by --edit-pkg. This affects subsequent repair operations on the package. This command cannot be used from package postinstall scripts, but if a postinstall script changes the ACLs on the installed files, the receipt is automatically be updated to reflect those changes. This command will not update the filesystem permissions in the receipt. --pkg-groups package-id List all of the package groups this package-id is a member of. --groups List all of the package groups on the specified --volume. --groups-plist List all of the package groups on the specified --volume in Mac OS X plist(5) format. --group-pkgs group-id List all of the packages that are members of this group-id. --file-info path Show the metadata known about path. --file-info-plist path Show the metadata known about path in Mac OS X plist(5) format. FILE COMMANDS --expand pkg-path dir-path Expand the flat package at pkg-path into a new directory specified by dir-path. --flatten dir-path pkg-path Flatten the dir-path into a new flat package created at pkg-path. The directory to be flattened must have the proper contents and layout for a flat package. This is not intended as a substitute for pkgbuild(1). --bom path Extract any BOM files from the flat pkg at path into /tmp and return the filename(s). Suggested use is as an argument to lsbom(8). Eg, "lsbom `pkgutil --bom path`". Note that some flat package archives may contain no BOM, one BOM, or several BOMs. --payload-files path List the files archived within the payload of the uninstalled flat package(s) contained at path. This should be equivalent to "lsbom -s `pkgutil --bom path`". Note that flat package archives may contain more than one package, and the destination location for the uninstalled package(s) is unknown to this command. --check-signature pkg-path Check the validity and trust of the signature on the package at pkg-path. In addition to the status of the signature, the associated certificate chain will be shown. SEE ALSO installer(8) pkgbuild(1) productbuild(1) Mac OS X March 2, 2011 Mac OS X
| null |
slapindex
|
Slapindex is used to regenerate slapd(8) indices based upon the current contents of a database. It opens the given database determined by the database number or suffix and updates the indices for all values of all attributes of all entries. If a list of specific attributes is provided on the command line, only the indices for those attributes will be regenerated. Databases configured as subordinate of this one are also re-indexed, unless -g is specified. All files eventually created by slapindex will belong to the identity slapindex is run as, so make sure you either run slapindex with the same identity slapd(8) will be run as (see option -u in slapd(8)), or change file ownership before running slapd(8).
|
slapindex - Reindex entries in a SLAPD database
|
/usr/sbin/slapindex [-b_suffix] [-c] [-d_debug-level] [-f_slapd.conf] [-F_confdir] [-g] [-n_dbnum] [-o_option[=value]] [-q] [-t] [-v] [attr[...]]
|
-b_suffix Use the specified suffix to determine which database to generate output for. The -b cannot be used in conjunction with the -n option. -c enable continue (ignore errors) mode. -d_debug-level enable debugging messages as defined by the specified debug-level; see slapd(8) for details. -f_slapd.conf specify an alternative slapd.conf(5) file. -F_confdir specify a config directory. If both -f and -F are specified, the config file will be read and converted to config directory format and written to the specified directory. If neither option is specified, an attempt to read the default config directory will be made before trying to use the default config file. If a valid config directory exists then the default config file is ignored. -g disable subordinate gluing. Only the specified database will be processed, and not its glued subordinates (if any). -n_dbnum Generate output for the dbnum-th database listed in the configuration file. The config database slapd-config(5), is always the first database, so use -n 0 The -n cannot be used in conjunction with the -b option. -o_option[=value] Specify an option with a(n optional) value. Possible generic options/values are: syslog=<subsystems> (see `-s' in slapd(8)) syslog-level=<level> (see `-S' in slapd(8)) syslog-user=<user> (see `-l' in slapd(8)) -q enable quick (fewer integrity checks) mode. Performs no consistency checks when writing the database. Improves indexing time, however the database will most likely be unusable if any errors or interruptions occur. -t enable truncate mode. Truncates (empties) an index database before indexing any entries. May only be used with Quick mode. -v enable verbose mode. LIMITATIONS Your slapd(8) should not be running (at least, not in read-write mode) when you do this to ensure consistency of the database. This command provides ample opportunity for the user to obtain and drink their favorite beverage.
|
To reindex your SLAPD database, give the command: /usr/sbin/slapindex To regenerate the index for only a specific attribute, e.g. "uid", give the command: /usr/sbin/slapindex uid SEE ALSO ldap(3), ldif(5), slapadd(8), ldapadd(1), slapd(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.4.28 2011/11/24 SLAPINDEX(8C)
|
sc_auth
|
Configures a local user account to permit authentication using a supported SmartCard. Authentication is via asymmetric key (also known as public-key) encryption. CTK Identity CTK Identity allows to create and manipulate CryptoTokenKit identities. CryptoTokenKit identities can use non-exportable or exportable private keys. The non-exportable private key is protected by the Secure Enclave and the key never leves the Secure Enclave in open form. The exportable private key is encrypted with Elliptic Curve Encryption Standard Variable IVX963 algorithm which is backed by a Secure Enclave key. CryptoTokenKit Identities and private keys can be used for TLS authentication, email protection and SSL using ssh-keychain(8) library. Legacy Support Performs the legacy actions. COMMANDS pair [-v] -u user -h hash Associate a user with a public key. Because user's keychain will be modified to be unlockable by a key, SmartCard with that key must be present in the reader. The key to use has to be specified by its hash. -v Verbose mode -u user Specifies the user account. -h hash Specifies a public key using its hash unpair [-v] [-u user] [-h hash] Remove association with a user and keychain. If no specific hash is provided, all associations with a user are removed. -v Verbose mode -u user Specifies the user account. -h hash Specifies a public key using its hash pairing_ui [-v] [-f] [-s enable|disable|status] Enable, disable and force to display pairing dialog when card with unpaired identities is inserted. -v Verbose mode -f Force to display pairing dialog -s enable|disable|status Enable, disable or provide status for pairing dialog identities List all identities on all SmartCards and display appropriate associations with users (for associated keys) or key names (for unassociated keys). list [-v] [-u user] [-d domain] List all public keys associated with a user. -v Verbose mode -u user Specifies the user account. -d domain Specifies the directory domain containing the user account changepin [-t tokenid] [-u] Change or unblock SmartCard PIN. This command works only for Personal Identity Verification (PIV) SmartCards. -u Unblock PIN using PUK -t tokenid Specifies a token by tokenID verifypin [-t tokenid] [-p PIN] Verify SmartCard PIN. This command works only for Personal Identity Verification (PIV) SmartCards. -t tokenid Specifies a token by tokenID -p PIN Specifies SmartCard PIN enable_for_login [-c class-id] Enable the app extension for login and make the token available to the system for authentication. -c class-id Specifies a token by 'com.apple.ctk.class-id' from Info.plist filevault -o status|enable|disable [-u user] [-h hash] Manage SmartCard support for FileVault unlock. -o status|enable|disable Use status to query the status of SmartCard support for FileVault unlock for the specified user (current user by default) enable/disable to activate/deactivate SmartCard support for FileVault unlock -u user Specifies the user account. -h hash Specifies a public key using its hash COMMANDS - CTK Identity create-ctk-identity -l label -k p-256|p-384|p-521|p-256-ne|p-384-ne [-t bio|none] [-N CN] [-E emailAddress] [-U OU] [-O O] [-L L] [-S ST] [-C C] Create an CTK Identity. -l label Specifies the key label -k p-256|p-384|p-521|p-256-ne|p-384-ne Specifies the key type. The "-ne" suffix means non- exportable variant of key -t bio|none Specifies private key protection -N CN Specifies certificate Common Name. If not specified the label is used instead -E emailAddress Specifies certificate Email Address -U OU Specifies certificate Organizational Unit Name -O O Specifies certificate Organization Name -L L Specifies certificate Locality Name -S ST Specifies certificate State Or Province Name -C C Specifies certificate Country Name delete-ctk-identity -h hash Delete an CTK Identity. -h hash Specifies the identity by its public key hash delete-all-ctk-identities Delete all CTK Identities. list-ctk-identities [-t sha1|sha256 |ssh] [-e hex|b64] List all CTK identities. -t sha1|sha256|ssh Specifies used alghorithm for public key hash. SHA-1, SHA-256 and SHA-256 compatible with SSH. -e hex|b64 Specifies public key hash encoding, hexadecimal or Base64 import-ctk-identities -f fileName [-t bio|none] [-p password] Import one or more Identities from a PKCS#12 archive. -f fileName Specifies the PKCS#12 file -t bio|none Specifies private key protection. -p password Specifies password for PKCS#12 archive export-ctk-identity -h hash -f fileName [-p password] Export one CTK Identity in to the PKCS#12 archive. -h hash Specifies the CTK Identity by its public key hash -f fileName Specifies the PKCS#12 file -p password Specifies password for PKCS#12 archive create-ctk-csr -h hash -f fileName [-N CN] [-E emailAddress] [-U OU] [-O O] [-L L] [-S ST] [-C C] Create an PEM formated Certificate Signing Request (CSR) -h hash Specifies the CTK Identity by its public key hash -f fileName Specifies the CSR file -N CN Specifies certificate Common Name. If not specified the label is used instead -E emailAddress Specifies Email Address -U OU Specifies Organizational Unit Name -O O Specifies Organization Name -L L Specifies Locality Name -S ST Specifies State Or Province Name -C C Specifies Country Name import-ctk-certificate -f fileName Import an PEM formated Certificate -f fileName Specifies the certificate file name COMMANDS - Legacy Support accept [-v] [-u user] [-d domain] -k keyname -h hash Associate a user with a public key on a card. The key to use can be specified either by its name or its hash. -v Verbose mode -u user Specifies the user account. -d domain Specifies the directory domain containing the user account -k keyname Specifies a public key using its name -k hash Specifies a public key using its hash remove [-v] [-u user] [-d domain] Remove all public keys associated with a user. -v Verbose mode -u user Specifies the user account. -d domain Specifies the directory domain containing the user account hash [-k keyname] Print hashes for all keys on all inserted cards. -k keyname Specifies a public key using its name NOTES sc_auth is a shell script. It is intended to be modified by administrators to suit their local environments. sc_auth is only known to work with a local directory. Consult the script's source for some limited guidance to using remote directories. SEE ALSO SmartCardServices(7), SmartCardServices-legacy(7), pam_smartcard(8), ssh-keychain(8) MacOSX December 11, 2006 MacOSX
|
sc_auth – SmartCard authorization setup script
|
sc_auth pair [-v] -u user -h hash sc_auth unpair [-v] [-u user] [-h hash] sc_auth pairing_ui [-v] [-f] [-s enable|disable|status] sc_auth identities sc_auth list [-v] [-u user] [-d domain] sc_auth changepin [-t tokenid] [-u] sc_auth verifypin [-t tokenid] [-p PIN] sc_auth enable_for_login -c class-id sc_auth filevault -o operation [-u user] [-h hash] CTK Identity sc_auth create-ctk-identity -l label -k p-256|p-384|p-521|p-256-ne|p-384-ne [-t bio|none] [-N CN] [-E emailAddress] [-U OU] [-O O] [-L L] [-S ST] [-C C] sc_auth delete-ctk-identity -h hash sc_auth delete-all-ctk-identities sc_auth list-ctk-identities [-t sha1|sha256|ssh] [-e hex|b64] sc_auth import-ctk-identities -f fileName [-t bio|none] [-p password] sc_auth export-ctk-identity -h hash -f fileName [-p password] sc_auth create-ctk-csr -h hash -f fileName [-N CN] [-E emailAddress] [-U OU] [-O O] [-L L] [-S ST] [-C C] sc_auth import-ctk-certificate -f fileName Legacy Support sc_auth accept [-v] [-u user] [-d domain] -k keyname sc_auth accept [-v] [-u user] [-d domain] -h hash sc_auth remove [-v] [-u user] [-d domain] sc_auth hash [-k keyname]
| null | null |
ioclasscount
|
ioclasscount displays the instance counts of OSObject-based C++ classes in the kernel, incremented by the number of direct subclasses that have an instance count of at least 1. For example, if IONetworkController is not directly instantiated, but its direct subclass IOEthernetController has any instances, then IONetworkController's instance count will be at least 1; if another direct subclass such as IOFWController has any instances, then IONetworkController's instance count will be at least 2; and so on. (This modification of instance counts prevents unloading of kexts defining superclasses that have no instances, but whose subclasses in other kexts have instances.) If classes are specified, instance counts are printed as a comma- separated list in the order specified. If no classes are specified, instance counts for all classes are printed, one per line of output and sorted by name. This information is useful for tracking leaks. Instance counts can also found in the root of the IORegistry in the “IOKitDiagnostics” property. TRACKING DEVELOPMENT or DEBUG kernels support collecting backtraces on IOMemoryDescriptor mapping and wiring of memory, and, when running with boot-arg io=0x00400000, on object allocation and calls to IOMalloc*. With boot-arg io=0x02400000, capturing backtraces is enabled at startup. The following operands are available: --start Start capturing allocations. --stop Stop capturing allocations. --reset Reset any collected allocations. --track Display symbolicated allocation backtraces, with bytes allocated and number of calls accumulated per callsite, ordered by size. --maps=pid Display symbolicated backtraces for mappings created in the process with process id pid with bytes mapped and address, ordered by size. If pid is -1 all processes are displayed. --site=site When displaying backtraces, only those containing the string site are included. For example, site could be an address in the backtrace, a symbol name, or a module name. --leaks Display symbolicated allocation backtraces for potential leaks, with bytes allocated and number of calls accumulated per callsite, ordered by size. Leaks are detected by scanning kernel virtual memory for pointer references to an allocation; allocations with no references found are a potential leak. --exclude If names are given, apply the command to all tracking categories excluding these names. --size=n Only report accumulated sizes >= n bytes. The default is 1 byte. --capsize=n Only capture allocations >= n bytes. The default is 1 byte. --tag=tag Only report allocations with the vm tag tag . --zsize=n Only report allocations in the kalloc zone of size n bytes.
|
ioclasscount
|
ioclasscount [--track] [--leaks] [--maps=PID] [--site=SITE] [--reset] [--start] [--stop] [--exclude] [--size=BYTES] [--capsize=BYTES] [--tag=tag] [--zsize=BYTES] [classname] [...]
| null |
Display instance counts for IOPCIDevice and AppleTestPCI: /usr/sbin/ioclasscount IOPCIDevice AppleTestPCI IOPCIDevice = 2, AppleTestPCI = 1 Start collecting backtraces for everything: /usr/sbin/ioclasscount --start Display backtraces and allocation sizes for everything: /usr/sbin/ioclasscount --track Display all backtraces and allocation sizes collected for OSData & OSSymbol: /usr/sbin/ioclasscount --track OSData OSSymbol Display all backtraces and allocation sizes collected except for OSSymbol, IOMalloc*, IOMemoryDescriptor mapping and wiring (names from IOKitDebug.h): /usr/sbin/ioclasscount --track --exclude OSSymbol IOMalloc IOWire SEE ALSO ioalloccount(8), ioreg(8) Darwin November 6, 2008 Darwin
|
uucico
|
The uucico daemon processes file transfer requests queued by uucp (1) and uux (1). It is started when uucp or uux is run (unless they are given the -r option). It is also typically started periodically using entries in the crontab table(s). When invoked with -r1, --master, -s, --system, or -S, the daemon will place a call to a remote system, running in master mode. Otherwise the daemon will start in slave mode, accepting a call from a remote system. Typically a special login name will be set up for UUCP which automatically invokes uucico when a call is made. When uucico terminates, it invokes the uuxqt (8) daemon, unless the -q or --nouuxqt option is given; uuxqt (8) executes any work orders created by uux (1) on a remote system, and any work orders created locally which have received remote files for which they were waiting. If a call fails, uucico will normally refuse to retry the call until a certain (configurable) amount of time has passed. This may be overriden by the -f, --force, or -S option. The -l, --prompt, -e, or --loop options may be used to force uucico to produce its own prompts of "login: " and "Password:". When another daemon calls in, it will see these prompts and log in as usual. The login name and password will normally be checked against a separate list kept specially for uucico rather than the /etc/passwd file; it is possible on some systems to direct uucico to use the /etc/passwd file. The -l or --prompt option will prompt once and then exit; in this mode the UUCP administrator or the superuser may use the -u or --login option to force a login name, in which case uucico will not prompt for one. The -e or --loop option will prompt again after the first session is over; in this mode uucico will permanently control a port. If uucico receives a SIGQUIT, SIGTERM or SIGPIPE signal, it will cleanly abort any current conversation with a remote system and exit. If it receives a SIGHUP signal it will abort any current conversation, but will continue to place calls to (if invoked with -r1 or --master) and accept calls from (if invoked with -e or --loop) other systems. If it receives a SIGINT signal it will finish the current conversation, but will not place or accept any more calls.
|
uucico - UUCP file transfer daemon
|
uucico [ options ]
|
The following options may be given to uucico. -r1, --master Start in master mode (call out to a system); implied by -s, --system, or -S. If no system is specified, call any system for which work is waiting to be done. -r0, --slave Start in slave mode. This is the default. -s system, --system system Call the named system. -S system Call the named system, ignoring any required wait. This is equivalent to -s system -f. -f, --force Ignore any required wait for any systems to be called. -l, --prompt Prompt for login name and password using "login: " and "Password:". This allows uucico to be easily run from inetd (8). The login name and password are checked against the UUCP password file, which probably has no connection to the file /etc/passwd. The --login option may be used to force a login name, in which cause uucico will only prompt for a password. -p port, --port port Specify a port to call out on or to listen to. -e, --loop Enter endless loop of login/password prompts and slave mode daemon execution. The program will not stop by itself; you must use kill (1) to shut it down. -w, --wait After calling out (to a particular system when -s, --system, or -S is specifed, or to all systems which have work when just -r1 or --master is specifed), begin an endless loop as with --loop. -q, --nouuxqt Do not start the uuxqt (8) daemon when finished. -c, --quiet If no calls are permitted at this time, then don't make the call, but also do not put an error message in the log file and do not update the system status (as reported by uustat (1)). This can be convenient for automated polling scripts, which may want to simply attempt to call every system rather than worry about which particular systems may be called at the moment. This option also suppresses the log message indicating that there is no work to be done. -C, --ifwork Only call the system named by -s, --system or -S if there is work for that system. -D, --nodetach Do not detach from the controlling terminal. Normally uucico detaches from the terminal before each call out to another system and before invoking uuxqt. This option prevents this. -u name, --login name Set the login name to use instead of that of the invoking user. This option may only be used by the UUCP administrator or the superuser. If used with --prompt, this will cause uucico to prompt only for the password, not the login name. -z, --try-next If a call fails after the remote system is reached, try the next alternate rather than simply exiting. -i type, --stdin type Set the type of port to use when using standard input. The only support port type is TLI, and this is only available on machines which support the TLI networking interface. Specifying -iTLI causes uucico to use TLI calls to perform I/O. -x type, -X type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. Multiple types may be given, separated by commas, and the --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat. The debugging output is sent to the debugging file, which may be printed using uulog -D. -I file, --config file Set configuration file to use. This option may not be available, depending upon how uucico was compiled. -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO kill(1), uucp(1), uux(1), uustat(1), uuxqt(8) AUTHOR Ian Lance Taylor <ian@airs.com> Taylor UUCP 1.07 uucico(8)
| null |
firmwarepasswd
|
The firmwarepasswd command is used to add or remove firmware passwords from a system as well as check status and other options. The firmwarepasswd command requires root privileges to run. A list of flags and their descriptions: -setpasswd Prompts to add a new firmware password or change and existing password if one exists. -setmode mode [-allow-oroms] Set the mode to "command" or "full". "Command" will prompt for the firmware password if the user attempts to boot from a different volume. "Full" will prompt on every startup (not recommended). Optional "allow-oroms" flag will permit option roms execution, that is denied by default once firmware password is set. -mode Displays the current mode if one is set. -check Displays whether or not a firmware password is set. -delete Prompts for password and clears both password and the mode if correct. -verify Prompts for password and displays success if correct. -unlockseed Generates a firmware password recovery key. Note: Machine must be stable for this command to generate a valid seed. No pending changes that need a restart. NOTE: Seed is only valid until the next time a firmware password command runs. -disable-reset-capability Disables firmware password reset using unlockseed. -enable-reset-capability Enables firmware password reset using unlockseed. -h Displays a list of all the commands available in the firmwarepasswd tool, with explanatory information. FILES /usr/sbin/firmwarepasswd OS X April 19, 2019 OS X
|
firmwarepasswd – tool for setting and removing firmware passwords on a system
|
firmwarepasswd [-setpasswd] [-setmode mode [-allow-oroms]] [-mode] [-check] [-delete] [-verify] [-unlockseed] [-disable-reset-capability] [-enable-reset-capability] [-h]
| null | null |
rarpd
|
Rarpd services Reverse ARP requests on the Ethernet connected to interface. Upon receiving a request, rarpd maps the target hardware address to an IP address via its name, which must be present in both the ethers(5) and hosts(5) databases. If a host does not exist in both databases, the translation cannot proceed and a reply will not be sent. Additionally, a request is honored only if the server (i.e., the host that rarpd is running on) can "boot" the target; that is, if the directory /tftpboot/ipaddr exists, where is the target IP address. In normal operation, rarpd forks a copy of itself and runs in the background. Anomalies and errors are reported via syslog(3).
|
rarpd – Reverse ARP Daemon
|
rarpd [-adf] [interface]
|
-a Listen on all the Ethernets attached to the system. If ‘-a’ is omitted, an interface must be specified. -d Run in debug mode, with all the output to stderr. This option implies the -f option. -f Run in the foreground. FILES /etc/ethers /etc/hosts /tftpboot SEE ALSO bpf(4), Finlayson, R., Mann, T., Mogul, J.C., and Theimer, M., A Reverse Address Resolution Protocol, RFC 903. AUTHORS Craig Leres (leres@ee.lbl.gov) and Steven McCanne (mccanne@ee.lbl.gov). Lawrence Berkeley Laboratory, University of California, Berkeley, CA. October 26, 1990
| null |
tsig-keygen
|
tsig-keygen and ddns-confgen are invocation methods for a utility that generates keys for use in TSIG signing. The resulting keys can be used, for example, to secure dynamic DNS updates to a zone or for the rndc command channel. When run as tsig-keygen, a domain name can be specified on the command line which will be used as the name of the generated key. If no name is specified, the default is tsig-key. When run as ddns-confgen, the generated key is accompanied by configuration text and instructions that can be used with nsupdate and named when setting up dynamic DNS, including an example update-policy statement. (This usage similar to the rndc-confgen command for setting up command channel security.) Note that named itself can configure a local DDNS key for use with nsupdate -l: it does this when a zone is configured with update-policy local;. ddns-confgen is only needed when a more elaborate configuration is required: for instance, if nsupdate is to be used from a remote system.
|
ddns-confgen - ddns key generation tool
|
tsig-keygen [-a algorithm] [-h] [-r randomfile] [name] ddns-confgen [-a algorithm] [-h] [-k keyname] [-q] [-r randomfile] [-s name | -z zone]
|
-a algorithm Specifies the algorithm to use for the TSIG key. Available choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and hmac-sha512. The default is hmac-sha256. Options are case-insensitive, and the "hmac-" prefix may be omitted. -h Prints a short summary of options and arguments. -k keyname Specifies the key name of the DDNS authentication key. The default is ddns-key when neither the -s nor -z option is specified; otherwise, the default is ddns-key as a separate label followed by the argument of the option, e.g., ddns-key.example.com. The key name must have the format of a valid domain name, consisting of letters, digits, hyphens and periods. -q (ddns-confgen only.) Quiet mode: Print only the key, with no explanatory text or usage examples; This is essentially identical to tsig-keygen. -r randomfile Specifies a source of random data for generating the authorization. If the operating system does not provide a /dev/random or equivalent device, the default source of randomness is keyboard input. randomdev specifies the name of a character device or file containing random data to be used instead of the default. The special value keyboard indicates that keyboard input should be used. -s name (ddns-confgen only.) Generate configuration example to allow dynamic updates of a single hostname. The example named.conf text shows how to set an update policy for the specified name using the "name" nametype. The default key name is ddns-key.name. Note that the "self" nametype cannot be used, since the name to be updated may differ from the key name. This option cannot be used with the -z option. -z zone (ddns-confgen only.) Generate configuration example to allow dynamic updates of a zone: The example named.conf text shows how to set an update policy for the specified zone using the "zonesub" nametype, allowing updates to all subdomain names within that zone. This option cannot be used with the -s option. SEE ALSO nsupdate(1), named.conf(5), named(8), BIND 9 Administrator Reference Manual. AUTHOR Internet Systems Consortium, Inc. COPYRIGHT Copyright © 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC") ISC 2014-03-06 DDNS-CONFGEN(8)
| null |
kadmin.local
|
kadmin and kadmin.local are command-line interfaces to the Kerberos V5 administration system. They provide nearly identical functionalities; the difference is that kadmin.local directly accesses the KDC database, while kadmin performs operations using kadmind(8). Except as explicitly noted otherwise, this man page will use "kadmin" to refer to both versions. kadmin provides for the maintenance of Kerberos principals, password policies, and service key tables (keytabs). The remote kadmin client uses Kerberos to authenticate to kadmind using the service principal kadmin/admin or kadmin/ADMINHOST (where ADMINHOST is the fully-qualified hostname of the admin server). If the credentials cache contains a ticket for one of these principals, and the -c credentials_cache option is specified, that ticket is used to authenticate to kadmind. Otherwise, the -p and -k options are used to specify the client Kerberos principal name used to authenticate. Once kadmin has determined the principal name, it requests a service ticket from the KDC, and uses that service ticket to authenticate to kadmind. Since kadmin.local directly accesses the KDC database, it usually must be run directly on the primary KDC with sufficient permissions to read the KDC database. If the KDC database uses the LDAP database module, kadmin.local can be run on any host which can access the LDAP server.
|
kadmin - Kerberos V5 database administration program
|
kadmin [-O|-N] [-r realm] [-p principal] [-q query] [[-c cache_name]|[-k [-t keytab]]|-n] [-w password] [-s admin_server[:port]] [command args...] kadmin.local [-r realm] [-p principal] [-q query] [-d dbname] [-e enc:salt ...] [-m] [-x db_args] [command args...]
|
-r realm Use realm as the default database realm. -p principal Use principal to authenticate. Otherwise, kadmin will append /admin to the primary principal name of the default ccache, the value of the USER environment variable, or the username as obtained with getpwuid, in order of preference. -k Use a keytab to decrypt the KDC response instead of prompting for a password. In this case, the default principal will be host/hostname. If there is no keytab specified with the -t option, then the default keytab will be used. -t keytab Use keytab to decrypt the KDC response. This can only be used with the -k option. -n Requests anonymous processing. Two types of anonymous principals are supported. For fully anonymous Kerberos, configure PKINIT on the KDC and configure pkinit_anchors in the client's krb5.conf(5). Then use the -n option with a principal of the form @REALM (an empty principal name followed by the at-sign and a realm name). If permitted by the KDC, an anonymous ticket will be returned. A second form of anonymous tickets is supported; these realm-exposed tickets hide the identity of the client but not the client's realm. For this mode, use kinit -n with a normal principal name. If supported by the KDC, the principal (but not realm) will be replaced by the anonymous principal. As of release 1.8, the MIT Kerberos KDC only supports fully anonymous operation. -c credentials_cache Use credentials_cache as the credentials cache. The cache should contain a service ticket for the kadmin/admin or kadmin/ADMINHOST (where ADMINHOST is the fully-qualified hostname of the admin server) service; it can be acquired with the kinit(1) program. If this option is not specified, kadmin requests a new service ticket from the KDC, and stores it in its own temporary ccache. -w password Use password instead of prompting for one. Use this option with care, as it may expose the password to other users on the system via the process list. -q query Perform the specified query and then exit. -d dbname Specifies the name of the KDC database. This option does not apply to the LDAP database module. -s admin_server[:port] Specifies the admin server which kadmin should contact. -m If using kadmin.local, prompt for the database master password instead of reading it from a stash file. -e "enc:salt ..." Sets the keysalt list to be used for any new keys created. See Keysalt_lists in kdc.conf(5) for a list of possible values. -O Force use of old AUTH_GSSAPI authentication flavor. -N Prevent fallback to AUTH_GSSAPI authentication flavor. -x db_args Specifies the database specific arguments. See the next section for supported options. Starting with release 1.14, if any command-line arguments remain after the options, they will be treated as a single query to be executed. This mode of operation is intended for scripts and behaves differently from the interactive mode in several respects: • Query arguments are split by the shell, not by kadmin. • Informational and warning messages are suppressed. Error messages and query output (e.g. for get_principal) will still be displayed. • Confirmation prompts are disabled (as if -force was given). Password prompts will still be issued as required. • The exit status will be non-zero if the query fails. The -q option does not carry these behavior differences; the query will be processed as if it was entered interactively. The -q option cannot be used in combination with a query in the remaining arguments. DATABASE OPTIONS Database options can be used to override database-specific defaults. Supported options for the DB2 module are: -x dbname=*filename* Specifies the base filename of the DB2 database. -x lockiter Make iteration operations hold the lock for the duration of the entire operation, rather than temporarily releasing the lock while handling each principal. This is the default behavior, but this option exists to allow command line override of a [dbmodules] setting. First introduced in release 1.13. -x unlockiter Make iteration operations unlock the database for each principal, instead of holding the lock for the duration of the entire operation. First introduced in release 1.13. Supported options for the LDAP module are: -x host=ldapuri Specifies the LDAP server to connect to by a LDAP URI. -x binddn=bind_dn Specifies the DN used to bind to the LDAP server. -x bindpwd=password Specifies the password or SASL secret used to bind to the LDAP server. Using this option may expose the password to other users on the system via the process list; to avoid this, instead stash the password using the stashsrvpw command of kdb5_ldap_util(8). -x sasl_mech=mechanism Specifies the SASL mechanism used to bind to the LDAP server. The bind DN is ignored if a SASL mechanism is used. New in release 1.13. -x sasl_authcid=name Specifies the authentication name used when binding to the LDAP server with a SASL mechanism, if the mechanism requires one. New in release 1.13. -x sasl_authzid=name Specifies the authorization name used when binding to the LDAP server with a SASL mechanism. New in release 1.13. -x sasl_realm=realm Specifies the realm used when binding to the LDAP server with a SASL mechanism, if the mechanism uses one. New in release 1.13. -x debug=level sets the OpenLDAP client library debug level. level is an integer to be interpreted by the library. Debugging messages are printed to standard error. New in release 1.12. COMMANDS When using the remote client, available commands may be restricted according to the privileges specified in the kadm5.acl(5) file on the admin server. add_principal add_principal [options] newprinc Creates the principal newprinc, prompting twice for a password. If no password policy is specified with the -policy option, and the policy named default is assigned to the principal if it exists. However, creating a policy named default will not automatically assign this policy to previously existing principals. This policy assignment can be suppressed with the -clearpolicy option. This command requires the add privilege. Aliases: addprinc, ank Options: -expire expdate (getdate string) The expiration date of the principal. -pwexpire pwexpdate (getdate string) The password expiration date. -maxlife maxlife (duration or getdate string) The maximum ticket life for the principal. -maxrenewlife maxrenewlife (duration or getdate string) The maximum renewable life of tickets for the principal. -kvno kvno The initial key version number. -policy policy The password policy used by this principal. If not specified, the policy default is used if it exists (unless -clearpolicy is specified). -clearpolicy Prevents any policy from being assigned when -policy is not specified. {-|+}allow_postdated -allow_postdated prohibits this principal from obtaining postdated tickets. +allow_postdated clears this flag. {-|+}allow_forwardable -allow_forwardable prohibits this principal from obtaining forwardable tickets. +allow_forwardable clears this flag. {-|+}allow_renewable -allow_renewable prohibits this principal from obtaining renewable tickets. +allow_renewable clears this flag. {-|+}allow_proxiable -allow_proxiable prohibits this principal from obtaining proxiable tickets. +allow_proxiable clears this flag. {-|+}allow_dup_skey -allow_dup_skey disables user-to-user authentication for this principal by prohibiting others from obtaining a service ticket encrypted in this principal's TGT session key. +allow_dup_skey clears this flag. {-|+}requires_preauth +requires_preauth requires this principal to preauthenticate before being allowed to kinit. -requires_preauth clears this flag. When +requires_preauth is set on a service principal, the KDC will only issue service tickets for that service principal if the client's initial authentication was performed using preauthentication. {-|+}requires_hwauth +requires_hwauth requires this principal to preauthenticate using a hardware device before being allowed to kinit. -requires_hwauth clears this flag. When +requires_hwauth is set on a service principal, the KDC will only issue service tickets for that service principal if the client's initial authentication was performed using a hardware device to preauthenticate. {-|+}ok_as_delegate +ok_as_delegate sets the okay as delegate flag on tickets issued with this principal as the service. Clients may use this flag as a hint that credentials should be delegated when authenticating to the service. -ok_as_delegate clears this flag. {-|+}allow_svr -allow_svr prohibits the issuance of service tickets for this principal. In release 1.17 and later, user-to-user service tickets are still allowed unless the -allow_dup_skey flag is also set. +allow_svr clears this flag. {-|+}allow_tgs_req -allow_tgs_req specifies that a Ticket-Granting Service (TGS) request for a service ticket for this principal is not permitted. +allow_tgs_req clears this flag. {-|+}allow_tix -allow_tix forbids the issuance of any tickets for this principal. +allow_tix clears this flag. {-|+}needchange +needchange forces a password change on the next initial authentication to this principal. -needchange clears this flag. {-|+}password_changing_service +password_changing_service marks this principal as a password change service principal. {-|+}ok_to_auth_as_delegate +ok_to_auth_as_delegate allows this principal to acquire forwardable tickets to itself from arbitrary users, for use with constrained delegation. {-|+}no_auth_data_required +no_auth_data_required prevents PAC or AD-SIGNEDPATH data from being added to service tickets for the principal. {-|+}lockdown_keys +lockdown_keys prevents keys for this principal from leaving the KDC via kadmind. The chpass and extract operations are denied for a principal with this attribute. The chrand operation is allowed, but will not return the new keys. The delete and rename operations are also denied if this attribute is set, in order to prevent a malicious administrator from replacing principals like krbtgt/* or kadmin/* with new principals without the attribute. This attribute can be set via the network protocol, but can only be removed using kadmin.local. -randkey Sets the key of the principal to a random value. -nokey Causes the principal to be created with no key. New in release 1.12. -pw password Sets the password of the principal to the specified string and does not prompt for a password. Note: using this option in a shell script may expose the password to other users on the system via the process list. -e enc:salt,... Uses the specified keysalt list for setting the keys of the principal. See Keysalt_lists in kdc.conf(5) for a list of possible values. -x db_princ_args Indicates database-specific options. The options for the LDAP database module are: -x dn=dn Specifies the LDAP object that will contain the Kerberos principal being created. -x linkdn=dn Specifies the LDAP object to which the newly created Kerberos principal object will point. -x containerdn=container_dn Specifies the container object under which the Kerberos principal is to be created. -x tktpolicy=policy Associates a ticket policy to the Kerberos principal. NOTE: • The containerdn and linkdn options cannot be specified with the dn option. • If the dn or containerdn options are not specified while adding the principal, the principals are created under the principal container configured in the realm or the realm container. • dn and containerdn should be within the subtrees or principal container configured in the realm. Example: kadmin: addprinc jennifer No policy specified for "jennifer@ATHENA.MIT.EDU"; defaulting to no policy. Enter password for principal jennifer@ATHENA.MIT.EDU: Re-enter password for principal jennifer@ATHENA.MIT.EDU: Principal "jennifer@ATHENA.MIT.EDU" created. kadmin: modify_principal modify_principal [options] principal Modifies the specified principal, changing the fields as specified. The options to add_principal also apply to this command, except for the -randkey, -pw, and -e options. In addition, the option -clearpolicy will clear the current policy of a principal. This command requires the modify privilege. Alias: modprinc Options (in addition to the addprinc options): -unlock Unlocks a locked principal (one which has received too many failed authentication attempts without enough time between them according to its password policy) so that it can successfully authenticate. rename_principal rename_principal [-force] old_principal new_principal Renames the specified old_principal to new_principal. This command prompts for confirmation, unless the -force option is given. This command requires the add and delete privileges. Alias: renprinc delete_principal delete_principal [-force] principal Deletes the specified principal from the database. This command prompts for deletion, unless the -force option is given. This command requires the delete privilege. Alias: delprinc change_password change_password [options] principal Changes the password of principal. Prompts for a new password if neither -randkey or -pw is specified. This command requires the changepw privilege, or that the principal running the program is the same as the principal being changed. Alias: cpw The following options are available: -randkey Sets the key of the principal to a random value. -pw password Set the password to the specified string. Using this option in a script may expose the password to other users on the system via the process list. -e enc:salt,... Uses the specified keysalt list for setting the keys of the principal. See Keysalt_lists in kdc.conf(5) for a list of possible values. -keepold Keeps the existing keys in the database. This flag is usually not necessary except perhaps for krbtgt principals. Example: kadmin: cpw systest Enter password for principal systest@BLEEP.COM: Re-enter password for principal systest@BLEEP.COM: Password for systest@BLEEP.COM changed. kadmin: purgekeys purgekeys [-all|-keepkvno oldest_kvno_to_keep] principal Purges previously retained old keys (e.g., from change_password -keepold) from principal. If -keepkvno is specified, then only purges keys with kvnos lower than oldest_kvno_to_keep. If -all is specified, then all keys are purged. The -all option is new in release 1.12. This command requires the modify privilege. get_principal get_principal [-terse] principal Gets the attributes of principal. With the -terse option, outputs fields as quoted tab-separated strings. This command requires the inquire privilege, or that the principal running the the program to be the same as the one being listed. Alias: getprinc Examples: kadmin: getprinc tlyu/admin Principal: tlyu/admin@BLEEP.COM Expiration date: [never] Last password change: Mon Aug 12 14:16:47 EDT 1996 Password expiration date: [never] Maximum ticket life: 0 days 10:00:00 Maximum renewable life: 7 days 00:00:00 Last modified: Mon Aug 12 14:16:47 EDT 1996 (bjaspan/admin@BLEEP.COM) Last successful authentication: [never] Last failed authentication: [never] Failed password attempts: 0 Number of keys: 1 Key: vno 1, aes256-cts-hmac-sha384-192 MKey: vno 1 Attributes: Policy: [none] kadmin: getprinc -terse systest systest@BLEEP.COM 3 86400 604800 1 785926535 753241234 785900000 tlyu/admin@BLEEP.COM 786100034 0 0 kadmin: list_principals list_principals [expression] Retrieves all or some principal names. expression is a shell-style glob expression that can contain the wild-card characters ?, *, and []. All principal names matching the expression are printed. If no expression is provided, all principal names are printed. If the expression does not contain an @ character, an @ character followed by the local realm is appended to the expression. This command requires the list privilege. Alias: listprincs, get_principals, getprincs Example: kadmin: listprincs test* test3@SECURE-TEST.OV.COM test2@SECURE-TEST.OV.COM test1@SECURE-TEST.OV.COM testuser@SECURE-TEST.OV.COM kadmin: get_strings get_strings principal Displays string attributes on principal. This command requires the inquire privilege. Alias: getstrs set_string set_string principal name value Sets a string attribute on principal. String attributes are used to supply per-principal configuration to the KDC and some KDC plugin modules. The following string attribute names are recognized by the KDC: require_auth Specifies an authentication indicator which is required to authenticate to the principal as a service. Multiple indicators can be specified, separated by spaces; in this case any of the specified indicators will be accepted. (New in release 1.14.) session_enctypes Specifies the encryption types supported for session keys when the principal is authenticated to as a server. See Encryption_types in kdc.conf(5) for a list of the accepted values. otp Enables One Time Passwords (OTP) preauthentication for a client principal. The value is a JSON string representing an array of objects, each having optional type and username fields. pkinit_cert_match Specifies a matching expression that defines the certificate attributes required for the client certificate used by the principal during PKINIT authentication. The matching expression is in the same format as those used by the pkinit_cert_match option in krb5.conf(5). (New in release 1.16.) This command requires the modify privilege. Alias: setstr Example: set_string host/foo.mit.edu session_enctypes aes128-cts set_string user@FOO.COM otp "[{""type"":""hotp"",""username"":""al""}]" del_string del_string principal key Deletes a string attribute from principal. This command requires the delete privilege. Alias: delstr add_policy add_policy [options] policy Adds a password policy named policy to the database. This command requires the add privilege. Alias: addpol The following options are available: -maxlife time (duration or getdate string) Sets the maximum lifetime of a password. -minlife time (duration or getdate string) Sets the minimum lifetime of a password. -minlength length Sets the minimum length of a password. -minclasses number Sets the minimum number of character classes required in a password. The five character classes are lower case, upper case, numbers, punctuation, and whitespace/unprintable characters. -history number Sets the number of past keys kept for a principal. This option is not supported with the LDAP KDC database module. -maxfailure maxnumber Sets the number of authentication failures before the principal is locked. Authentication failures are only tracked for principals which require preauthentication. The counter of failed attempts resets to 0 after a successful attempt to authenticate. A maxnumber value of 0 (the default) disables lockout. -failurecountinterval failuretime (duration or getdate string) Sets the allowable time between authentication failures. If an authentication failure happens after failuretime has elapsed since the previous failure, the number of authentication failures is reset to 1. A failuretime value of 0 (the default) means forever. -lockoutduration lockouttime (duration or getdate string) Sets the duration for which the principal is locked from authenticating if too many authentication failures occur without the specified failure count interval elapsing. A duration of 0 (the default) means the principal remains locked out until it is administratively unlocked with modprinc -unlock. -allowedkeysalts Specifies the key/salt tuples supported for long-term keys when setting or changing a principal's password/keys. See Keysalt_lists in kdc.conf(5) for a list of the accepted values, but note that key/salt tuples must be separated with commas (',') only. To clear the allowed key/salt policy use a value of '-'. Example: kadmin: add_policy -maxlife "2 days" -minlength 5 guests kadmin: modify_policy modify_policy [options] policy Modifies the password policy named policy. Options are as described for add_policy. This command requires the modify privilege. Alias: modpol delete_policy delete_policy [-force] policy Deletes the password policy named policy. Prompts for confirmation before deletion. The command will fail if the policy is in use by any principals. This command requires the delete privilege. Alias: delpol Example: kadmin: del_policy guests Are you sure you want to delete the policy "guests"? (yes/no): yes kadmin: get_policy get_policy [ -terse ] policy Displays the values of the password policy named policy. With the -terse flag, outputs the fields as quoted strings separated by tabs. This command requires the inquire privilege. Alias: getpol Examples: kadmin: get_policy admin Policy: admin Maximum password life: 180 days 00:00:00 Minimum password life: 00:00:00 Minimum password length: 6 Minimum number of password character classes: 2 Number of old keys kept: 5 Reference count: 17 kadmin: get_policy -terse admin admin 15552000 0 6 2 5 17 kadmin: The "Reference count" is the number of principals using that policy. With the LDAP KDC database module, the reference count field is not meaningful. list_policies list_policies [expression] Retrieves all or some policy names. expression is a shell-style glob expression that can contain the wild-card characters ?, *, and []. All policy names matching the expression are printed. If no expression is provided, all existing policy names are printed. This command requires the list privilege. Aliases: listpols, get_policies, getpols. Examples: kadmin: listpols test-pol dict-only once-a-min test-pol-nopw kadmin: listpols t* test-pol test-pol-nopw kadmin: ktadd ktadd [options] principal ktadd [options] -glob princ-exp Adds a principal, or all principals matching princ-exp, to a keytab file. Each principal's keys are randomized in the process. The rules for princ-exp are described in the list_principals command. This command requires the inquire and changepw privileges. With the -glob form, it also requires the list privilege. The options are: -k[eytab] keytab Use keytab as the keytab file. Otherwise, the default keytab is used. -e enc:salt,... Uses the specified keysalt list for setting the new keys of the principal. See Keysalt_lists in kdc.conf(5) for a list of possible values. -q Display less verbose information. -norandkey Do not randomize the keys. The keys and their version numbers stay unchanged. This option cannot be specified in combination with the -e option. An entry for each of the principal's unique encryption types is added, ignoring multiple keys with the same encryption type but different salt types. Alias: xst Example: kadmin: ktadd -k /tmp/foo-new-keytab host/foo.mit.edu Entry for principal host/foo.mit.edu@ATHENA.MIT.EDU with kvno 3, encryption type aes256-cts-hmac-sha1-96 added to keytab FILE:/tmp/foo-new-keytab kadmin: ktremove ktremove [options] principal [kvno | all | old] Removes entries for the specified principal from a keytab. Requires no permissions, since this does not require database access. If the string "all" is specified, all entries for that principal are removed; if the string "old" is specified, all entries for that principal except those with the highest kvno are removed. Otherwise, the value specified is parsed as an integer, and all entries whose kvno match that integer are removed. The options are: -k[eytab] keytab Use keytab as the keytab file. Otherwise, the default keytab is used. -q Display less verbose information. Alias: ktrem Example: kadmin: ktremove kadmin/admin all Entry for principal kadmin/admin with kvno 3 removed from keytab FILE:/etc/krb5.keytab kadmin: lock Lock database exclusively. Use with extreme caution! This command only works with the DB2 KDC database module. unlock Release the exclusive database lock. list_requests Lists available for kadmin requests. Aliases: lr, ? quit Exit program. If the database was locked, the lock is released. Aliases: exit, q HISTORY The kadmin program was originally written by Tom Yu at MIT, as an interface to the OpenVision Kerberos administration program. ENVIRONMENT See kerberos(7) for a description of Kerberos environment variables. SEE ALSO kpasswd(1), kadmind(8), kerberos(7) AUTHOR MIT COPYRIGHT 1985-2022, MIT 1.20.1 KADMIN(1)
| null |
syslogd
|
The syslogd server receives and processes log messages. Several modules receive input messages through various channels, including UNIX domain sockets associated with the syslog(3), asl(3), and kernel printf APIs, and optionally on a UDP socket from network clients. The Apple System Log facility comprises the asl(3) API, a new syslogd server, the syslog(1) command-line utility, and a data store file manager, aslmanager(8). The system supports structured and extensible messages, permitting advanced message browsing and management through search APIs and other components of the Apple system log facility. Log messages are retained in a data store, subject to automatic archival, and input filtering as described below, to simplify the task of locating log messages and to facilitate browsing and searching. The data store is intended to become a replacement for the numerous log files that are currently found in various locations on the system. Those files will be phased out in future versions of Mac OS. The following options are recognized: -d Run syslogd in debugging mode. The server stays attached to the controlling terminal and prints debugging messages. -D Start as a daemon. This option forces syslogd to fork and have the child process become a daemon. Since syslogd is started by launchd, this is not normally required. -m Set the number of minutes between “mark” messages. Mark messages are normally disabled. If -m is specified with no arguments, mark messages will be written every 20 minutes. The “mark” facility is disabled if the setting is zero minutes. -db_max Sets the size limit in bytes for individual files in the data store. The default value for -db_max is 25600000 bytes. Files are closed upon reaching the maximum size, and a new file is opened for subsequent messages. -utmp_ttl Sets the time-to-live in seconds for messages used by the utmp(5), wtmp(5), and lastlog(5) subsystems. The default is 31622400 seconds (approximately 1 year). Note that if archival is enabled (see the aslmanager(8) manual), these messages will be copied to an archive after the regular time- to-live interval, but will persist in the data store until their own expiry time. -mps_limit Sets the kernel quota for messages per second allowed by syslogd. Any messages in excess of the quota limit from any process are ignored. An error message is logged stating that the kernel message quota has been exceeded, and that remaining messages for the current second will be discarded. The default limit is 500 messages per second per process. A value of 0 turns off the quota mechanism. Note that this setting only limits the number of kernel messages that will be saved by syslogd. User processes are limited to 36000 messages per hour. The limit for a user process is not enforced if a remote-control ASL filter is in place for the process. -dup_delay Sets the time to delay for coalescing duplicate message in log files. If a process logs multiple messages with the same text, syslogd will wait for the specified period of time to coalesce duplicates. If identical messages arrive during this interval, syslogd will print a message of the form: May 7 12:34:56: --- last message repeated 17 times --- The default delay time is 30 seconds. Setting the value to 0 disables the coalescing mechanism. The remaining options of the form -module_name {0|1} may be used to disable (0) or enable (1) the action of several of syslogd 's internal modules. -asl_in The “asl_in” module receives log messages on the UNIX domain socket associated with the asl(3) API. The module may be disabled using -asl_in 0. The module is normally enabled. -asl_action The “asl_action” module examines the stream of received log messages and acts upon them according to the rules specified in the file /etc/asl.conf. See asl.conf(5) for details. -klog_in The “klog_in” module receives log messages on the UNIX domain socket associated with the kernel logging API. The module may be disabled using -klog_in 0. The module is normally enabled. -bsd_out The “bsd_out” module examines the stream of received log messages and acts upon them according to the rules specified in the file /etc/syslog.conf. See syslog.conf(5) for details. This module exists for backward compatibility with previous syslogd implementations. Apple encourages use of the syslog(1) and asl(3) search APIs over the use of the log files that are specified in the /etc/syslog.conf file. Future versions of Mac OS will move functions that are currently handled by the “bsd_out” module to the “asl_action” module. -udp_in The “udp_in” module receives log messages on the UDP socket associated with the Internet syslog message protocol. This module is normally enabled, but is inactive. The actual UDP sockets are managed by launchd, and configured in the syslogd configuration file /System/Library/LaunchDaemons/com.apple.syslogd.plist. In the default configuration, launchd does not open any sockets for the “syslog” UDP service, so no sockets are provided to the “udp_in” module. If no sockets are provided, the module remains inactive. A socket may be specified by adding the following entry to the “Sockets” dictionary in the com.apple.syslogd.plist file. <key>NetworkListener</key> <dict> <key>SockServiceName</key> <string>syslog</string> <key>SockType</key> <string>dgram</string> </dict> The module may be specifically disabled using the -udp_in 0 option. syslogd reinitializes in response to a HUP signal. MESSAGE EXPIRY AND ARCHIVAL syslogd periodically invokes the aslmanager utility, which manages files in the ASL data store. Files are removed or optionally copied to an archival directory after a (default) 2 day time-to-live. See the aslmanager(8) manual for details. syslogd invokes aslmanager shortly after it starts up, at midnight local time if it is running, and any time that a data store file reaches the -db_max size limit. DATA STORE SECURITY Messages saved in the ASL message store are written to files in /var/log/asl. The message files are given read access controls corresponding to the read UID and GID specified in the messages themselves. Read access UID and GID settings may be attached to messages using the asl(3) library by setting a value for the "ReadUID" and/or "ReadGID" message keys. The file permissions prevent access-controlled messages from being read by unauthorized users. Although clients are generally free to use any value for the "Facility" message key, only processes running with UID 0 may log messages with a facility value of "com.apple.system", or with a value that has "com.apple.system" as a prefix. Messages logged by non UID 0 processes that use "com.apple.system" as a facility value or prefix will be saved with the facility value "user". FILES /etc/syslog.conf bsd_out module configuration file /etc/asl.conf asl_action module configuration file /var/run/syslog.pid process ID file /dev/klog kernel log device /var/log/asl data store directory /var/log/asl.archive default archive directory /System/Library/LaunchDaemons/com.apple.syslogd.plist launchd configuration file for syslogd SEE ALSO logger(1), syslog(1), asl(3), syslog(3), asl.conf(5), syslog.conf(5) HISTORY The syslogd utility appeared in 4.3BSD. The Apple System Log facility was introduced in Mac OS X 10.4. macOS October 18, 2004 macOS
|
syslogd – Apple System Log server
|
syslogd [-d] [-D] [-m mark_interval] [-l lib_path] [-db_max size] [-utmp_ttl time] [-mps_limit quota] [-dup_delay time] [-module_name {0|1}]
| null | null |
taskpolicy
|
The taskpolicy program uses the setiopolicy_np(3) and setpriority(2) APIs to execute a program with altered I/O or scheduling policies. All children of the specified program also inherit these policies. taskpolicy accepts the following flags and arguments: -d policy Run the program after calling setiopolicy_np(3) with an iotype of IOPOL_TYPE_DISK, a scope of IOPOL_SCOPE_PROCESS, and the specified policy. The argument can either be an integer, or a symbolic string like "default" or "throttle", which is interpreted case- insensitively. -g policy Run the program after calling setiopolicy_np(3) with an iotype of IOPOL_TYPE_DISK, a scope of IOPOL_SCOPE_DARWIN_BG, and the specified policy. The argument is interpreted in the same manner as -d. -c clamp Run the program using the specified QoS clamp. The argument can be either "utility", "background", or "maintenance", which is interpreted case-insensitively. -p pid Change settings for the process specified by pid. -b Run the program after calling setpriority(2) with a priority of PRIO_DARWIN_BG. -B Move target process out of PRIO_DARWIN_BG. -t Set throughput tier of the process to thruput_tier. -l Set latency tier of the process to latency_tier. -a Run the program with the resource management policies given to applications. -s Run the program with an initial suspended state by calling posix_spawnattr_setflags(3) with POSIX_SPAWN_START_SUSPENDED. SEE ALSO setpriority(2), posix_spawnattr_setflags(3), setiopolicy_np(3) Darwin February 21, 2013 Darwin
|
taskpolicy – execute a program with an altered I/O or scheduling policy or change settings of already running process
|
taskpolicy [-d policy] [-g policy] [-c clamp] [-b] [-t thruput_tier] [-l latency_tier] [-a] [-s] program [arg1 [...]] taskpolicy [-b|-B] [-t thruput_tier] [-l latency_tier] [-p pid]
| null | null |
BTLEServerAgent
|
BTLEServerAgent is a process that handles Bluetooth LE features. SEE ALSO BTLEServer Darwin 3/7/16 Darwin
|
BTLEServerAgent
|
BTLEServerAgent
| null | null |
filecoordinationd
|
filecoordinationd is used by the Foundation framework's NSFileCoordinator class to coordinate access to files by multiple processes, and to message registered NSFilePresenters. There are no configuration options to filecoordinationd. Users should not run filecoordinationd manually. Mac OS X March 15, 2011 Mac OS X
|
filecoordinationd – system-wide file access coordination
|
filecoordinationd
| null | null |
dot_clean
|
For each dir, dot_clean recursively merges all ._* files with their corresponding native files according to the rules specified with the given arguments. By default, if there is an attribute on the native file that is also present in the ._ file, the most recent attribute will be used. If no operands are given, a usage message is output. If more than one directory is given, directories are merged in the order in which they are specified.
|
dot_clean – Merge ._* files with corresponding native files.
|
dot_clean [-fmnsv] [--keep=[mostrecent|dotbar|native]] [dir ...]
|
-f Flat merge. Do not recursively merge all directories in the given dir. This is off by default. -h Help. Prints verbose usage message. -m Always delete dot underbar files. -n Delete dot underbar file if there is no matching native file. -s Follow symbolic links. This will follow symbolic dot underbar files when they are found. -v Print verbose output. --keep=mostrecent The default option. If an attribute is associated with a data fork, use that. Otherwise, use information stored in the AppleDouble file. Note that the native fork's data is preferred even if the data in the AppleDouble file is newer. --keep=dotbar Always use information stored in the AppleDouble file, replacing any extended attributes associated with the native file. --keep=native Always use the information associated with the data fork, ignoring any AppleDouble files.
|
The following is how to do an dot_clean merge on the mounted volume test, always using the dot underbar information. dot_clean --keep=dotbar /Volumes/test DIAGNOSTICS The dot_clean utility exits 0 on success, and >0 if an error occurs. BUGS None known. macOS 14.5 Sept 27, 2012 macOS 14.5
|
PasswordService
|
In the first synopsis form, PasswordService prints a usage summary or version information and quits. In the second form, PasswordService acts as a password server. PasswordService must be run as root; it will exit otherwise. If there is another instance of PasswordService running, it will exit. The PasswordService daemon acts as the gatekeeper for user passwords and provides an authentication resource for all services running on the system. The standard way to communicate with PasswordService is to use the DirectoryService API. Services authenticate via the dsDoDirNodeAuth() function call. If the user being authenticated has an AuthenticationAuthority attribute that begins with ";ApplePasswordServer;" the request is routed to PasswordService for authentication. Normally, the users in an Open Directory LDAP server are managed through PasswordService. The DirectoryService buffer formats for each authentication mechanism are documented in the DirServicesConst.h header file. Some of the common methods supported are: APOP, CRAM-MD5, DIGEST-MD5, MS-CHAPv2, NTLMv2 and NTLMv1. Some authentication methods require recoverable passwords. If APOP or WEBDAV-DIGEST are enabled, the password database must contain recoverable passwords. The PasswordService daemon enforces password policies, such as the minimum number of characters allowed or when a password change is required. See pwpolicy(8) for more information about password policies. PasswordService writes three log files; the server log contains all significant activity; the replication log contains information about synchronization with other password servers; the error log contains major error conditions.
|
PasswordService – Mac OS X Server Password Server daemon
|
PasswordService [-help | -ver] PasswordService [-n]
|
The following options are available: -n Do not daemonize. USAGE In typical usage, PasswordService is launched during the boot process by launchd. To start and stop PasswordService manually, use launchctl(8) commands. This command updates the configuration files and effect the startup state. FILES & FOLDERS /usr/sbin/PasswordService - the password service daemon /Library/Logs/PasswordService/ApplePasswordServer.Error.log - the error log /Library/Logs/PasswordService/ApplePasswordServer.Replication.log - the replication log /Library/Logs/PasswordService/ApplePasswordServer.Server.log - the activity log SEE ALSO mkpassdb(8) launchctl(8) pwpolicy(8) Mac OS X Server 21 February 2002 Mac OS X Server
| null |
systemsetup
|
The systemsetup command is used to configure certain per-machine settings typically configured in the System Preferences application. The systemsetup command requires at least "admin" privileges to run. A list of flags and their descriptions: -getdate Displays the current date. -setdate mm:dd:yy Use this command to set the current month, day, and year. -gettime Displays the current time in 24-hour format. -settime hh:mm:ss Sets the current time. The provided time argument should be in 24-hour format. -gettimezone Displays current time zone. -listtimezones Lists all time zones supported by this machine. -settimezone timezone Use this command to set the local time zone. Use "-listtimezones" to list valid timezone arguments. -getusingnetworktime Displays whether network time is on or off. -setusingnetworktime on | off Sets whether using network time is on or off. -getnetworktimeserver Displays the currently set network time server. -setnetworktimeserver timeserver Use this command to designate a network time server. Enter the IP address or DNS name for the network time server. -getsleep Displays amount of idle time until machine sleeps. -setsleep minutes Sets amount of idle time until computer sleeps. Specify "Never" or "Off" for computers that should never sleep. Important: if you set the system to sleep, you will not be able to administer the server remotely while it is sleeping. -getcomputersleep Display amount of idle time until computer sleeps. -setcomputersleep minutes Set amount of idle time until computer sleeps. Specify "Never" or "Off" for never. -getdisplaysleep Display amount of idle time until display sleeps. -setdisplaysleep minutes Set amount of idle time until display sleeps. Specify "Never" or "Off" for never. -getharddisksleep Display amount of idle time until hard disk sleeps. Specify "Never" or "Off" for never. -setharddisksleep minutes Set amount of idle time until hard disk sleeps. Specify "Never" or "Off" for never. -getwakeonmodem Displays whether wake on modem is on or off. -setwakeonmodem on | off Use this command to specify whether or not the server will wake from sleep when modem activity is detected. -getwakeonnetworkaccess Displays whether wake on network access is on or off. -setwakeonnetworkaccess on | off Use this command to specify whether the server wakes from sleep when a network admin packet is sent to it. -getrestartpowerfailure Displays whether restart on power failure is on or off. -setrestartpowerfailure on | off Use this command to specify whether the server automatically restarts after a power failure. -getrestartfreeze Displays whether restart on freeze is on or off. -setrestartfreeze on | off Use this command to specify whether the server restarts automatically after the system freezes. -getallowpowerbuttontosleepcomputer Enable or disable whether the power button can sleep the computer. -setallowpowerbuttontosleepcomputer on | off Enable or disable whether the power button can sleep the computer. -getremotelogin Displays whether remote login (SSH) is on or off. -setremotelogin [-f] on | off Sets remote login (SSH) to either on or off. Requires Full Disk Access privileges. Important: If you turn off remote login, you won't be able to administer the server using remote command line tools and SSH. To turn remote login back on, you'll need to connect a monitor and keyboard to the server to administer it locally. Use "setremotelogin -f off" to suppress prompting when turning remote login off. -getremoteappleevents Displays whether remote apple events are on or off. -setremoteappleevents on | off Use this command to set whether the server responds to events sent by other computers (such as AppleScripts). Requires Full Disk Access privileges. -getcomputername Displays computer name. -setcomputername computername Sets computer name to <computername>. This name is used by AFP. -getlocalsubnetname Display local subnet name. -setlocalsubnetname name Set local subnet name to <name>. -getstartupdisk Displays current startup disk. -liststartupdisks Lists all valid startup disks on this computer. -setstartupdisk path Sets current startup disk to the indicated path. Valid arguments can be listed using "-liststartupdisks." -getwaitforstartupafterpowerfailure Get the number of seconds after which the computer will start up after a power failure. -setwaitforstartupafterpowerfailure seconds Set the number of seconds after which the computer will start up after a power failure. The <seconds> value must be a multiple of 30 seconds. -getdisablekeyboardwhenenclosurelockisengaged Get whether or not the keyboard should be disabled when the X Serve enclosure lock is engaged. -setdisablekeyboardwhenenclosurelockisengaged yes | no Set whether or not the keyboard should be disabled when the X Serve enclosure lock is engaged. -getkernelbootarchitecturesetting Gets the Kernel Architecture setting from the com.apple.Boot.plist. -setkernelbootarchitecture i386 | x86_64 | default Set the kernel to boot in 32 or 64 bit mode on next boot. default removes the setting. -version Displays version of systemsetup tool. -help Displays a list of all the commands available in the System Setup Tool, with explanatory information. -printCommands Displays a list of commands with no detail. FILES /usr/sbin/systemsetup
|
systemsetup – configuration tool for certain machine settings in System Preferences.
|
systemsetup [-getdate] [-setdate mm:dd:yy] [-gettime] [-settime hh:mm:ss] [-gettimezone] [-listtimezones] [-settimezone timezone] [-getusingnetworktime] [-setusingnetworktime on | off] [-getnetworktimeserver] [-setnetworktimeserver timeserver] [-getsleep] [-setsleep minutes] [-getcomputersleep] [-setcomputersleep minutes] [-getdisplaysleep] [-setdisplaysleep minutes] [-getharddisksleep] [-setharddisksleep minutes] [-getwakeonmodem] [-setwakeonmodem on | off] [-getwakeonnetworkaccess] [-setwakeonnetworkaccess on | off] [-getrestartpowerfailure] [-setrestartpowerfailure on | off] [-getrestartfreeze] [-setrestartfreeze on | off] [-getallowpowerbuttontosleepcomputer] [-setallowpowerbuttontosleepcomputer on | off] [-getremotelogin] [-setremotelogin on | off] [-getremoteappleevents] [-setremoteappleevents on | off] [-getcomputername] [-setcomputername computername] [-getstartupdisk] [-liststartupdisks] [-setstartupdisk path] [-getwaitforstartupafterpowerfailure] [-setwaitforstartupafterpowerfailure value] [-getdisablekeyboardwhenenclosurelockisengaged] [-setdisablekeyboardwhenenclosurelockisengaged yes | no] [-getkernelbootarchitecturesetting] [-setkernelbootarchitecture i386 | x86_64 | default] [-version] [-help] [-printCommands]
| null |
systemsetup -setdate 04:15:02 systemsetup -settime 16:20:00 systemsetup -settimezone US/Pacific systemsetup -setnetworktimeserver time.apple.com SEE ALSO networksetup(8) macOS July 30, 2020 macOS
|
zdump
|
The zdump program prints the current time in each timezone named on the command line. The following options are available: --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) macOS 14.5 December 15, 2022 macOS 14.5
|
zdump – timezone dumper
|
zdump [--help] [--version] [-ivV] [-c [loyear,]hiyear] [-t [lotime,]hitime] [timezone ...]
| null | null |
snmpd
|
snmpd is an SNMP agent which binds to a port and awaits requests from SNMP management software. Upon receiving a request, it processes the request(s), collects the requested information and/or performs the requested operation(s) and returns the information to the sender.
|
snmpd - daemon to respond to SNMP request packets.
|
snmpd [OPTIONS] [LISTENING ADDRESSES]
|
-a Log the source addresses of incoming requests. -A Append to the log file rather than truncating it. -c FILE Read FILE as a configuration file (or a comma-separated list of configuration files). Note that the loaded file will only understand snmpd.conf tokens, unless the configuration type is specified in the file as described in the snmp_config man page under SWITCHING CONFIGURATION TYPES IN MID-FILE. -C Do not read any configuration files except the ones optionally specified by the -c option. Note that this behaviour also covers the persistent configuration files. This may result in dynamically-assigned values being reset following an agent restart, unless the relevant persistent config files are explicitly loaded using the -c option. -d Dump (in hexadecimal) the sent and received SNMP packets. -D[TOKEN[,...]] Turn on debugging output for the given TOKEN(s). Without any tokens specified, it defaults to printing all the tokens (which is equivalent to the keyword "ALL"). You might want to try ALL for extremely verbose output. Note: You can not put a space between the -D flag and the listed TOKENs. -f Do not fork() from the calling shell. -g GID Change to the numerical group ID GID after opening listening sockets. -h, --help Display a brief usage message and then exit. -H Display a list of configuration file directives understood by the agent and then exit. -I [-]INITLIST Specifies which modules should (or should not) be initialized when the agent starts up. If the comma-separated INITLIST is preceded with a '-', it is the list of modules that should not be started. Otherwise this is the list of the only modules that should be started. To get a list of compiled modules, run the agent with the arguments -Dmib_init -H (assuming debugging support has been compiled in). -L[efos] Specify where logging output should be directed (standard error or output, to a file or via syslog). See LOGGING OPTIONS in snmpcmd(5) for details. -m MIBLIST Specifies a colon separated list of MIB modules to load for this application. This overrides the environment variable MIBS. See snmpcmd(1) for details. -M DIRLIST Specifies a colon separated list of directories to search for MIBs. This overrides the environment variable MIBDIRS. See snmpcmd(1) for details. -n NAME Set an alternative application name (which will affect the configuration files loaded). By default this will be snmpd, regardless of the name of the actual binary. -p FILE Save the process ID of the daemon in FILE. -q Print simpler output for easier automated parsing. -r Do not require root access to run the daemon. Specifically, do not exit if files only accessible to root (such as /dev/kmem etc.) cannot be opened. -u UID Change to the user ID UID (which can be given in numerical or textual form) after opening listening sockets. -U Instructs the agent to not remove its pid file (see the -p option) on shutdown. Overrides the leave_pidfile token in the snmpd.conf file, see snmpd.conf(5). -v, --version Print version information for the agent and then exit. -V Symbolically dump SNMP transactions. -x ADDRESS Listens for AgentX connections on the specified address rather than the default AGENTX_SOCKET. The address can either be a Unix domain socket path, or the address of a network interface. The format is the same as the format of listening addresses described below. -X Run as an AgentX subagent rather than as an SNMP master agent. --name="value" Allows to specify any token ("name") supported in the snmpd.conf file and sets its value to "value". Overrides the corresponding token in the snmpd.conf file. See snmpd.conf(5) for the full list of tokens. LISTENING ADDRESSES By default, snmpd listens for incoming SNMP requests on UDP port 161 on all IPv4 interfaces. However, it is possible to modify this behaviour by specifying one or more listening addresses as arguments to snmpd. A listening address takes the form: [<transport-specifier>:]<transport-address> At its simplest, a listening address may consist only of a port number, in which case snmpd listens on that UDP port on all IPv4 interfaces. Otherwise, the <transport-address> part of the specification is parsed according to the following table: <transport-specifier> <transport-address> format udp (default) hostname[:port] or IPv4-address[:port] tcp hostname[:port] or IPv4-address[:port] unix pathname ipx [network]:node[/port] aal5pvc or pvc [interface.][VPI.]VCI udp6 or udpv6 or udpipv6 hostname[:port] or IPv6-address[:port] tcp6 or tcpv6 or tcpipv6 hostname[:port] or IPv6-address[:port] ssh hostname:port dtlsudp hostname:port Note that <transport-specifier> strings are case-insensitive so that, for example, "tcp" and "TCP" are equivalent. Here are some examples, along with their interpretation: 127.0.0.1:161 listen on UDP port 161, but only on the loopback interface. This prevents snmpd being queried remotely. The port specification ":161" is not strictly necessary since that is the default SNMP port. TCP:1161 listen on TCP port 1161 on all IPv4 interfaces. ipx:/40000 listen on IPX port 40000 on all IPX interfaces. unix:/tmp/local-agent listen on the Unix domain socket /tmp/local- agent. /tmp/local-agent is identical to the previous specification, since the Unix domain is assumed if the first character of the <transport-address> is '/'. PVC:161 listen on the AAL5 permanent virtual circuit with VPI=0 and VCI=161 (decimal) on the first ATM adapter in the machine. udp6:10161 listen on port 10161 on all IPv6 interfaces. ssh:127.0.0.1:22 Allows connections from the snmp subsystem on the ssh server on port 22. The details of using SNMP over SSH are defined below. dtlsudp:127.0.0.1:9161 Listen for connections over DTLS on UDP port 9161. The snmp.conf file must have the serverCert, configuration tokens defined. Note that not all the transport domains listed above will always be available; for instance, hosts with no IPv6 support will not be able to use udp6 transport addresses, and attempts to do so will result in the error "Error opening specified endpoint". Likewise, since AAL5 PVC support is only currently available on Linux, it will fail with the same error on other platforms. Transport Specific Notes ssh The SSH transport, on the server side, is actually just a unix named pipe that can be connected to via a ssh subsystem configured in the main ssh server. The pipe location (configurable with the sshtosnmpsocket token in snmp.conf) is /var/net-snmp/sshtosnmp. Packets should be submitted to it via the sshtosnmp application, which also sends the user ID as well when starting the connection. The TSM security model should be used when packets should process it. The sshtosnmp command knows how to connect to this pipe and talk to it. It should be configured in the OpenSSH sshd configuration file (which is normally /etc/ssh/sshd_config using the following configuration line: Subsystem snmp /usr/local/bin/sshtosnmp The sshtosnmp command will need read/write access to the /var/net-snmp/sshtosnmp pipe. Although it should be fairly safe to grant access to the average user since it still requires modifications to the ACM settings before the user can perform operations, paranoid administrators may want to make the /var/net-snmp directory accessible only by users in a particular group. Use the sshtosnmpsocketperms snmp.conf configure option to set the permissions, owner and group of the created socket. Access control can be granted to the user "foo" using the following style of simple snmpd.conf settings: rouser -s tsm foo authpriv Note that "authpriv" is acceptable assuming as SSH protects everything that way (assuming you have a non-insane setup). snmpd has no notion of how SSH has actually protected a packet and thus the snmp agent assumes all packets passed through the SSH transport have been protected at the authpriv level. dtlsudp The DTLS protocol, which is based off of TLS, requires both client and server certificates to establish the connection and authenticate both sides. In order to do this, the client will need to configure the snmp.conf file with the clientCert configuration tokens. The server will need to configure the snmp.conf file with the serverCert configuration tokens defined. Access control setup is similar to the ssh transport as the TSM security model should be used to protect the packet. CONFIGURATION FILES snmpd checks for the existence of and parses the following files: /etc/snmp/snmp.conf Common configuration for the agent and applications. See snmp.conf(5) for details. /etc/snmp/snmpd.conf /etc/snmp/snmpd.local.conf Agent-specific configuration. See snmpd.conf(5) for details. These files are optional and may be used to configure access control, trap generation, subagent protocols and much else besides. In addition to these two configuration files in /etc/snmp, the agent will read any files with the names snmpd.conf and snmpd.local.conf in a colon separated path specified in the SNMPCONFPATH environment variable. /usr/share/snmp/mibs/ The agent will also load all files in this directory as MIBs. It will not, however, load any file that begins with a '.' or descend into subdirectories. SEE ALSO (in recommended reading order) snmp_config(5), snmp.conf(5), snmpd.conf(5) V5.6.2.1 30 Jun 2010 SNMPD(8)
| null |
ndp
|
The ndp command manipulates the address mapping table used by the Neighbor Discovery Protocol (NDP). -a Dump the currently existing NDP entries. The following information will be printed: Neighbor IPv6 address of the neighbor. Linklayer Address Linklayer address of the neighbor. It could be “(incomplete)” when the address is not available. Netif Network interface associated with the neighbor cache entry. Expire The time until expiry of the entry. The entry could become “permanent”, in which case it will never expire. S State of the neighbor cache entry, as a single letter: N Nostate W Waitdelete I Incomplete R Reachable S Stale D Delay P Probe Flags Flags on the neighbor cache entry, in a single letter. They are: Router, proxy neighbor advertisement (“p”). The field could be followed by a decimal number, which means the number of NS probes the node has sent during the current state. -A wait Repeat -a (dump NDP entries) every wait seconds. -c Erase all the NDP entries. -d Delete specified NDP entry. -f filename Cause the file filename to be read and multiple entries to be set in the NDP table. Entries in the file should be of the form hostname ether_addr [temp] [proxy] with argument meanings as given above. Leading whitespace and empty lines are ignored. A ‘#’ character will mark the rest of the line as a comment. -H Harmonize consistency between the routing table and the default router list; install the top entry of the list into the kernel routing table. -I Shows the default interface used as the default route when there is no default router. -I interface Specifies the default interface used as the default route when there is no default router. The interface will be used as the default. -I delete The current default interface will be deleted from the kernel. -i interface [expressions ...] View ND information for the specified interface. If additional arguments expressions are given, ndp sets or clears the flags or variables for the interface as specified in the expression. Each expression should be separated by white spaces or tab characters. Possible expressions are as follows. Some of the expressions can begin with the special character ‘-’, which means the flag specified in the expression should be cleared. Note that you need -- before -foo in this case. nud Turn on or off NUD (Neighbor Unreachability Detection) on the interface. NUD is usually turned on by default. disabled Disable IPv6 operation on the interface. When disabled, the interface discards any IPv6 packets received on or being sent to the interface. In the sending case, an error of ENETDOWN will be returned to the application. This flag is typically set automatically in the kernel as a result of a certain failure of Duplicate Address Detection. If the auto_linklocal per-interface flag is set, automatic link-local address configuration is performed again when this flag is cleared. proxy_prefixes the interface is enabled to proxy neighbor discovery for global scope prefixes matching those on link at other interfaces. insecure do not use cryptographically generated addresses (CGA) on this interface. replicated Address autoconfiguration proceeds under the assumption that interface configuration is replicated by a sleep proxy at another node on the link. Disables optimistic DAD and sends unsolicited NA with O=1 when DAD completes. Ignores DAD failures from other hardware addresses. -l Show link-layer reachability information. -n Do not try to resolve numeric addresses to hostnames. -p Show prefix list. The following information will be printed: if The network interface associated with this prefix. flags The status of the prefix, expressed by a combination of the following letters: A This prefix can be used for stateless address autoconfiguration. L, O This prefix can be used for on-link determination; that is, it can be used to determine whether a given destination address is on-link. D There are no reachable routers advertising this prefix. vltime Valid lifetime; the length of time for which the prefix and a stateless autoconfigured address generated from this prefix can be used for the source or destination address of a packet. pltime Preferred lifetime; the length of time for which the prefix and a stateless autoconfigured address generated from this prefix can be used by upper-layer protocols unrestrictedly. expire This is the remaining time that the prefix is in the valid state. ref The number of kernel references held for this prefix. -P Flush all the entries in the prefix list. -r Show default router list. -R Flush all the entries in the default router list. -s Register an NDP entry for a node. The entry will be permanent unless the word temp is given in the command. If the word proxy is given, this system will act as a proxy NDP server, responding to requests for hostname even though the host address is not its own. -t Print timestamp for each entry, to make it possible to merge the output with tcpdump(1). Most useful when used with -A. -x Show extended link-layer reachability information in addition to that shown by the -l flag. -w Show the cryptographically generated address (CGA) parameters for the node. RETURN VALUES The ndp command will exit with 0 on success, and non-zero on errors. SEE ALSO arp(8) HISTORY The ndp command first appeared in WIDE Hydrangea IPv6 protocol stack kit. macOS 14.5 May 17, 1998 macOS 14.5
|
ndp – control/diagnose IPv6 neighbor discovery protocol
|
ndp -a [-lntx] ndp -A wait [-nt] ndp -c [-nt] ndp -d [-nt] hostname ndp -f [-nt] filename ndp -H ndp -I [delete | interface] ndp -i interface [flags...] ndp -p ndp -P ndp -r ndp -R ndp -s [-nt] -s nodename etheraddr [temp] [proxy]
| null | null |
coreaudiod
|
coreaudiod is a daemon used for Core Audio related purposes. coreaudiod was introduced with OSX version 10.4. Darwin Mon Jul 19 2004 Darwin
|
coreaudiod
|
coreaudiod
| null | null |
rpcbind
|
Rpcbind is a server that converts RPC program numbers into DARPA protocol port numbers. It is a replacement for the older portmap program. rpcbind supports the original version 2 portmap protocol and in addition supports the newer version 3 and version 4 protocols that are necessary for IPv6 support. It must be running on the server in order to make RPC calls. When an RPC server is started, it will tell rpcbind what address it is listening to, and what RPC program numbers it is prepared to serve. When a client wishes to make an RPC call to a given program number, it will first contact rpcbind on the server machine to determine the address where RPC packets should be sent. rpcbind is a launchd service. When the first server tries to register with rpcbind the RPC library will contact launchd and arrange for rpcbind to be started. Note it is no longer possible to run rpcbind from the command line. rpcbind logs errors and information using os_log(3). rpcbind uses hosts_access(5) for access control; note access control patterns may only reference IP addresses. The following options are available and will need to be added to the rpcbind plist file. -d causes rpcbind errors and debugging information to be printed to the standard error output via os_log. This option is no longer very useful. -v Enable verbose logging of access control checks. -h Specify specific IP addresses to bind to for UDP requests. This option may be specified multiple times and is typically necessary when running on a multi-homed host. If no -h option is specified, rpcbind will bind to INADDR_ANY, which could lead to problems on a multi-homed host due to rpcbind returning a UDP packet from a different IP address than it was sent to. Note that when specifying IP addresses with -h, rpcbind will automatically add 127.0.0.1 to the list. FILES /System/Library/LaunchDaemons/com.apple.rpcbind.plist launchd.plist(5) file for rpcbind. Options should be added here. /usr/share/sandbox/rpcbind.sb sandbox(7) file for rpcbind. SEE ALSO hosts_access(5), launchd.plist(5), launchd(8), rpcinfo(8) BUGS If rpcbind crashes, all servers must be restarted. Version 4 getstat procedure is not implemented and will always return 0 and null values. RPC_SYSTEMERROR. -h option is not supported for IPv6. Darwin 1/24/11 Darwin
|
rpcbind – portmap
|
rpcbind [-d] [-v] [-h bindip]
| null | null |
praudit
|
The praudit utility prints the contents of the audit trail files to the standard output in human-readable form. If no file argument is specified, the standard input is used by default. The options are as follows: -d del Specifies the delimiter. The default delimiter is the comma. -l Prints the entire record on the same line. If this option is not specified, every token is displayed on a different line. -n Do not convert user and group IDs to their names but leave in their numeric forms. -p Specify this option if input to praudit is piped from the tail(1) utility. This causes praudit to sync to the start of the next record. -r Prints the records in their raw form. Show records and event types in a numeric form (also known as raw form). This option is exclusive from -s. -s Prints the records in their short form. Show records and events in a short textual representation. This option is exclusive from -r. -x Print audit records in the XML output format. If the raw or short forms are not specified, the default is to print the tokens in their raw form. Events are displayed as per their descriptions given in /etc/security/audit_event; UIDs and GIDs are expanded to their names; dates and times are displayed in human-readable format. FILES /etc/security/audit_class Descriptions of audit event classes. /etc/security/audit_event Descriptions of audit events. SEE ALSO auditreduce(1), audit(4), auditpipe(4), audit_class(5), audit_event(5) HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc. in 2004. It was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. AUTHORS This software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. Additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc. The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems. macOS 14.5 August 4, 2009 macOS 14.5
|
praudit – print the contents of audit trail files SYNOPSIS (NOW DEPRECATED) praudit [-lnpx] [-r | -s] [-d del] [file ...]
| null | null | null |
BTLEServer
|
BTLEServer is a process that handles Bluetooth LE features. SEE ALSO BTLEServerAgent Darwin 3/7/16 Darwin
|
BTLEServer
|
BTLEServer
| null | null |
usernoted
|
usernoted is a daemon that provides notification services on the system There are no options for usernoted, and users should not run usernoted manually. macOS July 4, 2018 macOS
|
usernoted – Notification Center daemon
| null | null | null |
postkick
|
The postkick(1) command sends request to the specified service over a local transport channel. This command makes Postfix private IPC accessible for use in, for example, shell scripts. Options: -c config_dir Read the main.cf configuration file in the named directory instead of the default configuration directory. -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. Arguments: class Name of a class of local transport channel endpoints, either public (accessible by any local user) or private (administrative access only). service The name of a local transport endpoint within the named class. request A string. The list of valid requests is service-specific. DIAGNOSTICS Problems and transactions are logged to the standard error stream. ENVIRONMENT MAIL_CONFIG Directory with Postfix configuration files. MAIL_VERBOSE Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant to this program. The text below provides only a parameter summary. See postconf(5) for more details including examples. config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf configuration files. application_event_drain_time (100s) How long the postkick(1) command waits for a request to enter the Postfix daemon process input buffer before giving up. import_environment (see 'postconf -d' output) The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides. queue_directory (see 'postconf -d' output) The location of the Postfix top-level queue directory. FILES /var/spool/postfix/private, private class endpoints /var/spool/postfix/public, public class endpoints SEE ALSO qmgr(8), queue manager trigger protocol pickup(8), local pickup daemon postconf(5), configuration parameters LICENSE The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA POSTKICK(1)
|
postkick - kick a Postfix service
|
postkick [-c config_dir] [-v] class service request
| null | null |
postcat
|
The postcat(1) command prints the contents of the named files in human-readable form. The files are expected to be in Postfix queue file format. If no files are specified on the command line, the program reads from standard input. By default, postcat(1) shows the envelope and message content, as if the options -beh were specified. To view message content only, specify -bh (Postfix 2.7 and later). Options: -b Show body content. The -b option starts producing output at the first non-header line, and stops when the end of the message is reached. This feature is available in Postfix 2.7 and later. -c config_dir The main.cf configuration file is in the named directory instead of the default configuration directory. -d Print the decimal type of each record. -e Show message envelope content. This feature is available in Postfix 2.7 and later. -h Show message header content. The -h option produces output from the beginning of the message up to, but not including, the first non-header line. This feature is available in Postfix 2.7 and later. -o Print the queue file offset of each record. -q Search the Postfix queue for the named files instead of taking the names literally. This feature is available in Postfix 2.0 and later. -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. DIAGNOSTICS Problems are reported to the standard error stream. ENVIRONMENT MAIL_CONFIG Directory with Postfix configuration files. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant to this program. The text below provides only a parameter summary. See postconf(5) for more details including examples. config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf configuration files. import_environment (see 'postconf -d' output) The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides. queue_directory (see 'postconf -d' output) The location of the Postfix top-level queue directory. FILES /var/spool/postfix, Postfix queue directory SEE ALSO postconf(5), Postfix configuration LICENSE The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA POSTCAT(1)
|
postcat - show Postfix queue file contents
|
postcat [-bdehnoqv] [-c config_dir] [files...]
| null | null |
netstat
|
The netstat command symbolically displays the contents of various network-related data structures. There are a number of output formats, depending on the options for the information presented. The first form of the command displays a list of active sockets for each protocol. The second form presents the contents of one of the other network data structures according to the option selected. Using the third form, with a wait interval specified, netstat will continuously display the information regarding packet traffic on the configured network interfaces. The fourth form displays statistics for the specified protocol or address family. If a wait interval is specified, the protocol information over the last interval seconds will be displayed. The fifth form displays per-interface statistics for the specified protocol or address family. The sixth form displays mbuf(9) statistics. The seventh form displays routing table for the specified address family. The eighth form displays routing statistics. The options have the following meaning: -A With the default display, show the address of any protocol control blocks associated with sockets and the flow hash; used for debugging. -a With the default display, show the state of all sockets; normally sockets used by server processes are not shown. With the routing table display (option -r, as described below), show protocol-cloned routes (routes generated by a RTF_PRCLONING parent route); normally these routes are not shown. -B Show statistics about bpf(4) devices. This includes information like how many packets have been matched, dropped and received by the bpf device, also information about current buffer sizes and device states. The option -I show information only for the bpf devices bound the specified interface. -b With the interface display (option -i, as described below), show the number of bytes in and out. -c queue With the queue statistics (option -q, as described below), show only those for the specified queue. -d With either interface display (option -i or an interval, as described below), show the number of dropped packets. -f address_family Limit statistics or address control block reports to those of the specified address family. The following address families are recognized: inet, for AF_INET, inet6, for AF_INET6, unix, for AF_UNIX and vsock, for AF_VSOCK. -g Show information related to multicast (group address) membership. If the -s option is also present, show extended interface group management statistics. If the -v option is specified, show link- layer memberships; they are suppressed by default. Source lists for each group will also be printed. Specifying -v twice will print the control plane timers for each interface and the source list counters for each group. If the -i is specified, only that interface will be shown. If the -f is specified, only information for the address family will be displayed. -I interface Show information about the specified interface; used with a wait interval as described below. If the -s option is present, show per-interface protocol statistics on the interface for the specified address_family or protocol, or for all protocol families. -i Show the state of interfaces which have been auto-configured (interfaces statically configured into a system, but not located at boot time are not shown). If the -a options is also present, multicast addresses currently in use are shown for each Ethernet interface and for each IP interface address. Multicast addresses are shown on separate lines following the interface address with which they are associated. If the -s option is present, show per- interface statistics on all interfaces for the specified address_family or protocol, or for all protocol families. -L Show the size of the various listen queues. The first count shows the number of unaccepted connections. The second count shows the amount of unaccepted incomplete connections. The third count is the maximum number of queued connections. -l Print full IPv6 address. -m Show statistics recorded by the memory management routines (the network stack manages a private pool of memory buffers). More detailed information about the buffers, which includes their cache related statistics, can be obtained by using -mm or -m -m option. -n Show network addresses as numbers (normally netstat interprets addresses and attempts to display them symbolically). This option may be used with any of the display formats. -p protocol Show statistics about protocol, which is either a well-known name for a protocol or an alias for it. Some protocol names and aliases are listed in the file /etc/protocols. The special protocol name “bdg” is used to show bridging statistics. A null response typically means that there are no interesting numbers to report. The program will complain if protocol is unknown or if there is no statistics routine for it. -q Show network interface send queue statistics. By default all queues are displayed, unless specified with -c. This option requires specifying an interface with -I option. More detailed information about the queues, which includes their queueing algorithm related statistics, can be obtained by using -qq or -q -q option. -r Show the routing tables. Use with -a to show protocol-cloned routes. When -s is also present, show routing statistics instead. When -l is also present, netstat assumes more columns are there and the maximum transmission unit. More detailed information about the route metrics are displayed with -ll for TCP round trip times -lll for all metrics. Use the -z flags to display only entries with non-zero RTT values. (“mtu”) are also displayed. -R Show reachability information. Use with -i to show link-layer reachability information for a given interface. -s Show per-protocol statistics. If this option is repeated, counters with a value of zero are suppressed. For security reasons, root privileges are required to read TCP statistics and in the absence of such privileges all TCP counters will be reported as zero. -S Show interface link status and interface state information about the specified interface. This option requires specifying an interface with -I option. -v Increase verbosity level. -W In certain displays, avoid truncating addresses even if this causes some fields to overflow. -w wait Show network interface or protocol statistics at intervals of wait seconds. -x Show extended link-layer reachability information in addition to that shown by the -R flag. OUTPUT The default display, for active sockets, shows the local and remote addresses, send and receive queue sizes (in bytes), protocol, and the internal state of the protocol. Address formats are of the form “host.port” or “network.port” if a socket's address specifies a network but no specific host address. If known, the host and network addresses are displayed symbolically according to the databases /etc/hosts and /etc/networks, respectively. If a symbolic name for an address is unknown, or if the -n option is specified, the address is printed numerically, according to the address family. For more information regarding the Internet “dot format”, refer to inet(3)). Unspecified, or “wildcard”, addresses and ports appear as “*”. Internet domain socket states: CLOSED: The socket is not in use. LISTEN: The socket is listening for incoming connections. Unconnected listening sockets like these are only displayed when using the -a option. SYN_SENT: The socket is actively trying to establish a connection to a remote peer. SYN_RCVD: The socket has passively received a connection request from a remote peer. ESTABLISHED: The socket has an established connection between a local application and a remote peer. CLOSE_WAIT: The socket connection has been closed by the remote peer, and the system is waiting for the local application to close its half of the connection. LAST_ACK: The socket connection has been closed by the remote peer, the local application has closed its half of the connection, and the system is waiting for the remote peer to acknowledge the close. FIN_WAIT_1: The socket connection has been closed by the local application, the remote peer has not yet acknowledged the close, and the system is waiting for it to close its half of the connection. FIN_WAIT_2: The socket connection has been closed by the local application, the remote peer has acknowledged the close, and the system is waiting for it to close its half of the connection. CLOSING: The socket connection has been closed by the local application and the remote peer simultaneously, and the remote peer has not yet acknowledged the close attempt of the local application. TIME_WAIT: The socket connection has been closed by the local application, the remote peer has closed its half of the connection, and the system is waiting to be sure that the remote peer received the last acknowledgement. The interface display provides a table of cumulative statistics regarding packets transferred, errors, and collisions. The network addresses of the interface and the maximum transmission unit (“mtu”) are also displayed. The routing table display indicates the available routes and their status. Each route consists of a destination host or network and a gateway to use in forwarding packets. The flags field shows a collection of information about the route stored as binary choices. The individual flags are discussed in more detail in the route(8) and route(4) manual pages. The mapping between letters and flags is: 1 RTF_PROTO1 Protocol specific routing flag #1 2 RTF_PROTO2 Protocol specific routing flag #2 3 RTF_PROTO3 Protocol specific routing flag #3 B RTF_BLACKHOLE Just discard packets (during updates) b RTF_BROADCAST The route represents a broadcast address C RTF_CLONING Generate new routes on use c RTF_PRCLONING Protocol-specified generate new routes on use D RTF_DYNAMIC Created dynamically (by redirect) G RTF_GATEWAY Destination requires forwarding by intermediary H RTF_HOST Host entry (net otherwise) I RTF_IFSCOPE Route is associated with an interface scope i RTF_IFREF Route is holding a reference to the interface L RTF_LLINFO Valid protocol to link address translation M RTF_MODIFIED Modified dynamically (by redirect) m RTF_MULTICAST The route represents a multicast address R RTF_REJECT Host or net unreachable r RTF_ROUTER Host is a default router S RTF_STATIC Manually added U RTF_UP Route usable W RTF_WASCLONED Route was generated as a result of cloning X RTF_XRESOLVE External daemon translates proto to link address Y RTF_PROXY Proxying; cloned routes will not be scoped g RTF_GLOBAL Route to a destination of the global internet (policy hint) Direct routes are created for each interface attached to the local host; the gateway field for such entries shows the address of the outgoing interface. The refcnt field gives the current number of active uses of the route. Connection oriented protocols normally hold on to a single route for the duration of a connection while connectionless protocols obtain a route while sending to the same destination. The use field provides a count of the number of packets sent using that route. The interface entry indicates the network interface utilized for the route. A route which is marked with the RTF_IFSCOPE flag is instantiated for the corresponding interface. A cloning route which is marked with the RTF_PROXY flag will not generate new routes that are associated with its interface scope. When netstat is invoked with the -w option and a wait interval argument, it displays a running count of statistics related to network interfaces or protocols. An obsolete version of this option used a numeric parameter with no option, and is currently supported for backward compatibility. By default, this display summarizes information for all interfaces. Information for a specific interface may be displayed with the -I option. SEE ALSO nfsstat(1), ps(1), inet(4), unix(4), hosts(5), networks(5), protocols(5), route(8), services(5), iostat(8), bpf(4), HISTORY The netstat command appeared in 4.2BSD. IPv6 support was added by WIDE/KAME project. BUGS The notion of errors is ill-defined. Darwin June 15, 2001 Darwin
|
netstat – show network status
|
netstat [-AaLlnW] [-f address_family | -p protocol] netstat [-gilns] [-v] [-f address_family] [-I interface] netstat -i | -I interface [-w wait] [-c queue] [-abdgqRtS] netstat -s [-s] [-f address_family | -p protocol] [-w wait] netstat -i | -I interface -s [-f address_family | -p protocol] netstat -m [-m] netstat -r [-Aaln] [-f address_family] netstat -rs [-s] netstat -B [-I interface]
| null | null |
lpc
|
lpc provides limited control over printer and class queues provided by CUPS. It can also be used to query the state of queues. If no command is specified on the command-line, lpc displays a prompt and accepts commands from the standard input. COMMANDS The lpc program accepts a subset of commands accepted by the Berkeley lpc program of the same name: exit Exits the command interpreter. help [command] ? [command] Displays a short help message. quit Exits the command interpreter. status [queue] Displays the status of one or more printer or class queues. NOTES This program is deprecated and will be removed in a future feature release of CUPS. Since lpc is geared towards the Berkeley printing system, it is impossible to use lpc to configure printer or class queues provided by CUPS. To configure printer or class queues you must use the lpadmin(8) command or another CUPS-compatible client with that functionality. SEE ALSO cancel(1), cupsaccept(8), cupsenable(8), lp(1), lpadmin(8), lpr(1), lprm(1), lpstat(1), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS lpc(8)
|
lpc - line printer control program (deprecated)
|
lpc [ command [ parameter(s) ] ]
| null | null |
slapadd
|
Slapadd is used to add entries specified in LDAP Directory Interchange Format (LDIF) to a slapd(8) database. It opens the given database determined by the database number or suffix and adds entries corresponding to the provided LDIF to the database. Databases configured as subordinate of this one are also updated, unless -g is specified. The LDIF input is read from standard input or the specified file. All files eventually created by slapadd will belong to the identity slapadd is run as, so make sure you either run slapadd with the same identity slapd(8) will be run as (see option -u in slapd(8)), or change file ownership before running slapd(8). Note: slapadd will also perform the relevant indexing whilst adding the database if any are configured. For specfic details, please see slapindex(8).
|
slapadd - Add entries to a SLAPD database
|
/usr/sbin/slapadd [-b_suffix] [-c] [-d_debug-level] [-f_slapd.conf] [-F_confdir] [-g] [-j_lineno] [-l_ldif-file] [-n_dbnum] [-o_option[=value]] [-q] [-s] [-S_SID] [-u] [-v] [-w]
|
-b_suffix Use the specified suffix to determine which database to add entries to. The -b cannot be used in conjunction with the -n option. -c enable continue (ignore errors) mode. -d_debug-level enable debugging messages as defined by the specified debug-level; see slapd(8) for details. -f_slapd.conf specify an alternative slapd.conf(5) file. -F_confdir specify a config directory. If both -f and -F are specified, the config file will be read and converted to config directory format and written to the specified directory. If neither option is specified, an attempt to read the default config directory will be made before trying to use the default config file. If a valid config directory exists then the default config file is ignored. If dry-run mode is also specified, no conversion will occur. -g disable subordinate gluing. Only the specified database will be processed, and not its glued subordinates (if any). -j_lineno Jump to the specified line number in the LDIF file before processing any entries. This allows a load that was aborted due to errors in the input LDIF to be resumed after the errors are corrected. -l_ldif-file Read LDIF from the specified file instead of standard input. -n_dbnum Add entries to the dbnum-th database listed in the configuration file. The -n cannot be used in conjunction with the -b option. To populate the config database slapd-config(5), use -n 0 as it is always the first database. It must physically exist on the filesystem prior to this, however. -o_option[=value] Specify an option with a(n optional) value. Possible generic options/values are: syslog=<subsystems> (see `-s' in slapd(8)) syslog-level=<level> (see `-S' in slapd(8)) syslog-user=<user> (see `-l' in slapd(8)) schema-check={yes|no} value-check={yes|no} The schema-check option toggles schema checking (default on); the value-check option toggles value checking (default off). The latter is incompatible with -q. -q enable quick (fewer integrity checks) mode. Does fewer consistency checks on the input data, and no consistency checks when writing the database. Improves the load time but if any errors or interruptions occur the resulting database will be unusable. -s disable schema checking. This option is intended to be used when loading databases containing special objects, such as fractional objects on a partial replica. Loading normal objects which do not conform to schema may result in unexpected and ill behavior. -S_SID Server ID to use in generated entryCSN. Also used for contextCSN if -w is set as well. Defaults to 0. -u enable dry-run (don't write to backend) mode. -v enable verbose mode. -w write syncrepl context information. After all entries are added, the contextCSN will be updated with the greatest CSN in the database. LIMITATIONS Your slapd(8) should not be running when you do this to ensure consistency of the database. slapadd may not provide naming or schema checks. It is advisable to use ldapadd(1) when adding new entries into an existing directory.
|
To import the entries specified in file ldif into your slapd(8) database give the command: /usr/sbin/slapadd -l ldif SEE ALSO ldap(3), ldif(5), slapcat(8), slapindex(8), ldapadd(1), slapd(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.4.28 2011/11/24 SLAPADD(8C)
|
krbservicesetup
|
krbservicesetup is used by sso_util to configure Kerberized services on the current host. It uses kadmin to add service principals to the KDC database and create the krb5.keytab file. And then edits/creates the config files of the given service to use the proper service principal. krbservicesetup knows how to configure the FTP, AFP, POP, IMAP, SMTP and SSH services shipped by Apple in Mac OS X 10.3 krbservicesetup takes either a service_type, service_principal pair or a plist file with a list of services to configure. The plist file also allows more control over the options used when creating the principals. krbservicesetup arguments: -x Use kadmin.local instead of kadmin. -r REALM The Kerberos realm of the server -a admin_name Name of an administrator with priveleges to add principals to the KDC -p password Password for the above user -t keytab The path of the keytab file to write -f setup_file The path of the plist file containing the list of services to be configured service_type service_principal A single service to configure The service_types understood by krbservicesetup are: afp Apple Filing Protocol ftp File Transfer Protocol imap IMAP mail protocol pop POP mail protocol smtp SMTP mail protocol ssh Secure Shell The plist file format used by krbservicesetup consists of a couple of optional boolean flag items and an array of dictionaries representing the services to be configured. noConfig - Boolean Flag indicating that just the service principals should be created in the KDC configOnly - Boolean Flag indicating that the services need to be configured Services - array of dictionaries Array of service dictionaries to be configured serviceType - string Type of the service (see above for definitions) servicePrincipal - string Kerberos principal name for the service option - Boolean Options passed on to the add_princ command within kadmin If the boolean value is true, the option passed to kadmin is the option name with a '+' prepended. If the value is false a '-' is prepended option - string Options passed on to the add_princ command within kadmin If the key is foo and the string value is bar then the option passed in the add_princ command is "-foo bar" The options for the add_princ command are detailed in the man page for kadmin Some of the possibly options are restricted specifically the pw and needchange commands are ignored. Every service principal is generated with the randkey option. FILES /etc/krb5.keytab The file where Kerberos stores the service principals for the services on this host DIAGNOSTICS You can add -v debug_level to the krbservicesetup command. Debug level 1 provides status information, higher levels add progressivly more levels of detail.
|
krbservicesetup – Kerberos – Open Directory Single Sign On
|
krbservicesetup [-r REALM] -a admin_name [-p password] [-t keytab] [-f setup_file] [service_type service_principal]
| null |
It is better to use the configure command in sso_util to configure multiple services. Here is an example of using krbservicesetup to configure a FTP server in the realm FOO.ORG krbservicesetup -r FOO.ORG -a admin -p password ftp ftp/myhost.foo.org@FOO.ORG (the above should be all on one line) NOTES The krbservicesetup tool is used by the Apple Single Sign On system to set up Kerberized services integrated with the rest of the Single Sign On components. SEE ALSO kadmin(8), kdcsetup(8), sso_util(8) Darwin Tue Mar 11 2003 Darwin
|
slapconfig
|
slapconfig is a utility for configuring slapd. It must be run by root. USAGE -q suppress prompts. Queries -defaultsuffix Returns the default suffix which is based on the machine's DNS name, or hostname if DNS is not available. -getclientconfig Returns whether this machine is an LDAP client, not a client, or advanced. -getldapconfig Returns the LDAP server settings. -getmacosxodpolicy Returns a property list containing the directory binding settings. -getmasterconfig Returns the list of replicas and replication interval. -getpasswordserveraddress Returns the IP address of the default password server. -getreplicaconfig Returns the master address and last update date. -getstyle Returns whether configuration is master, replica, client, or standalone. -help Print usage information. -ver Displays version information. Setup -addreplica [--serverID num] [--guid D1C9C376-D940-404D-9941-7AD24E6A37DA] ⟨replica-address⟩ Adds a replication link with the specified server. The serverID and GUID of the remote machine you'd like to replicate with. The serverID and GUID can be viewed in the target machine's computer record. Replication links are unidirectional, the corresponding command should be run on the target server as well to get full replication working. Caution should be exercised with this command, it is best to avoid replication loops. -changeip ⟨old-ip⟩ ⟨new-ip⟩ [⟨old-host⟩ ⟨new-host⟩] Updates configuration records and files to contain the new host information. It does not change the IP address in Network preferences. -createldapmasterandadmin [--allow_local_realm] [--certAuthName ⟨Cert Auth Name⟩] [--certAdminEmail ⟨Cert Admin Email⟩] [--certOrgName ⟨Cert Org Name⟩] ⟨new-admin⟩ ⟨new-fullname⟩ ⟨new-uid⟩ [⟨search base suffix⟩ [⟨realm⟩]] Creates a new master LDAP server. Copies the root account to the new master domain. Creates a new directory node administrator. -createreplica [--certAdminEmail ⟨Cert Admin Email⟩] ⟨master IP or name⟩ ⟨admin user⟩ Create a new replica from an existing LDAP master. -createrootcertauthority ⟨Certificate Authority Name⟩ ⟨Certificate Authority Admin Email⟩ ⟨Certificate Authority Organization Name⟩ Create a CA on the OD master. -destroyldapserver [diradmin] Turns off the LDAP server and deletes its database. The optional argument of the diradmin account name will then prompt for the diradmin password and will inform all replication peers of the server's destruction. -promotereplica ⟨admin-user⟩ ⟨archive-path⟩ Converts an existing replica into a master using the current database. Path to an archive from the master can given in order to add the root CA's keys to the promoted master. -removereplica [--guid D1C9C376-D940-404D-9941-7AD24E6A37DA] -⟨replica-address⟩ Removes a replication link with the specified server. The GUID of the remote server being removed should be passed in with the --guid option. Replication links are unidirectional, so the corresponding command should be run on the target server to remove the other half of an existing replication link. -setclient Configures the machine to bind using DHCP if it is not already a client. -setldapconfig [-maxresults ⟨maximum search results⟩] [-searchtimeout timeout] [-ssl on|off] [-sslidentity ⟨identity name⟩] [-sslserialnumber ⟨certificate serial number⟩] [-sslsha1fingerprint ⟨certificate sha1 fingerprint as a hex encoded colon separated string⟩] Applies the specified settings and restarts slapd. Settings not specified are unchanged. -setstandalone Configures the machine to only use the local directory. -setmacosxodpolicy [-binding [disabled|enabled|required] [] -cleartext [blocked|allowed] [] -encrypt [yes|no] [] -sign [yes|no] [] -clientcaching [yes|no] [] -man-in-middle [blocked|allowed]] Sets directory binding options. -startldapserver Configures launchd to run slapd. -stopldapserver Configures launchd not to run slapd. -updateaddresses Merges new interfaces into the list of LDAP replicas. Password Server -startpasswordserver Sets up a launchd plist file and starts the password server. -stoppasswordserver Sets the launchd plist file to be disabled and stops the password server. Runtime -enableslapdlog Turns on the LDAP server logging to /var/log/slapd.log. -setfullsyncmode [yes | no] The LDAP server defaults to running in a "full sync mode" to ensure database transactions are fully flushed to disk. This improves data integrity in the event of a power loss, but can result in slower performance when importing large datasets. Setting this option to no disables this functionality temporarily in order to speed up large imports. After the import has been completed, this option should be set back to yes for normal operation. Backup and Restore -backupdb ⟨archive-path⟩ Creates an archive containing the LDAP, Password Server and Kerberos databases. It also contains Certificate Authority related data. -restoredb ⟨archive-path⟩ Restores a directory to the backed-up state. ENVIRONMENT The environment variable SSOUtilDebugLevel can be set to change the verbosity of the log. Valid values are [0-9]. The default value is 1. FILES /usr/sbin/slapconfig SEE ALSO DirectoryService(1), slapd(8) MacOSX Thu Feb 20 2003 MacOSX
|
slapconfig -- tool to configure slapd and related daemons
|
slapconfig command [command-options] [-q]
| null | null |
rtadvd
|
rtadvd sends router advertisement packets to the specified interfaces. The program will daemonize itself on invocation. It will then send router advertisement packets periodically, as well as in response to router solicitation messages sent by end hosts. Router advertisements can be configured on a per-interface basis, as described in rtadvd.conf(5). If there is no configuration file entry for an interface, or if the configuration file does not exist altogether, rtadvd sets all the parameters to their default values. In particular, rtadvd reads all the interface routes from the routing table and advertises them as on-link prefixes. rtadvd also watches the routing table. If an interface direct route is added on an advertising interface and no static prefixes are specified by the configuration file, rtadvd adds the corresponding prefix to its advertising list. Similarly, when an interface direct route is deleted, rtadvd will start advertising the prefixes with zero valid and preferred lifetimes to help the receiving hosts switch to a new prefix when renumbering. Note, however, that the zero valid lifetime cannot invalidate the autoconfigured addresses at a receiving host immediately. According to the specification, the host will retain the address for a certain period, which will typically be two hours. The zero lifetimes rather intend to make the address deprecated, indicating that a new non-deprecated address should be used as the source address of a new connection. This behavior will last for two hours. Then rtadvd will completely remove the prefix from the advertising list, and succeeding advertisements will not contain the prefix information. Moreover, if the status of an advertising interface changes, rtadvd will start or stop sending router advertisements according to the latest status. The -s option may be used to disable this behavior; rtadvd will not watch the routing table and the whole functionality described above will be suppressed. Basically, hosts MUST NOT send Router Advertisement messages at any time (RFC 2461, Section 6.2.3). However, it would sometimes be useful to allow hosts to advertise some parameters such as prefix information and link MTU. Thus, rtadvd can be invoked if router lifetime is explicitly set zero on every advertising interface. The command line options are: -c Specify an alternate location, configfile, for the configuration file. By default, /etc/rtadvd.conf is used. -d Print debugging information. -D Even more debugging information is printed. -f This option is now deprecated and ignored. -F Specify an alternative file in which to dump internal states when rtadvd receives signal SIGUSR1. The default is /var/run/rtadvd.dump. -M Specify an interface to join the all-routers site-local multicast group. By default, rtadvd tries to join the first advertising interface appearing on the command line. This option has meaning only with the -R option, which enables routing renumbering protocol support. -p Specify an alternative file in which to store the process ID. The default is /var/run/rtadvd.pid. -R Accept router renumbering requests. If you enable it, certain IPsec setup is suggested for security reasons. This option is currently disabled, and is ignored by rtadvd with a warning message. -s Do not add or delete prefixes dynamically. Only statically configured prefixes, if any, will be advertised. Upon receipt of signal SIGUSR1, rtadvd will dump the current internal state into /var/run/rtadvd.dump or the file specified with option -F. Use SIGTERM to kill rtadvd gracefully. In this case, rtadvd will transmit router advertisement with router lifetime 0 to all the interfaces (in accordance with RFC2461 6.2.5). FILES /etc/rtadvd.conf The default configuration file. /var/run/rtadvd.pid The default process ID file. /var/run/rtadvd.dump The default file in which rtadvd dumps its internal state. EXIT STATUS The rtadvd utility exits 0 on success, and >0 if an error occurs. SEE ALSO rtadvd.conf(5) HISTORY The rtadvd command first appeared in the WIDE Hydrangea IPv6 protocol stack kit. BUGS There used to be some text that recommended users not to let rtadvd advertise Router Advertisement messages on an upstream link to avoid undesirable icmp6(4) redirect messages. However, based on the later discussion in the IETF ipng working group, all routers should rather advertise the messages regardless of the network topology, in order to ensure reachability. macOS 14.5 August 27, 2011 macOS 14.5
|
rtadvd – router advertisement daemon
|
rtadvd [-dDfMRs] [-c configfile] [-F dumpfile] [-p pidfile] interface ...
| null | null |
httxt2dbm
| null |
httxt2dbm - Generate dbm files for use with RewriteMap
|
httxt2dbm [ -v ] [ -f DBM_TYPE ] -i SOURCE_TXT -o OUTPUT_DBM SUMMARY httxt2dbm is used to generate dbm files from text input, for use in RewriteMap with the dbm map type. If the output file already exists, it will not be truncated. New keys will be added and existing keys will be updated.
|
-v More verbose output -f DBM_TYPE Specify the DBM type to be used for the output. If not specified, will use the APR Default. Available types are: GDBM for GDBM files, SDBM for SDBM files, DB for berkeley DB files, NDBM for NDBM files, default for the default DBM type. -i SOURCE_TXT Input file from which the dbm is to be created. The file should be formatted with one record per line, of the form: key value. See the documentation for RewriteMap for further details of this file's format and meaning. -o OUTPUT_DBM Name of the output dbm files.
|
httxt2dbm -i rewritemap.txt -o rewritemap.dbm httxt2dbm -f SDBM -i rewritemap.txt -o rewritemap.dbm Apache HTTP Server 2019-11-13 HTTXT2DBM(1)
|
distnoted
|
distnoted provides distributed notification services. There are no configuration options to distnoted. Users should not run distnoted manually. Mac OS X July 1, 2005 Mac OS X
|
distnoted – distributed notification server
|
distnoted
| null | null |
mtree
|
The mtree utility compares the file hierarchy rooted in the current directory against a specification read from the standard input. Messages are written to the standard output for any files whose characteristics do not match the specifications, or which are missing from either the file hierarchy or the specification. The options are as follows: -c Print a specification for the file hierarchy to the standard output. -d Ignore everything except directory type files. -e Do not complain about files that are in the file hierarchy, but not in the specification. -f file Read the specification from file, instead of from the standard input. If this option is specified twice, the two specifications are compared with each other, rather than to the file hierarchy. The specifications be sorted like output generated using -c. The output format in this case is somewhat remniscent of comm(1), having "in first spec only", "in second spec only", and "different" columns, prefixed by zero, one and two TAB characters respectively. Each entry in the "different" column occupies two lines, one from each specification. -D Do not set the XATTR_SHOWCOMPRESSION flag while processing extended attributes. -i Indent the output 4 spaces each time a directory level is descended when create a specification with the -c option. This does not affect either the /set statements or the comment before each directory. It does however affect the comment before the close of each directory. -K keywords Add the specified (whitespace or comma separated) keywords to the current set of keywords. -k keywords Use the ``type'' keyword plus the specified (whitespace or comma separated) keywords instead of the current set of keywords. -L Follow all symbolic links in the file hierarchy. -n Do not emit pathname comments when creating a specification. Normally a comment is emitted before each directory and before the close of that directory when using the -c option. -P Do not follow symbolic links in the file hierarchy, instead consider the symbolic link itself in any comparisons. This is the default. -p path Use the file hierarchy rooted in path, instead of the current directory. -q Quiet mode. Do not complain when a “missing” directory cannot be created because it already exists. This occurs when the directory is a symbolic link. -r Remove any files in the file hierarchy that are not described in the specification. -S Skip calculating the digest of the extended attributes of the file. -s seed Display a single checksum to the standard error output that represents all of the files for which the keyword cksum was specified. The checksum is seeded with the specified value. -U Modify the owner, group, permissions, and modification time of existing files to match the specification and create any missing directories or symbolic links. User, group and permissions must all be specified for missing directories to be created. Corrected mismatches are not considered errors. -u Same as -U except a status of 2 is returned if the file hierarchy did not match the specification. -w Make some error conditions non-fatal warnings. -X exclude-list The specified file contains fnmatch(3) patterns matching files to be excluded from the specification, one to a line. If the pattern contains a ‘/’ character, it will be matched against entire pathnames (relative to the starting directory); otherwise, it will be matched against basenames only. No comments are allowed in the exclude-list file. -x Do not descend below mount points in the file hierarchy. Specifications are mostly composed of ``keywords'', i.e., strings that specify values relating to files. No keywords have default values, and if a keyword has no value set, no checks based on it are performed. Currently supported keywords are as follows: cksum The checksum of the file using the default algorithm specified by the cksum(1) utility. flags The file flags as a symbolic name. See chflags(1) for information on these names. If no flags are to be set the string “none” may be used to override the current default. ignore Ignore any file hierarchy below this file. gid The file group as a numeric value. gname The file group as a symbolic name. md5digest The MD5 message digest of the file. sha1digest The FIPS 160-1 (“SHA-1”) message digest of the file. ripemd160digest The RIPEMD160 message digest of the file. mode The current file's permissions as a numeric (octal) or symbolic value. nlink The number of hard links the file is expected to have. nochange Make sure this file or directory exists but otherwise ignore all attributes. uid The file owner as a numeric value. uname The file owner as a symbolic name. size The size, in bytes, of the file. link The file the symbolic link is expected to reference. time The last modification time of the file. btime The creation (birth) time of the file. atime The last access time of the file. ctime The last metadata modification time of the file. ptime The time the file was added to its parent folder. inode The inode number of the file. xattrsdigest Digest of the extended attributes of the file. acldigest Digest of the access control list of the file. nxattr The number of extended attributes the file is expected to have. dataless Whether the file is dataless or not. Folders will not be materialized automatically if this option is provided. type The type of the file; may be set to any one of the following: block block special device char character special device dir directory fifo fifo file regular file link symbolic link socket socket The default set of keywords are flags, gid, mode, nlink, size, link, time, and uid. There are four types of lines in a specification. The first type of line sets a global value for a keyword, and consists of the string ``/set'' followed by whitespace, followed by sets of keyword/value pairs, separated by whitespace. Keyword/value pairs consist of a keyword, followed by an equals sign (``=''), followed by a value, without whitespace characters. Once a keyword has been set, its value remains unchanged until either reset or unset. The second type of line unsets keywords and consists of the string ``/unset'', followed by whitespace, followed by one or more keywords, separated by whitespace. The third type of line is a file specification and consists of a file name, followed by whitespace, followed by zero or more whitespace separated keyword/value pairs. The file name may be preceded by whitespace characters. The file name may contain any of the standard file name matching characters (``['', ``]'', ``?'' or ``*''), in which case files in the hierarchy will be associated with the first pattern that they match. Each of the keyword/value pairs consist of a keyword, followed by an equals sign (``=''), followed by the keyword's value, without whitespace characters. These values override, without changing, the global value of the corresponding keyword. All paths are relative. Specifying a directory will cause subsequent files to be searched for in that directory hierarchy. Which brings us to the last type of line in a specification: a line containing only the string “..” causes the current directory path to ascend one level. Empty lines and lines whose first non-whitespace character is a hash mark (``#'') are ignored. The mtree utility exits with a status of 0 on success, 1 if any error occurred, and 2 if the file hierarchy did not match the specification. A status of 2 is converted to a status of 0 if the -U option is used. FILES /etc/mtree system specification directory EXIT STATUS The mtree utility exits 0 on success, and >0 if an error occurs.
|
mtree – map a directory hierarchy
|
mtree [-LPUcdeinqruxwD] [-f spec] [-f spec] [-K keywords] [-k keywords] [-p path] [-s seed] [-X exclude-list]
| null |
The -d and -u options can be used in combination to create directory hierarchies for distributions and other such things; the files in /etc/mtree were used to create almost all directories in this FreeBSD distribution. SEE ALSO chflags(1), chgrp(1), chmod(1), cksum(1), md5(1), stat(2), fts(3), md5(3), chown(8) HISTORY The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof cksum(1). The SHA-1 and RIPEMD160 digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. Support for file flags was added in FreeBSD 4.0, and mostly comes from NetBSD. macOS 14.5 March 29, 2005 macOS 14.5
|
cupsdisable
|
cupsenable starts the named printers or classes while cupsdisable stops the named printers or classes.
|
cupsdisable, cupsenable - stop/start printers and classes
|
cupsdisable [ -E ] [ -U username ] [ -c ] [ -h server[:port] ] [ -r reason ] [ --hold ] destination(s) cupsenable [ -E ] [ -U username ] [ -c ] [ -h server[:port] ] [ --release ] destination(s)
|
The following options may be used: -E Forces encryption of the connection to the server. -U username Uses the specified username when connecting to the server. -c Cancels all jobs on the named destination. -h server[:port] Uses the specified server and port. --hold Holds remaining jobs on the named printer. Useful for allowing the current job to complete before performing maintenance. -r "reason" Sets the message associated with the stopped state. If no reason is specified then the message is set to "Reason Unknown". --release Releases pending jobs for printing. Use after running cupsdisable with the --hold option to resume printing. CONFORMING TO Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". Also, printer and class names are not case-sensitive. The System V versions of these commands are disable and enable, respectively. They have been renamed to avoid conflicts with the bash(1) build-in commands of the same names. The CUPS versions of disable and enable may ask the user for an access password depending on the printing system configuration. This differs from the System V versions which require the root user to execute these commands. SEE ALSO cupsaccept(8), cupsreject(8), cancel(1), lp(1), lpadmin(8), lpstat(1), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS cupsenable(8)
| null |
lpmove
|
lpmove moves the specified job or all jobs from source to destination. job can be the job ID number or the old destination and job ID.
|
lpmove - move a job or all jobs to a new destination
|
lpmove [ -E ] [ -h server[:port] ] [ -U username ] job destination lpmove [ -E ] [ -h server[:port] ] [ -U username ] source destination
|
The lpmove command supports the following options: -E Forces encryption when connecting to the server. -U username Specifies an alternate username. -h server[:port] Specifies an alternate server.
|
Move job 123 from "oldprinter" to "newprinter": lpmove 123 newprinter or lpmove oldprinter-123 newprinter Move all jobs from "oldprinter" to "newprinter": lpmove oldprinter newprinter SEE ALSO cancel(1), lp(1), lpr(1), lprm(1), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS lpmove(8)
|
purge
|
Purge can be used to approximate initial boot conditions with a cold disk buffer cache for performance analysis. It does not affect anonymous memory that has been allocated through malloc, vm_allocate, etc. SEE ALSO malloc(3), sync(8) macOS September 20, 2005 macOS
|
purge – force disk cache to be purged (flushed and emptied)
|
purge
| null | null |
rpc.statd
|
The rpc.statd utility is a daemon which cooperates with rpc.statd daemons on other hosts to provide a status monitoring service. The daemon accepts requests from programs running on the local host (typically, rpc.lockd(8), the NFS file locking daemon) to monitor the status of specified hosts. If a monitored host crashes and restarts, the remote daemon will notify the local daemon, which in turn will notify the local program(s) which requested the monitoring service. Conversely, if this host crashes and restarts, the statd.notify service will be started to notify all of the hosts which were being monitored at the time of the crash. The rpc.statd utility consists of two launchd(8)-controlled services. The statd.notify service is run whenever the system needs to notify remote hosts of a restart. The statd service is controlled by rpc.lockd(8) so that the rpc.statd daemon is running whenever rpc.lockd(8) is running. The following is a list of command line options that are available. Note that since rpc.statd is normally started by launchd(8), configuration of these options should be controlled using the equivalent settings in the NFS configuration file. See nfs.conf(5) for a list of tunable parameters. -d Sets the logging level to the maximum. Note that finer grain control is available via the nfs.statd.verbose option in nfs.conf(5). Logging is performed via syslog(3) using the LOG_DAEMON facility. By default, only messages up to priority LOG_WARNING are logged. Setting the verbose level to one will add LOG_NOTICE messages which includes logging failed mount attempts. A verbose level of two will increase the log level to LOG_INFO which includes logging successful mount attempts. A log level of three or more will add LOG_DEBUG messages and cause increasing amounts of debug information to be logged. The debug information exposes lots of information about rpc.statd's inner workings which is typically only useful to developers. Note: the syslog(8) configuration may need to be adjusted in order to see the increased verbosity. The following command line option causes the daemon to run in the statd.notify notification service mode: -n Send SM_NOTIFY messages to notify any hosts of a restart. The remaining command line options may be useful for viewing or modifying the contents of the status file. They do not start up any daemon or service. -l List each host (and its status) in the status file. -L List each host (and its status) in the status file and then continue to watch the file and report changes. -N Clear the "needs notification" status for hostname so the statd.notify service will no longer try to notify it. FILES /var/db/statd.status non-volatile record of monitored hosts. /var/run/statd.pid The pid of the current statd daemon. /var/run/statd.notify.pid The pid of the current statd.notify daemon. /System/Library/LaunchDaemons/com.apple.statd.notify.plist The statd.notify service's property list file for launchd(8). /usr/include/rpcsvc/sm_inter.x RPC protocol specification used by local applications to register monitoring requests. SEE ALSO nfs.conf(5), rpc.lockd(8), syslog(3), launchd(8) BUGS There is no means for the daemon to tell when a monitored host has disappeared permanently (eg. catastrophic hardware failure), as opposed to transient failure of the host or an intermediate router. At present, it will pause and re-try notification at frequent intervals for 10 minutes, then hourly, and finally gives up after 24 hours. The -N option may be used to remove the "needs notification" status from such hosts. The protocol requires that symmetric monitor requests are made to both the local and remote daemon in order to establish a monitored relationship. This is convenient for the NFS locking protocol, but probably reduces the usefulness of the monitoring system for other applications. STANDARDS The implementation is based on the specification in X/Open CAE Specification C218, "Protocols for X/Open PC Interworking: XNFS, Issue 4", ISBN 1 872630 66 9 macOS 14.5 July 5, 2008 macOS 14.5
|
rpc.statd – host status monitoring daemon
|
rpc.statd [-d] rpc.statd [-d] -n rpc.statd [-d] [-l | -L | -N hostname]
| null | null |
cupsctl
|
cupsctl updates or queries the cupsd.conf file for a server. When no changes are requested, the current configuration values are written to the standard output in the format "name=value", one per line.
|
cupsctl - configure cupsd.conf options
|
cupsctl [ -E ] [ -U username ] [ -h server[:port] ] [ --[no-]debug-logging ] [ --[no-]remote-admin ] [ --[no-]remote-any ] [ --[no-]share-printers ] [ --[no-]user-cancel-any ] [ name=value ]
|
The following options are recognized: -E Enables encryption on the connection to the scheduler. -U username Specifies an alternate username to use when authenticating with the scheduler. -h server[:port] Specifies the server address. --[no-]debug-logging Enables (disables) debug logging to the error_log file. --[no-]remote-admin Enables (disables) remote administration. --[no-]remote-any Enables (disables) printing from any address, e.g., the Internet. --[no-]share-printers Enables (disables) sharing of local printers with other computers. --[no-]user-cancel-any Allows (prevents) users to cancel jobs owned by others.
|
Display the current settings: cupsctl Enable debug logging: cupsctl --debug-logging Get the current debug logging state: cupsctl | grep '^_debug_logging' | awk -F= '{print $2}' Disable printer sharing: cupsctl --no-share-printers KNOWN ISSUES You cannot set the Listen or Port directives using cupsctl. SEE ALSO cupsd.conf(5), cupsd(8), CUPS Online Help (http://localhost:631/help) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 26 April 2019 CUPS cupsctl(8)
|
DirectoryService
|
DirectoryService has been replaced by opendirectoryd(8). dspluginhelperd provides support for 3rd party DirectoryService plugins. More information can be accessed from the Darwin Open Directory Page: http://developer.apple.com/darwin/projects/opendirectory/
|
dspluginhelperd – support daemon for legacy DirectoryService plugins
|
dspluginhelperd [-v]
|
The options are as follows: -v Display the release version. DIAGNOSTICS See odutil(1) for information on enabling debug logging and various other options introspection of opendirectoryd. ERRORS Error codes are available using dserr(1) or from framework headers <DirectoryService/DirServiceTypes.h>. DirectoryService.framework is deprecated as of 10.6 and OpenDirectory.framework should be used instead. OPEN SOURCE The source code for dspluginhelperd is available as part of Apple's Darwin open source initiative. dspluginhelperd is part of the DirectoryService project. More information on Darwin may be found on the Web at http://developer.apple.com/darwin/projects/opendirectory/ DirectoryService API and Plug-in API are documented at http://developer.apple.com/referencelibrary/Networking/ The headers for the deprecated DirectoryService APIs can also be found in the following location: /System/Library/Frameworks/DirectoryService.framework/Headers/ FILES /Library/DirectoryServices/PlugIns location of third party plugins SEE ALSO opendirectoryd(8), odutil(1), DirectoryServiceAttributes(7), dscl(1), dsmemberutil(1), dscacheutil(1), dseditgroup(8), dsenableroot(8), dserr(8), pwpolicy(8) MacOSX June 23, 2010 MacOSX
| null |
notifyd
|
notifyd is the server for the Mac OS X notification system described in notify(3). The server is started automatically by launchd during system startup. The -d option causes notifyd to log debugging messages to a log file. Messages are not logged to ASL to avoid potential deadlocks, since the ASL system makes use of the notify(3) system. The default log file is /var/log/notifyd.log. An alternate log file path may be specified following the -log_file flag. The -shm_pages npages option sets the number of shared memory pages used for passive notification. The default is one page. If a value of zero is specified, shared memory is disabled and passive notifications are performed using IPC between the client and the server. SEE ALSO notify(3). Mac OS X March 24, 2003 Mac OS X
|
notifyd – notification server
|
notifyd [-d] [-log_file path] [-shm_pages npages]
| null | null |
klist_cdhashes
|
The klist_cdhashes command should not be run directly. SEE ALSO macOS 14.5 April 25, 2019 macOS 14.5
|
klist_cdhashes – reports information about kexts that have been approved via SKEL
|
klist_cdhashes
| null | null |
dtrace
|
DTrace is a comprehensive dynamic tracing framework ported from Solaris. DTrace provides a powerful infrastructure that permits administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs. The dtrace command provides a generic interface to the essential services provided by the DTrace facility, including: • Options that list the set of probes and providers currently published by DTrace • Options that enable probes directly using any of the probe description specifiers (provider, module, function, name) • Options that run the D compiler and compile one or more D program files or programs written directly on the command line • Options that generate anonymous tracing programs • Options that generate program stability reports • Options that modify DTrace tracing and buffering behavior and enable additional D compiler features You can use dtrace to create D scripts by using it in a shebang declaration to create an interpreter file. You can also use dtrace to attempt to compile D programs and determine their properties without actually enabling traces using the -e option.
|
dtrace – dynamic tracing compiler and tracing utility
|
dtrace [-aACeFhHlqSvVwZ] [-b bufsz] [-c cmd] [-D name [=value]] [-I path] [-L path] [-o output] [-s script] [-U name] [-x arg[=value]] [-p pid] [-P provider [[predicate] action]] [-m [provider:] module [[predicate] action]] [-f [[provider:] module:] function [[predicate] action]] [-n [[[provider:] module:] function:] name [[predicate] action]] [-i probe-id [[predicate] action]] [-W pname]
|
The arguments accepted by the -P, -m, -f, -n, and -i options can include an optional D language predicate enclosed in slashes and an optional D language action statement list enclosed in braces. D program code specified on the command line must be appropriately quoted to avoid interpretation of meta-characters by the shell. The following options are supported: -arch=value Set dtrace target data model. See arch(1) for a list of currently supported architectures. -a Claim anonymous tracing state and display the traced data. You can combine the -a option with the -e option to force dtrace to exit immediately after consuming the anonymous tracing state rather than continuing to wait for new data. -A Generate directives for anonymous (at boot) tracing and store them to NVRAM. This option constructs a set of dtrace configuration file directives to enable the specified probes for anonymous tracing and then exits. See also -a -b bufsz Set the principal trace buffer size to bufsz. The trace buffer size can include any of the size suffixes k, m, g, or t. If the buffer space cannot be allocated, dtrace attempts to reduce the buffer size or exit depending on the setting of the bufresize property. -c cmd Run the specified command cmd and exit upon its completion. If more than one -c option is present on the command line, dtrace exits when all commands have exited, reporting the exit status for each child process as it terminates. The process ID of the first command is made available to any D programs specified on the command line or using the -s option through the $target macro variable. -C Run the C preprocessor in clang(1) over D programs before compiling them. You can pass options to the C preprocessor using the -D, -U, -I, and -H options. -D name [=value] Define name when invoking clang(1) (enabled using the -C option). If you specify an additional value, the name is assigned the corresponding value. This option passes the -D option to each clang(1) invocation. -e Exit after compiling any requests and consuming anonymous tracing state (-a option) but prior to enabling any probes. You can combine this option with the -a option to print anonymous tracing data and exit. You can also combine this option with D compiler options. This combination verifies that the programs compile without actually executing them and enabling the corresponding instrumentation. -f [[provider:] module:] function [[predicate] action] Specify function name to trace or list (-l option). The corresponding argument can include any of the probe description forms provider:module:function, module:function, or function. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than function are specified in the description, all probes with the corresponding function are matched. The -f argument can be suffixed with an optional D probe clause. You can specify more than one -f option on the command line at a time. -F Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with ‘->’. Function return probe reports are unindented and their output is prefixed with ‘<-’. System call entry probe reports are indented and their output is prefixed with ‘=>’. System call return probe reports are unindented and their output is prefixed with ‘<=’. -h Generate a header file containing macros that correspond to probes in the specified provider definitions. If the -o option is present, the header file is saved using the pathname specified as the argument for that option. If the -o option is not present and the DTrace program is contained within a file whose name is filename.d, then the header file is saved using the name filename.h. -H Print the pathnames of included files when invoking clang(1) (enabled using the -C option). This option passes the -H option to each clang(1) invocation, causing it to display the list of pathnames, one for each line, to standard error. -i probe-id [[predicate] action] Specify probe identifier (probe-id) to trace or list (l option). You can specify probe IDs using decimal integers as shown by `dtrace -l`. The -i argument can be suffixed with an optional D probe clause. You can specify more than one -i option at a time. -I path Add the specified directory path to the search path for #include files when invoking clang(1) (enabled using the -C option). This option passes the -I option to each clang(1) invocation. The specified path is inserted into the search path ahead of the default directory list. -l List probes instead of enabling them. If the -l option is specified, dtrace produces a report of the probes matching the descriptions given using the -P, -m, -f, -n, -i, and -s options. If none of these options are specified, this option lists all probes. -L path Add the specified directory path to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that can be used when writing D programs. The specified path is added after the default library search path. -m [provider:] module [[predicate] action] Specify module name to trace or list (-l option). The corresponding argument can include any of the probe description forms provider:module or module. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than module are specified in the description, all probes with a corresponding module are matched. The -m argument can be suffixed with an optional D probe clause. More than one -m option can be specified on the command line at a time. -n [[[provider:] module:] function:] name [[predicate] action] Specify probe name to trace or list (-l option). The corresponding argument can include any of the probe description forms provider:module:function:name, module:function:name, function:name, or name. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than name are specified in the description, all probes with a corresponding name are matched. The -n argument can be suffixed with an optional D probe clause. More than one -n option can be specified on the command line at a time. -o output Specify the output file for the -l options, or for the traced data itself. The default output file is d.out. -p pid Grab the specified process-ID pid, cache its symbol tables, and exit upon its completion. If more than one -p option is present on the command line, dtrace exits when all commands have exited, reporting the exit status for each process as it terminates. The first process-ID is made available to any D programs specified on the command line or using the -s option through the $target macro variable. -P provider [[predicate] action] Specify provider name to trace or list (-l option). The remaining probe description fields module, function, and name are left blank and match any probes regardless of the values in those fields. The -P argument can be suffixed with an optional D probe clause. You can specify more than one -P option on the command line at a time. -q Set quiet mode. dtrace suppresses messages such as the number of probes matched by the specified options and D programs and does not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program statements such as ‘dtrace()’ and ‘printf()’ is displayed to standard output. -s script Compile the specified D program source file. If the -e option is present, the program is compiled but instrumentation is not enabled. If the -l option is present, the program is compiled and the set of probes matched by it is listed, but instrumentation is not enabled. If none of -e, -l or -A are present, the instrumentation specified by the D program is enabled and tracing begins. -S Show D compiler intermediate code. The D compiler produces a report of the intermediate code generated for each D program to standard error. -U name Undefine the specified name when invoking clang(1) (enabled using the -C option). This option passes the -U option to each clang(1) invocation. -v Print an interface stability report for a specified D program or listed probes. If probes are being listed with -l, report on each probe's description, arguments, and argument types (if available). -V Report the highest D programming interface version supported by dtrace. The version information is printed to standard output and the dtrace command exits. -w Permit destructive actions in D programs. Without -w, dtrace will not permit the compilation or enabling of a D program that contains destructive actions. Even with -w, destructive actions are not allowed if System Integrity Protection is enabled. See csrutil(8). -W pname Wait for the process named pname to launch. Once it has launched, compile and enable the provided D script. Upon exit of the process, dtrace exits. If more than one -W option is present on the command line, dtrace will stop each process immediately after it launches, start tracing when all processes have launched, and exit after all processes have exited. Only the first-specified process's PID will be available to D programs through the $target macro variable. Using this option automatically activates the -Z option. -x arg[=value] Enable or modify a DTrace runtime option or D compiler option. Boolean options are enabled by specifying their name. Options with values are set by separating the option name and value with an equals sign (=). See EXTRA OPTIONS for the exhaustive list of options. -Z Permit probe descriptions that match zero probes. If the -Z option is not specified, dtrace reports an error and exits if any probe descriptions specified in D program files (-s option) or on the command line (-P, -m, -f, -n, or -i options) contain descriptions that do not match any known probes. OPERANDS Zero or more additional arguments may be specified on the dtrace command line to define a set of macro variables ($1, $2, and so on) to be used in any D programs specified using the -s option or on the command-line. C++ MANGLED NAMES By default, dtrace uses the demangled names of C++ symbols. You can tell dtrace to use the mangled symbol names by passing -xmangled to the command. OBJECTIVE-C PROVIDER The Objective-C provider is similar to the pid provider, and allows instrumentation of Objective-C classes and methods. Objective-C probe specifiers use the following format: objcpid:[class-name[(category-name)]]:[[+|-]method-name]:[name] pid The id number of the process. class-name The name of the Objective-C class. category-name The name of the category within the Objective-C class. method-name The name of the Objective-C method. name The name of the probe, ‘entry’, ‘return’, or an integer instruction offset within the method. OBJECTIVE-C PROVIDER EXAMPLES objc123:NSString:-*:entry Every instance method of class NSString in process 123. objc123:NSString(*)::entry Every method on every category of class NSString in process 123. objc123:NSString(foo):+*:entry Every class method in NSString's foo category in process 123. objc123::-*:entry Every instance method in every class and category in process 123. objc123:NSString(foo):-dealloc:entry The dealloc method in the foo category of class NSString in process 123. objc123::method?with?many?colons?:entry The method method:with:many:colons: in every class in process 123. (A ? wildcard must be used to match colon characters inside of Objective-C method names, as they would otherwise be parsed as the provider field separators.) BUILDING CODE CONTAINING USDT PROBES The process of adding USDT probes to code is slightly different than documented in the Solaris Dynamic Tracing Guide. The steps for adding probes are as follows: 1. Name the provider and specify its probes, using the following form: provider Example { probe increment(int); }; This defines the Example provider with one probe, increment, that takes a single int argument. Providers can define multiple probes and probes can take multiple arguments. 2. Process the provider description into a header file. The provider description must be converted into a form usable by ObjC/C/C++ code. The dtrace command should be invoked with the -h option to do this. dtrace -h -s exampleProvider.d This will generate a header file named exampleProvider.h 3. Add probe invocations to the application. For each probe defined in the provider, the provider.h file will contain two macros. The naming is as follows: PROVIDER_PROBENAME() PROVIDER_PROBENAME_ENABLED() In the Example provider, the increment probe becomes: EXAMPLE_INCREMENT() EXAMPLE_INCREMENT_ENABLED() Place a macro invocation in the code at each site to be traced. If the arguments passed to a probe are expensive to calculate, you may guard the probe placement like this: if (EXAMPLE_INCREMENT_ENABLED()) { argument = /* Expensive argument calculation code here */; EXAMPLE_INCREMENT(argument); }; The if test will only succeed when the increment probe is active. 4. Compile and link your program normally. No additional compiler or linker flags are required. EXTRA OPTIONS These options can be set by either passing them to -x or be set in dtrace scripts using #pragma D option=value. Compile-time options amin=attributes Set the values for the minimum stability attributes for D program execution. attributes is a tuple of the form name-stability/data-stability/dependency-class. Valid interface and data stability attribute values are: • Internal: interfaces to dtrace implementation details. These interfaces might change between minor releases. • Private: interfaces to undocumented operating system implementation details. Might change between minor releases. • Obsolete: interfaces to currently-supported features which are scheduled to be removed in a future release. • External: interfaces to features not controlled by the operating system vendor. • Unstable: interfaces which may change without warning. • Evolving: may become Standard or Stable but may still change in a future major release. • Stable: Mature interface which should not change. • Standard: Complies with an industry standard and will not change. arch=value Set the target data model. See arch(1) for a list of currently supported architectures. Has the same effect as the -arch option. argref Ignore additional positional command-line arguments instead of reporting an error. core After execution is complete, cause dtrace to call abort(3) instead of exit(3). On some systems, this will create a core dump. cpp Run the C preprocessor in clang(1) over D programs before compiling them. Has the same effect as the -C option. cpphdrs Specify the -H option to clang(1) to print the name of each header file used. cpppath=path Sets the path of the clang(1) preprocessor ctypes=path Write out CTF definitions of all C types used in all programs at the end of a D compilation run in path. debug Enable DTrace debug messages. defaultargs Allow references to unspecified macro arguments. Use 0 as the value for an unspecified argument. define Adds an implicit #define into the predefines buffer of the preprocessor. Has the same effect as the -D option. disallow_dsym Do not use dSYM files for userspace symbolication. droptags Prints drop tags, [DTRACE_DROP_$TYPE] values describing drop types, to the drop tags handler (by default, to stderr). empty Allow compilation of empty D files. encoding=[ascii|utf8] Sets the encoding used for output. utf8 will show Unicode block elements for histograms. errtags Prefix default error message with error tags. evaltime=[preinit|postinit] Control when DTrace starts instrumenting a new process, before or after library initializers have run. incdir=value Add the specified directory to the search path for includes files in the preprocessor. iregs=value Size of the DIF (DTrace Intermediate Format) integer register set. The default value is 8. late=[dynamic|static] Sets whether references to dynamic translators are allowed. libdir=path Add a library directory in the library search path. mangled Show mangled symbols for C++/Swift probes instead of demangled symbols. nolibs Do not include D system libraries. Prevents access to dtrace system library identifiers but speeds up DTrace launch. nojtanalysis Disable jump table analysis. The default behavior of the pid provider is to not provide ‘return’ or offset probes for functions which appear to contain jump tables. "Jump tables are often generated for switch statements." Disabling jump table analysis can lead to inappropriately placed probes, data corruption, or even crashes in the target process. noerror Do not show error messages. pgmax=value Sets the maximum number of processes DTrace can grab at the same time. Default value is 8. preallocate=value[k|m] Preallocate memory in dtrace before running the script. pspec Interpret ambiguous specifiers as probe names. setenv=name=value Adds the variable name to the environment of launched processes, if name does not already exists. If name does exist in the environment, then its value is set to value strip Strip non-loadable sections from the D program. tree=value Bitmap to show the dtrace compiler parse tree at different stages (1|2|4). tregs=value Size of the DIF tuple register set. This controls the number of arguments that can be passed to functions. Default value is 8. undef=value Adds an implicit #undef value into the predefines buffer of the preprocessor. unsetenv=name Delete the variable name from the environment of launched processes if it exists. verbose Show D compiler intermediate code (DIFO). The D compiler will produce a report of the intermediate code generated for each D program to stderr(4) Has the same effect as the -S option. version Request a specific version of the DTrace scripting language. This will disable all identifiers / translators / functions that are from a newer version than the specified version. zdefs Permit probe descriptions that match zero probes. Has the same effect as the -Z option. Run-time Options aggsize=value [m|k] Sets the aggregation buffer size in bytes, kibi or mebibytes. bufsize=value[m|k] Sets the principal trace buffer size. Has the same effect as the -b option. buflimit=1-99 Threshold percentage of buffer size at which early buffer switches will be done. 75% is the default. bufpolicy=[ring|fill|switch] Sets the buffer policy. The default buffer policy is switch. bufresize=[auto|manual] Sets whether the per-CPU buffer size can be halved when the kernel cannot allocate enough memory. Auto is the default value. cleanrate=value[ns|us|ms|s|m|h|d|hz] Cleaning rate for speculative buffers. cpu=value CPU on which to enable tracing. destructive Allow destructive actions. Has the same effect as the -w option. dynvarsize=value Dynamic variable space size. grabanon Claim anonymous tracing state and display the trace data. Has the same effect as the -a option. nspec=value Number of speculative buffers. specsize=value[k|m] Speculation buffer size. stackframes=value Number of stack frames shown for kernel backtraces. statusrate=value[ns|us|ms|s|m|h|d|hz] Rate at which user space dtrace will poll the kernel for status. strsize=maxStringSize Maximum string size. temporal=[true|false] Sort events so that output is in time order. Defaults to true. ustackframes=frameCount Number of stack frames shown for userspace backtraces. Dynamic Run-time Options agghist=file ... [true|false] Shows a histogram for all aggregations. aggpack Pack aggregations together, only showing one line per aggregation. aggrate=value[us|ms|s|m|h|d|hz] Sets the aggregation buffer retrieval rate. aggsortkey Sort aggregation by key order with ties broken by value. aggsortkeypos=value Position of the aggregate key on which the output is sorted. aggsortpos=value Position in the argument in the aggregate function on which the output is sorted. aggsortrev Sort aggregations in reverse order. aggzoom Scales the height of bars in histograms in proportion of the bucket of greatest value instead of the full height of the histogram. flowindent Indent function entry/returns with -> / <-. Has the same effect as the -F option. quiet Output only explicitly traced data. Has the same effect as the -q option. rawbytes Always print tracemem output in hexadecimal. stackindent Number of white space characters to use when indenting stack() or ustack() output. stacksymbols=frameCount[true|false] Whether stack symbols are symbolicated or not. Defaults to true. switchrate=value[ns|us|ms|s|m|h|d|hz] Rate of principal buffer switching. SUPPORTED BUILT-IN VARIABLES dtrace supplies the following built-in, read-only variables. uint64_t arg0-arg9 Arguments of the current probe invocation represented as unsigned 64-bit integers. In the ‘entry’ probe actions of the syscall, mach_trap, fbt, and pid providers, these variables contain the traced function's arguments. In the ‘return’ probe actions of the fbt and pid providers, arg0 contains the instruction offset (into the function) from which the function returned and arg1 contains the function's return value. In the ‘return’ probe actions of the syscall and mach_trap providers, both arg0 and arg1 are set to the function's return value. The profile and tick providers set arg1 to the address of the instruction that was running when the action fired. args[] Typed arguments of the current probe, if available. See -v. uint64_t caller The kernel address of the instruction that called the current function. As DTrace actions are always called from kernel context, this variable is non-zero even when probes are triggered from user space. processorid_t cpu Integer identifier of the logical CPU on which this probe action triggered. uint64_t cpucycles (Darwin-specific) Number of CPU cycles elapsed on the current CPU. See also vcycles. uint64_t cpuinstrs (Darwin-specific) Number of instructions "retired" by the current logical CPU, if available. This count excludes instructions speculatively issued by the processor which didn't actually need to be executed. See also vinstrs. thread_t curthread Address of the OS thread structure corresponding to the thread which triggered the current probe action. user_addr_t dispatchqaddr (Darwin-specific) If the probe action was triggered from a user space context which included a dispatch queue, the address of that queue. uint_t id The current probe's unique identifier within the currently running OS, as shown with -l. uint_t epid A unique identifier representing the current probe action's enablement within the current D program. An action can match multiple probes. int errno Error value returned by the last system call performed on the current thread. string execname Current process name. gid_t gid Primary group ID of the current process. uint_t ipl Current interrupt level. On Darwin, either 0 or 1. uint64_t machtimestamp (Darwin-specific) Current mach_absolute_time() timestamp. uint64_t machctimestamp (Darwin-specific) Current mach_continuous_time() timestamp. pid_t pid Process ID of the current process. pid_t ppid Parent process ID of the current process. string probeprov, probemod, probefunc, probename Respectively, the names of the current probe's provider, module, function, and name. See -n. uint32_t stackdepth Number of kernel-mode stack frames on the current thread. id_t tid Thread ID of the current thread. uint64_t timestamp Current value in nanoseconds from some system-wide fixed point in the past. uid_t uid User ID of the current process. uint64_t ucaller The user space address from which the currently-running function was called, or zero if the function was called from the kernel. uint32_t ustackdepth Number of user space stack frames on the current thread. uint64_t uregs[] The current thread's register values immediately prior to the last transition from user to kernel execution. /usr/lib/dtrace/regs* provides constants for the indices of each register's value in the array. uint64_t vmregs[] The current virtual machine registers if available. uint64_t vcycles (Darwin-specific) Number of CPU cycles elapsed while running the current thread. This value includes cycles elapsed while processing interrupts with this thread. See also cpucycles. uint64_t vinstrs (Darwin-specific) Number of instructions retired by the current thread, if available. This value includes instructions retired while processing interrupts with this thread. See also cpuinstrs. uint64_t vtimestamp Time in nanoseconds that the current thread has spent running on any CPU. uint64_t walltimestamp Current number of nanoseconds since the Unix Epoch (00:00 UTC January 1st, 1970). SUPPORTED SUBROUTINES D subroutines can only effect internal D program state. Many D subroutines have no effects outside the current D program clause. const char* arguments accept either D string objects or pointers to C strings. C strings are assumed to be terminated with a NUL (0) byte. DTrace pointers refer to kernel virtual address space unless otherwise indicated. A number of DTrace's subroutines return scratch objects. These scratch objects are only valid for the current invocation of the immediately- enclosing D program clause. void* alloca(size_t* nbytes) Create a new nbytes-sized scratch buffer. string basename(const char* pathstr) Copy the last ‘/’-delimited component of pathstr into a new scratch string. void bcopy(void* src, void* scratch, size_t size) Copy size bytes from address src to the existing scratch buffer scratch. string cleanpath(const char* pathstr) Copy a canonical representation of pathstr into a new scratch string. The resulting string will not contain any unnecessary or redundant ‘./’ or ‘../’ substrings. void* copyin(user_addr_t src, size_t size) Copy size bytes from the current user space address src to a new scratch buffer. string copyinstr(user_addr_t src, [size_t maxchars]) Copy a NUL-terminated C string from the current user space address src into a new scratch string. If maxchars is specified, it will limit the total number of characters that can be copied. If it is not specified, the run-time option strsize will limit the maximum number of characters copied. void copyinto(user_addr_t src, size_t size, void *scratch) Copy size bytes from the current user space address src to the existing scratch buffer scratch. string dirname(const char *pathstr) Copy all but the last ‘/’-delimited component of pathstr into a new scratch string. major_t getmajor(dev_t dev) Extract the major device number for dev. minor_t getminor(dev_t dev) Extract the minor device number for dev. uint32_t htonl(uint32_t hostlong) Convert hostlong from host byte order to network byte order. uint64_t htonll(uint64_t hostlonglong) Convert hostlonglong from host byte order to network byte order. uint16_t htons(uint16_t hostshort) Convert hostshort from host byte order to network byte order. int index(const char* str, const char* searchstr, [int start]) Return the character offset of the first occurrence of searchstr within str, optionally starting the search at character offset start. int rindex(const char* str, const char* searchstr, [int start]) Return the character offset of the last occurrence of the C string searchstr within str, optionally starting the reverse-search at character offset start. string inet_ntoa(uint32_t* addr) Create a scratch string representing the IPv4 address pointed to by addr in dotted-decimal notation. string inet_ntoa6(struct in6_addr* addr) Create a scratch string representing the IPv6 address pointed to by addr in zero-compressed double-colon hexadecimal notation (specifically RFC 1884 convention 2). string inet_ntop(int addrfamily, void *addr) Create a scratch string representing the IP address of type addrfamily pointed to by addr. Valid values for addrfamily are AF_INET and AF_INET6. string json(string payload, string selector) Extract a single value represented by selector from a JSON object stored in payload. Element selectors support: • Simple strings for keys, for example key • dot-separated keys for nested objects, for example object.key • Array indexing, for example object.key[2].anotherkey string lltostr(int64_t val, [int baseN]) Create a scratch string representing val in base baseN notation. uint32_t ntohl(uint32_t netlong) Convert netlong from network byte order to host byte order. uint64_t ntohll(uint64_t netlonglong) Convert netlonglong from network byte order to host byte order. uint16_t ntohs(uint16_t netshort) Convert netshort from network byte order to host byte order. int progenyof(pid_t pid) Return non-zero if the calling process has a chain of parent processes leading to pid. int rand() Return a positive pseudo-random number. It is easy to predict these numbers so they should not be used for cryptographic purposes. int speculation() Create a speculative buffer for use with speculate(), returning the buffer's identifier. See also commit(). string strchr(const char* str, char c) If str contains c, copy the characters starting at the first occurrence of c and ending at the end of str into a new scratch string. If c is not present, return NULL. void* strip(void *ptr, uint8_t key) On platforms that support encoded pointers, strips the pointer authentication bits from ptr to produce a valid pointer. Valid values for key can be found in ptrauth.h. string strrchr(const char* str, char c) Like strchr(), but start from the last occurrence of c. size_t strlen(const char* str) Calculate the length of str in bytes. string strjoin(const char* str1, const char* str2) Concatenate str1 and str2 into a new scratch string. int64_t strtoll(const char *str, [int base]) Converts str into a signed integer, interpreted as base base if provided, at base 10 otherwise. string strstr(const char* str, const char* prefix) If str contains prefix, copy the characters from prefix to the end of the string into a new scratch string. If prefix is not present, return NULL. string strtok(const char* str, const char *delimchars) Like strtok(3), split str into multiple substrings, splitting on any of the characters in delimchars. If the str is non-NULL, return the first token. If str is non-NULL, return the next token from the most recently provided string. delimchars can be changed in subsequent calls. If no characters from delimchars are present whatever portion of str has not yet been tokenized, return NULL. string substr(const char* str, int start, [int length]) Copy the characters in str from character offset start through the end of the string into a new scratch string. length can be used to limit the number of characters copied to the new string. string tolower(const char *str) Copy str into a new scratch string, replacing all uppercase letters with their lowercase equivalents. uint64_t mtons(uint64_t time) (Darwin-specific) Convert time from either machtimestamp or machctimestamp, into nanoseconds. string toupper(const char* str) Copy str into a new scratch string, replacing all lowercase letters with their uppercase equivalents. void* vm_kernel_addrperm(void* addr) (Darwin-specific) Calculate the unpermuted (or "unslid") address corresponding to the raw kernel address addr. By default, DTrace uses, traces, and prints raw kernel addresses. Unpermuted addresses will correspond with other user-visible addresses such as those shown in kextstat(8). With default System Integrity Protection settings, D programs are not permitted to access kernel address values or kernel memory contents. csrutil(8) can be used to change the settings. SUPPORTED ACTIONS DTrace actions allow a D program to interact with the running system. The most benign actions record data to a DTrace buffer. Destructive actions have effects on the system and must be enabled with -w. void* pointers may refer to either D scratch buffers or kernel virtual addresses. void breakpoint() (destructive) Stop the kernel and wait for a debugger. void chill(int nsecs) (destructive) Spin inside DTrace for the specified number of nanoseconds. If this action is asked to spin for more than 500ms out of every second of wall clock time, an error will be reported. void clear(@aggr) Clear all values in @aggr. The keys are retained. See also trunc(). void commit(int specid) Copy the contents of the speculative buffer specid to the main tracing buffer. void copyout(void *src, user_addr_t *dst, size_t size) (destructive) Copy size bytes from the buffer src into the current address space address dst. void copyoutstr(void *src, user_addr_t *dst, size_t maxbytes) (destructive) Copy a NUL-terminated C string from src to the current user address space address dst, copying no more than maxbytes. void discard(int specid) Discard the speculative buffer specid. void exit(int status) Stop tracing, cause dtrace to print any final results, and exit with status. void freopen(const char* path) (destructive) Open path and associate it with dtrace's standard output (closing any previously-associated file). void ftruncate() Truncate dtrace's stdout. void kdebug_trace(uint32_t debugid, [uint64_t arg1], [uint64_t arg2], [uint64_t arg3], [uint64_t arg4]) (destructive, Darwin-specific) Emit an event to kdebug trace; arguments are optional and default to zero. debugid is a four-part bit field definied in sys/kdebug.h. void kdebug_trace_string(uint32_t debugid, uint64_t str_id, const char* str) (destructive, Darwin-specific) Emit a string identified with str_id to kdebug trace. debugid is the same as for kdebug_trace(). _symaddr func(user_addr_t addr) Print the symbol name corresponding to the kernel address addr. _symaddr mod(user_addr_t addr) Print the module name corresponding to the kernel address addr. void normalize(@aggr, int factor) When @aggr is traced, all of its values will be divided by factor. void denormalize(@aggr) Remove any normalization factor from @aggr. Tracing this aggregation will return the total counts. void panic() (destructive) Panic the kernel with a generic message. void print(expression) Pretty-print expression inculding types and internal data structure. A newline will be included. void printa([Ft string format], @aggr) Pretty-print @aggr. format can refer to the aggregation's keys in order. The aggregation's value can be accessed with the flag ‘@’. For example, to print just aggregations values, one per line printa("%@u\n", @a); void printf(string format, ...) Print a custom-formatted string like printf(3). void raise(int signum) (destructive) Send signum to the current process. void setopt(const char* option, [const char* value]) Set a dynamic run-time option. See Dynamic Run-time Options. void speculate(int specid) Set the speculative buffer specid as the destination for all further tracing in the current D program clause. stack stack([int nframes]) Record a kernel stack trace up to nframes deep. If nframes is not specified, record up to stackframes frames. See also Run-time Options. void stop() (destructive) Stop the current user process. void pidresume(pid_t pid) (destructive, Darwin-specific) Resume the process specified by pid. See also stop() and raise(). _symaddr sym(user_addr_t addr) Print the symbol name for the kernel address addr. void system(string program, ...) (destructive) Spawn program with any provided arguments in the same environment as dtrace. void trace(expression) Print expression. No newline is emitted. void tracemem(addr, size_t nbytes) Print a hexidecimal representation of nbytes starting at the kernel address addr. void trunc(@aggr, [topn]) Discard keys and their corresponding values from @aggr, optionally preserving the topn values and their corresponding keys. _usymaddr uaddr(user_addr_t addr) If available, pretty-print symbol information about the current user space address addr. This information will include applicable module, function, and symbol names, as well as offsets into functions for code. If not available or applicable, just print addr. _usymaddr usym(user_addr_t addr) If available, print the name of the symbol representing addr in the current process's user address space. Otherwise, print addr. _usymaddr ufunc(user_addr_t addr) If addr is within the boundaries of a known function in the current user space process, print the name of the function. Otherwise, print addr. _usymaddr umod(user_addr_t addr) If addr is within the boundaries of a known module in the current user space process, print the name of the module. Otherwise, print addr. stack ustack([int nframes]) Record a user stack trace up to nframes deep. If nframes isn't specified, record up to ustackframes frames. See also Run-time Options. EXIT STATUS The following exit statuses are returned: 0 Successful completion. For D program requests, an exit status of 0 indicates that programs were successfully compiled, probes were successfully enabled, or anonymous state was successfully retrieved. dtrace returns 0 even if the specified tracing requests encountered errors or drops. 1 An error occurred. For D program requests, an exit status of 1 indicates that program compilation failed or that the specified request could not be satisfied. 2 Invalid command line options or arguments were specified. SEE ALSO clang(1), bitesize.d(1m), cpuwalk.d(1m), csrutil(8), diskhits(1m), dtruss(1m), errinfo(1m), execsnoop(1m), iofile.d(1m), iofileb.d(1m), iopattern.d(1m), iopending.d(1m), iosnoop(1m), iotop(1m), kill.d(1m), lastwords(1m), newproc.d(1m), opensnoop(1m) How to Use Oracle Solaris DTrace from Oracle Solaris and OpenSolaris System, Oracle Corporation, 2010, http://www.oracle.com/technetwork/server-storage/solaris10/solaris- dtrace-wp-167895.pdf. Solaris Dynamic Tracing Guide, Oracle Corporation, 2010, http://docs.oracle.com/cd/E19253-01/817-6223/. Darwin August 17, 2017 Darwin
| null |
kextcache
|
The kextcache program creates kext caches, which speed up kext loading operations. It is invoked automatically as needed to rebuild system caches. Caution: Incorrect use of kextcache can render a volume incapable of startup. Installers and administrators should not use this program to update system kext caches. Instead they should run touch(1) on the /System/Library/Extensions/ directory of the installation target volume after they have finished, which invalidates the existing caches and causes the system to update all necessary kext caches. kextcache -update-volume can be used to wait for this process to complete. See “Apple Developer Technical Q&A QA1319: Installing an I/O Kit Kext Without Rebooting” for information on updating kext caches on prior releases of macOS. kextcache creates several kinds of kext caches. The first is the prelinked kernel (also known as a “prelinkedkernel”), which contains the kernel code and the essential files (info dictionary and executable) for an arbitrary set of kexts, with kext executables linked for their run- time locations. A prelinked kernel speeds early system startup by collecting these many files in one place for the booter to locate, and by having each kext linked in place and ready to start as needed. To create or update a prelinked kernel, use the -prelinked-kernel or -system-prelinked-kernel option. Other kext caches collect specific data from the info dictionaries of kexts. There are many individual caches for specific subsets of data; they care collectively called system info caches. These caches are used to optimize disk I/O when working with kexts during late system startup and beyond. To update the system kext info caches for the root volume, use the -system-caches option. PRIMARY OPTIONS You must specify one of these options to have kextcache do anything: -c [filename], -prelinked-kernel [filename] Create a prelinked kernel. filename is required unless this option is the last argument. If this option is the last argument and no filename is given, the startup prelinked kernel for the system is created. See -all-loaded. -system-prelinked-kernel This option is a convenience to update the prelinked kernel used for startup on the root volume, with all kexts in /System/Library/Extensions and /Library/Extensions that have been loaded to date. This option implies -all-loaded. -system-caches Rebuild the info caches for system kexts on the root volume. -i os_volume, -invalidate os_volume Rebuild out-of-date caches and update any helper partitions associated with os_volume. This option mimics sudo touch /System/Library/Extensions on os_volume. If kextcache cannot find or make sense of os_volume/usr/standalone/bootcaches.plist, the volume is treated as if no caches need updating: success is returned. -u os_volume, -update-volume os_volume Rebuild out-of-date caches and update any helper partitions associated with os_volume. os_volume/System/Library/Caches/com.apple.bootstamps/ is used as a cache of metadata from any helper partitions. See -caches-only and -force. Which caches are rebuilt depends on the macOS release installed on os_volume. If kextcache cannot find or make sense of os_volume/usr/standalone/bootcaches.plist the volume is treated as if no caches need updating: success is returned. -U os_volume Exit EX_OSFILE (72) if any updates were needed and were successfully made. -U is used during system startup to check whether the cache from which the currently-running kernel was loaded is out of date. System startup interprets an EX_OSFILE exit code to mean that the system should be immediately rebooted off the newer kernel cache. -Boot Used with -U to enable early boot behaviors such as limiting which caches must be updated. -e, -system-mkext This option is provided for legacy compatibility, and is simply an alias to -system-prelinked-kernel. -clear-staging Clears the kernel extension staging area by removing all staged content. -prune-staging Prunes the kernel extension staging area by removing all kernel extensions no longer present in their original location. PRELINKED KERNEL FILTERING OPTIONS These options restrict which kexts are included in a prelinked kernel. The options -arch and -bundle-id select kexts by supported architecture and bundle identifier; the remaining filtering options select kexts based on the value of their OSBundleRequired property. If these options are specified, the cache will contain only kexts whose OSBundleRequired property matches any of these options, or whose OSBundleRequired property is “Root” or “Console”. A prelinked kernel cache intended for a startup from a local disk should be created with the -local-root option, while a cache intended for startup from the network should be created with the -network-root option. When creating a prelinked kernel, if the -all-loaded option is specified, kexts requested by the kernel are always included regardless of these filtering options. -a arch, -arch arch Include in a prelinked kernel only kexts loadable on arch, thinning executables to that architecture before inclusion. Multiple architectures are allowed; in this case a multi- architecture file is created containing an embedded cache for each of the specified architectures. If no architectures are specified, a default set of architectures supported by the current macOS version is used (Mac OS X 10.6 and later). -b identifier, -bundle-id identifier Find the kext whose CFBundleIdentifier is identifier amongst known kexts and repository directories and include it in the prelinked kernel. The kext of the highest CFBundleVersion with the given identifier is used; in the case of version ties, the last such kext specified on the command line is used. This option may be specified multiple times; if so, the specified bundle identifiers select a subset from all named repositories and kexts, to which the remaining filters described in this section are then applied. -l, -local-root Specifies that for directory arguments, only extensions required for local disk boot be included in a cache. Kexts explicitly indicated by name or identifier are included unconditionally; to apply this filter to all kexts, use the -local-root-all option. -L, -local-root-all Specifies that only extensions required for local disk boot be included in a cache, regardless of whether they are from a repository directory or are explicitly indicated by name or identifier. To apply this restriction only to kexts from repository directories, use the -local-root option. -n, -network-root Specifies that for directory arguments, only extensions required for network disk boot be included in a cache. Kexts explicitly indicated by name or identifier are included unconditionally; to apply this filter to all kexts, use the -network-root-all option. -N, -network-root-all Specifies that only extensions required for network disk boot be included in a cache, regardless of whether they are from a repository directory or are explicitly indicated by name or identifier. To apply this restriction only to kexts from repository directories, use the -network-root option. -s, -safe-boot Specifies that for directory arguments, only extensions required for safe boot be included in a cache. Kexts explicitly indicated by name or identifier are included unconditionally; to apply this filter to all kexts, use the -safe-boot-all option. -S, -safe-boot-all Specifies that only extensions required for safe boot be included in a cache, regardless of whether they are from a repository directory or are explicitly indicated by name or identifier. To apply this restriction only to kexts from repository directories, use the -safe-boot option. OTHER OPTIONS AND ARGUMENTS kext_or_directory A kext bundle or a repository directory containing kexts to consider for inclusion in a prelinked kernel. The filtering options described under “PRELINKED KERNEL FILTERING OPTIONS” select the individual kexts to be included in the archive. If no filtering options are specified, then all kexts named as arguments are included (this is probably not what you want). -caches-only With -update-volume, skips updating any helper partitions even if they appear out of to date. -f, -force With -update-volume, rebuilds any helper partitions even if they appear up to date. If this version of kextcache does not understand bootcaches.plist well enough to be able to update the helpers, exit with EX_OSFILE (72). -Installer With -update-volume, implies -force while making helper partition updates optional. -F Run in low-priority mode, as when forked and executed by kextd(8). (This used to actually fork, but no longer does, as kextd(8) handles the forking.) -h, -help Print a help message describing each option flag and exit with a success result, regardless of any other options on the command line. -K kernel_filename, -kernel kernel_filename The name of the kernel file to use as the base of a prelinked kernel file (the default is /System/Library/Kernels/kernel). -q, -quiet Quiet mode; print no informational or error messages. -r, -all-loaded When creating a prelinked kernel, include all kexts in /System/Library/Extensions and /Library/Extensions that have been loaded by the machine running this command during this startup session. This include kexts loaded and later unloaded. -compressed Compress the prelinked kernel (enabled by default). -uncompressed Do not compress the prelinked kernel. If specified as the only other argument with -c, uncompresses an existing prelinked kernel file in place. -symbols symbol_directory Generate symbols for every kext in the prelinked kernel and save them in symbol_directory. The directory must already exist. Symbol files are named after the CFBundleIdentifier of each kext with a .sym suffix attached. -t, -print-diagnostics If a kext has validation, authentication, or dependency resolution problems, print them. Note that tests are performed in three stages: validation, authentication, and dependency resolution; a failure at any stage can make tests in further stages impossible. Thus, a kext with validation failures may have unreported authentication problems or missing dependencies. -v [0-6 | 0x####], -verbose [0-6 | 0x####] Verbose mode; print information about program operation. Higher levels of verbosity include all lower levels. By default kextcache prints only warnings and errors. You can specify a level from 0-6, or a hexadecimal log specification (as described in kext_logging(8)). The levels of verbose output are: 0 Print only errors (that is, suppress warnings); see also -quiet. 1 (or none) Print basic information about program operation. 2 Print basic information about program progress and files created. 3 Print information about individual kexts; for example, when a kext is added to or omitted from an archive. 4 Print information about compression and architectures processed. 5 Print debug-level information about internal operations. 6 Identical to level 5 for kextcache. Unlike in other kext tools, the -verbose flag in kextcache applies to all kexts (that is, it turns on hexadecimal bit 0x8 by default). See kext_logging(8) for more information on verbose logging. -volume-root path When creating caches for a volume other than the root volume, remove path from the beginning of absolute kext paths stored in the cache file. This ensures that the kext paths stored in the kernel are accurate when the caches are used for startup with that volume. -z, -no-authentication Don't authenticate kexts. This option is for convenience in building cache files. Caches used for startup must have proper ownership (root:wheel) and permissions (0644) in order to be used by the system. -- End of all options. Only kext or directory names follow. FILES /System/Library/Extensions/ The standard system repository of kernel extensions. /Library/Extensions/ The standard repository of non Apple kernel extensions. /System/Library/Caches/com.apple.kext.caches/ Contains system kext info caches for a macOS system. /System/Library/PrelinkedKernels/ Contains prelinked kernel for a macOS system. /System/Library/Kernels/kernel The default kernel file. /usr/standalone/bootcaches.plist Describes specific kext cache files for a macOS volume. /System/Library/Caches/com.apple.bootstamps/ Contains timestamp information about kext caches. /Library/StagedExtensions/ A directory used to stage copies of kernel extensions during validation and loading. DIAGNOSTICS kextcache exits with a zero status upon success. Upon failure, it prints an error message and exits with a nonzero status. BUGS Many single-letter options are inconsistent in meaning with (or directly contradictory to) the same letter options in other kext tools. SEE ALSO kmutil(8), kernelmanagerd(8), kext_logging(8), kextd(8), kextload(8), kextutil(8), kextstat(8), kextunload(8) Darwin November 14, 2012 Darwin
|
kextcache – create kext cache files
|
kextcache -prelinked-kernel filename [options] [--] [kext_or_directory ...] kextcache -system-prelinked-kernel [options] [--] [kext_or_directory ...] kextcache -system-caches [options] kextcache -update-volume os_volume [options] DEPRECATED The kextcache utility has been deprecated. It should no longer be necessary to use. See kmutil(8)
| null | null |
dbmmanage
| null |
dbmmanage - Manage user authentication files in DBM format
|
dbmmanage [ encoding ] filename add|adduser|check|delete|update username [ encpasswd [ group[,group...] [ comment ] ] ] dbmmanage filename view [ username ] dbmmanage filename import SUMMARY dbmmanage is used to create and update the DBM format files used to store usernames and password for basic authentication of HTTP users via mod_authn_dbm. Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by dbmmanage. This program can only be used when the usernames are stored in a DBM file. To use a flat-file database see htpasswd. Another tool to maintain a DBM password database is htdbm. This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in httpd see the httpd manual, which is part of the Apache distribution or can be found at http://httpd.apache.org/.
|
filename The filename of the DBM format file. Usually without the extension .db, .pag, or .dir. username The user for which the operations are performed. The username may not contain a colon (:). encpasswd This is the already encrypted password to use for the update and add commands. You may use a hyphen (-) if you want to get prompted for the password, but fill in the fields afterwards. Additionally when using the update command, a period (.) keeps the original password untouched. group A group, which the user is member of. A groupname may not contain a colon (:). You may use a hyphen (-) if you don't want to assign the user to a group, but fill in the comment field. Additionally when using the update command, a period (.) keeps the original groups untouched. comment This is the place for your opaque comments about the user, like realname, mailaddress or such things. The server will ignore this field. Encodings -d crypt encryption (default, except on Win32, Netware) -m MD5 encryption (default on Win32, Netware) -s SHA1 encryption -p plaintext (not recommended) Commands add Adds an entry for username to filename using the encrypted password encpasswd. dbmmanage passwords.dat add rbowen foKntnEF3KSXA adduser Asks for a password and then adds an entry for username to filename. dbmmanage passwords.dat adduser krietz check Asks for a password and then checks if username is in filename and if it's password matches the specified one. dbmmanage passwords.dat check rbowen delete Deletes the username entry from filename. dbmmanage passwords.dat delete rbowen import Reads username:password entries (one per line) from STDIN and adds them to filename. The passwords already have to be crypted. update Same as the adduser command, except that it makes sure username already exists in filename. dbmmanage passwords.dat update rbowen view Just displays the contents of the DBM file. If you specify a username, it displays the particular record only. dbmmanage passwords.dat view BUGS One should be aware that there are a number of different DBM file formats in existence, and with all likelihood, libraries for more than one format may exist on your system. The three primary examples are SDBM, NDBM, the GNU project's GDBM, and Berkeley DB 2. Unfortunately, all these libraries use different file formats, and you must make sure that the file format used by filename is the same format that dbmmanage expects to see. dbmmanage currently has no way of determining what type of DBM file it is looking at. If used against the wrong format, will simply return nothing, or may create a different DBM file with a different name, or at worst, it may corrupt the DBM file if you were attempting to write to it. dbmmanage has a list of DBM format preferences, defined by the @AnyDBM::ISA array near the beginning of the program. Since we prefer the Berkeley DB 2 file format, the order in which dbmmanage will look for system libraries is Berkeley DB 2, then NDBM, then GDBM and then SDBM. The first library found will be the library dbmmanage will attempt to use for all DBM file transactions. This ordering is slightly different than the standard @AnyDBM::ISA ordering in Perl, as well as the ordering used by the simple dbmopen() call in Perl, so if you use any other utilities to manage your DBM files, they must also follow this preference ordering. Similar care must be taken if using programs in other languages, like C, to access these files. One can usually use the file program supplied with most Unix systems to see what format a DBM file is in. Apache HTTP Server 2018-07-06 DBMMANAGE(1)
| null |
languagesetup
|
languagesetup The languagesetup command changes the default system language that is chosen in the Setup Assistant application. This affects the language shown at login window. -h Prints help -Localized Prints localized prompts in interactive mode (requires UTF8-capable terminal. This is the default mode.) -English Prints prompts in English. Languages appear as ISO-639 codes. -langspec Sets the language according to the ISO-639 code specified. Darwin April 1, 2015 Darwin
|
languagesetup – Set the primary language for the system.
|
languagesetup [-h] [-Localized | -English] [-langspec language]
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.