开源软件名称(OpenSource Name):skx/sysadmin-util开源软件地址(OpenSource Url):https://github.com/skx/sysadmin-util开源编程语言(OpenSource Language):Perl 59.5%开源软件介绍(OpenSource Introduction):sysadmin-utilsThis repository contains a small collection of scripts that might be useful to sysadmins. I put it together myself to centralise the small tools that I find useful, and it seems to be popular. I used to solicit the inclusion of new tools, but have slowly come to realize that "less is more". I love the idea of sysadmins, developers, and other people building up their own toolkits, but also find that people submit things that I just don't understand the appeal of. It makes sense that personal-tools are very personal, but it does mean rejection is almost always the default behaviour and that makes me feel bad. Instead of adding things here consider this repository a small collection of things that I use, and if you want to take some/all of utilities into your own use then please do so. If not then I would strongly encourage you to consider what tools would make your daily-life more useful and then collect them, document them, and publish them yourself. In short the value here is the idea of collecting your commonmost utilities and making them easy to install and update from one central-source. Not the specific tools themselves. There is a replacement repository which is still open, and which new additions can be made more freely: agoShow how long ago a file/directory was modified in a human-readable fashion. Example:
Alternatives:
chronicRun a command, hiding STDOUT and STDERR if it completes successfully. Example:
This is designed to be used for cron-jobs, where output is generally ignored in the case of success. This was written by Joey Hess and is part of moreutils. cidr2ipGiven a set of CIDR ranges output the individual IPs in the range(s). Example:
collapseRemove extraneous whitespace from lines, and remove empty-lines entirely. Example:
Alternatives:
dupesReport on duplicate files, via a SHA1 hash of the contents, recursively. Example:
Alternatives: empty-dirIndicate, via return code, whether a given directory is empty or not. Example:
expand-ipv6Expand an abbreviated/compressed IPv6 address to the full-form. Example:
Alternatives:
graphite_sendA simple script to send a consistent set of metrics & values to a remote graphite instance. The metrics may be extended via small "plugins", which are nothing more than shell/perl/ruby/python scripts in a particular directory. Example:
NOTE Some metrics will only be sent if the invoking user is root. Alternatives ipaddrGet IP addresses easily, either all IPs, all those which are IPv4/IPv6, or those for a device. Designed primarily for scripting. Example:
Or to see all IPv6 addreses on eth0:
NOTE Requires compilation via Alternatives:
maybeIn a similar vein to It can be useful in scripts which need to test-failures, or which benefit from randomness: Example:
multi-pingPing a host, regardless of whether it is an IPv6 or IPv4 host. Example:
As a convenience you may also specify URIs as arguments, for example:
Requirements:
mysql-slave-checkIf the current host is a MySQL slave this script will test that the slave replication is still working. Replication is regarded as being OK if the following three conditions are true:
Example:
The script exits silently if all is well, unless you add "
Requirements:
pyhttpdA simple Python HTTP server, which has been updated to allow it to bind to arbitrary IP addresses, specifically to allow you to bind to localhost. Example:
or
randpassGenerate a single random password via Example:
(Adding "-f" uses the full alphabet of possible symbols, otherwise only alpha-numeric values are shown. "-n" sets the length of the generated password.) Existing alternatives:
sinceShow the new output since previously reading a file. This is useful for keeping track of logfile updates. Example:
Existing alternatives:
ssh-auth-typesShow the authentication types presented by a remote SSH server. Example:
ssh-testTest whether Example:
The format of the input-file is:
splaySleep for a random amount of time, limited by the given max value. (Default is 5 minutes). Example:
Existing alternatives: ssl-expiry-dateReport the date, and number of days, until the given SSL certificate expires. Multiple domain-names may be accepted and each is tested in turn. The default output is "noisy", but you may add "-d" to simplify this to the domain-name and the number of days remaining on the certificate. Example:
timeoutTimeout allows you to run a command which will be killed after the given number of seconds. Example:
until-successRepeat the specific command until it succeeds - run at least once always. Example:
Trivial (ba)sh alternatives:
when-upWaits until a given host is online, determined by ping, until executing a given command. Example:
Alternatives:
until-errorRepeat the specific command until it fails - run at least once always. Example:
Trivial (ba)sh alternatives:
when-downWaits until a given host is down Example:
Alternatives:
which-shellIdentify the shell we're running under. For example:
Existing alternatives:
with-lockRun a command, unless an existing copy of that command is already running, via the creation of a temporary lockfile. For example:
The lockfile-name is based upon the SHA1 hash of the command to be executed and the current User-ID. Existing alternatives:
ProblemsPlease report any issue/suggestions via the github repository: AuthorSteve Kemp steve@steve.org.uk |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论