Age | Commit message (Collapse) | Author |
|
This moves file descriptor stating code into the new fdstats files, and
the config code into the new config files. Relevant updates made to
reference structs by pointer.
|
|
|
|
Technically a pid is a signed int, so the previous code was fine. But
using pid_t follows better practice.
|
|
Just memset the whole range to 0 rather than initializing each member.
|
|
This allows printing of total space taken by all open file descriptors
with `-sfd,--sizefd`, or all dead file descriptors with
`-sd,--sizedead`, or all live file descriptors with `-sl,--sizelive`.
Output is in kilobytes. This also introduces a new function, `fgetsize`,
which returns the byte count of a file path.
|
|
It is a common needed functionality for leaky services to be able to
easily zero out their dead file descriptors to prolong service lifetime
before a reboot is needed. This adds the switch `--truncate-dead` which
will cause fd-enum to truncate all dead file descriptors to zero length.
This saves effort and runtime where previously the list of dead
descriptors would need to be parsed and piped to another program for
zeroing. This is much faster.
|
|
This includes support to display statistics on a given pid's open file
descriptors. It also can print open file descriptor paths and resolved
paths by type. The current version of this tool has been tested on over
550,000 open file descriptors and performs well (runtime was about 6
seconds).
|