aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fstat
Commit message (Collapse)AuthorAgeFilesLines
* fstat(1): Add EXAMPLES sectionFernando Apesteguía2020-11-191-3/+90
| | | | | | | | | | | | | | | | * Add examples covering -f, -m and -p flags. While here, extend the initial description paragraph to note that fstat(1) will report on all opened files, belonging to processes the user has access to. The current paragraph may lead to understand that you can get information on opened files from processes belonging to other users. Reviewed by: bjk@, danfe@, gbe@ Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26949 Notes: svn path=/head/; revision=367851
* Clean up and improve manual page for fuser(1)Mateusz Piotrowski2020-06-181-41/+41
| | | | | | | | | | | | | | | | | | | | | | - Mention option's arguments in the list of options (so that now we mention "-N system" instead of just "-N"). - Stylize signals and other constants like O_APPEND with Dv. - Sort options. - Change indentation width for readability. - Fix a couple of typos. - Sort symbols list. - Use Sy instead of Cm for symbols. They are not command modifiers. - Use Ex -std in the EXIT STATUS section for consistency with other manual pages. - Use Ql instead of Dq Li for inline code examples as Li has recently been deprecated by mdoc. Reviewed by: bcr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25332 Notes: svn path=/head/; revision=362324
* Clean up fstat.1Mateusz Piotrowski2020-06-171-46/+63
| | | | | | | | | | | | | | | | | | | | | - Sort options in the list & indent for readability. - Pet linters - Use "\(em" instead of "--" - Remove Tn macros - Use Ql instead of Dq Li - Add arguments to the -M, -N, -p, and -u options in their descriptions. - Use Sy instead of Li for field names. Li is deprecated, and Ql makes no sense here. - Replace a literal block with a list for the table of special names related to FD. - Use Ql instead of ``X''. - Add a dot after etc. - Reference fuser(1). MFC after: 1 week Notes: svn path=/head/; revision=362290
* Grammar fix.Jeremie Le Hen2019-10-281-1/+1
| | | | | | | | Reported by: imp Differential Revision: https://reviews.freebsd.org/D21880 Notes: svn path=/head/; revision=354140
* Add the fstat -s option to display socket information.Jeremie Le Hen2019-10-192-7/+95
| | | | | | | | | | Reviewed by: jilles MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21880 Notes: svn path=/head/; revision=353769
* Print type designator 'D' for the KF_TYPE_DEV files.Konstantin Belousov2018-12-031-0/+2
| | | | | | | | | | No type-specific data is provided by the kernel. Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=341448
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-273-0/+6
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* fstat: catch up with r318997 and use 64 bits to store fsidAndriy Gapon2017-06-101-1/+1
| | | | | | | Discussed with: kib Notes: svn path=/head/; revision=319802
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Updated dependenciesSimon J. Gerraty2013-10-131-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256419
| * | Merge from headSimon J. Gerraty2013-09-052-0/+31
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ sync from headSimon J. Gerraty2013-04-121-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | | Similar to 233760 and 236717, export some more useful info about theJohn Baldwin2013-05-032-0/+31
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel-based POSIX semaphore descriptors to userland via procstat(1) and fstat(1): - Change sem file descriptors to track the pathname they are associated with and add a ksem_info() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and ksem_info() to export the path, mode, and value of a semaphore via struct kinfo_file. - Add a struct semstat to the libprocstat(3) interface along with a procstat_get_sem_info() to export the mode and value of a semaphore. - Teach fstat about semaphores and to display their path, mode, and value. MFC after: 2 weeks Notes: svn path=/head/; revision=250223
* | fuser(1) requires a filename.Eitan Adler2013-04-111-1/+1
|/ | | | | | | | | Reviewed by: lstewart Approved by: bcr (mentor) MFC after: 3 days Notes: svn path=/head/; revision=249359
* Bring DPADD in sync with LDADD.Marcel Moolenaar2012-05-191-1/+1
| | | | Notes: svn path=/head/; revision=235642
* Don't cast inode number or file size down to long or unsigned.Gleb Kurtsou2012-05-181-1/+1
| | | | | | | | | | Since ino_t size is about to change to 64-bits, casts to long would truncate 64-bit numbers on 32-bit archs. Sponsored by: Google Summer of Code 2011 Notes: svn path=/head/; revision=235602
* Export some more useful info about shared memory objects to userlandJohn Baldwin2012-04-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. MFC after: 2 weeks Notes: svn path=/head/; revision=233760
* Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-291-1/+1
| | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
* Backout r230934 which didn't work with unix sockets andSergey Kandaurov2012-02-271-34/+8
| | | | | | | | | several filesystem layers mounted at the specified path. Pointy hat to: pluknet Notes: svn path=/head/; revision=232233
* Print the owner process for unix domain sockets when restricted to theSergey Kandaurov2012-02-031-8/+34
| | | | | | | | | | specified files. PR: bin/143962 MFC after: 2 weeks Notes: svn path=/head/; revision=230934
* Spelling fixes for usr.bin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228992
* Mark global functions and/or variables in fstat(1) static where possible.Ed Schouten2011-11-062-11/+11
| | | | | | | This allows compilers and static analyzers to more thorough analysis. Notes: svn path=/head/; revision=227239
* Correct column with for device numbers made in previous change.Ed Schouten2011-10-011-1/+1
| | | | | | | The device number should be displayed using only five columns -- not eight. Notes: svn path=/head/; revision=225893
* Get rid of major/minor number distinction.Ed Schouten2011-09-282-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | As of FreeBSD 6, devices can only be opened through devfs. These device nodes don't have major and minor numbers anymore. The st_rdev field in struct stat is simply based a copy of st_ino. Simply display device numbers as hexadecimal, using "%#jx". This is allowed by POSIX, since it explicitly states things like the following (example taken from ls(1)): "If the file is a character special or block special file, the size of the file may be replaced with implementation-defined information associated with the device in question." This makes the output of these commands more compact. For example, ls(1) now uses approximately four columns less. While there, simplify the column length calculation from ls(1) by calling snprintf() with a NULL buffer. Don't be afraid; if needed one can still obtain individual major/minor numbers using stat(1). Notes: svn path=/head/; revision=225847
* fuser: Fix skipping "SIG" on signal names (-s).Jilles Tjoelker2011-06-181-3/+2
| | | | | | | | | | The code did !strncasecmp(str, "sig", 4) which is not useful. Also change "sig" to "SIG" matching the uppercase signal names as of r218285. This has little effect because fuser does not enable locale. Notes: svn path=/head/; revision=223271
* mdoc: reorder sections consistentlyUlrich Spörlein2011-06-021-10/+10
| | | | Notes: svn path=/head/; revision=222600
* - Fix several typos [1]Stanislav Sedov2011-05-141-6/+11
| | | | | | | | | | - fuser(1) writes usernames to stderr, not stdout [1] - Add history section. Submitted by: Pieter de Goeje <pieter@degoeje.nl> [1] Notes: svn path=/head/; revision=221874
* uintmax_t is a better type here...Warner Losh2011-05-121-1/+1
| | | | | | | Submitted by: avg@ Notes: svn path=/head/; revision=221819
* Fix printf int mismatch on 32-bit architectures...Warner Losh2011-05-121-2/+3
| | | | Notes: svn path=/head/; revision=221816
* - Commit work from libprocstat project. These patches add support for runtimeStanislav Sedov2011-05-1210-1194/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | file and processes information retrieval from the running kernel via sysctl in the form of new library, libprocstat. The library also supports KVM backend for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have been modified to take advantage of the library (as the bonus point the fstat(1) utility no longer need superuser privileges to operate), and the procstat(1) utility is now able to display information from memory dumps as well. The newly introduced fuser(1) utility also uses this library and able to operate via sysctl and kvm backends. The library is by no means complete (e.g. KVM backend is missing vnode name resolution routines, and there're no manpages for the library itself) so I plan to improve it further. I'm commiting it so it will get wider exposure and review. We won't be able to MFC this work as it relies on changes in HEAD, which was introduced some time ago, that break kernel ABI. OTOH we may be able to merge the library with KVM backend if we really need it there. Discussed with: rwatson Notes: svn path=/head/; revision=221807
* Finally... Import the latest open-source ZFS version - (SPA) 28.Pawel Jakub Dawidek2011-02-271-0/+1
| | | | | | | | | | | | | | | | | | Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month Notes: svn path=/head/; revision=219089
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-113-12/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Fix typos and spelling mistakes.Joel Dahl2010-08-061-1/+1
| | | | Notes: svn path=/head/; revision=210933
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* fstat: fix fsid comparison when executed on systems with 64-bit longAndriy Gapon2009-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This affects only fstat on zfs and devfs, only on 64-bit systems and only when fsid is greater than 2^31 - 1. When fstat examines a file via stat(2) it takes uint32_t st_dev and assigns to (signed) (64-bit) long fsid, this results in a positive value. When fstat examines opened files it takes int32_t f_fsid.val[0] and assigns to (signed) (64-bit) long fsid, this results in a negative value. So, while initially st_dev and f_fsid.val[0] have the same bit values they get promoted to different 64-bit values because of the signed-vs-unsigned difference. A fix is to use "more natural" positive numbers by introducing intermediate unsigned cast for f_fsid.val[0]. Reviewed by: jhb, lulf Approved by: re (kib) MFC after: 1 week (to stable/7) Notes: svn path=/head/; revision=196399
* Add manual page links to advertise procstat(1) a little better.Edward Tomasz Napierala2009-07-091-1/+2
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=195502
* Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementationDoug Rabson2009-06-241-1/+0
| | | | | | | and will be removed. Notes: svn path=/head/; revision=194880