lbcdclient

(Query a remote lbcd daemon for system load)

SYNOPSIS

lbcdclient [-2] [-p port] [-s service[,service ...]] [-t timeout] host

DESCRIPTION

lbcdclient sends a query packet to a remote lbcd server and prints the results. The result output will look something like this:

    PROTOCOL 3

    MACHINE STATUS:
    l1           = 16           (0.16)
    l5           = 5            (0.05)
    l15          = 6            (0.06)
    current_time = 1387677198   (2013-12-21 17:53:18)
    boot_time    = 1386357534   (2013-12-06 11:18:54)
    user_mtime   = 1387250916   (2013-12-16 19:28:36)
    tot_users    = 12
    uniq_users   = 1
    on_console   = false
    tmp_full     = 8%
    tmpdir_full  = 8%

    SERVICES (1):
    default (0): weight 368, increment 200

l1, l5, and l15 are the one-minute, five-minute, and fifteen-minute load averages, times 100, as integers. The conventional load averages, as seen with uptime, are shown on the right.

current_time is the current system time in seconds since epoch. boot_time is the time of the last system boot. user_mtime is the time information about logged-in users was last modified. A translation into a date and time is given on the right.

tot_users is the total number of logged-in users, and uniq_users is the number of unique logged-in users. on_console will be true if a user is logged into the console and false otherwise.

tmp_full is the percentage of space used in the system /tmp directory and tmpdir_full full is the percentage used in the system /var/tmp directory.

Finally, for protocol version three queries (the default), the last lines give information for each service queried, using the extended service response for the version three packet format. For each service, its name, sequence number in the reply, current weight, and current increment are given.

If the -2 option is used, lbcdclient will send a version two packet instead, and the returned results will not include the extended services output.

OPTIONS

--v2, -2

Send a version two protocol packet instead of a version three packet. Version two doesn't support the separate service weights.

-m, --man, --manual

Print out this documentation (which is done simply by feeding the script to perldoc -t).

--port=port, -p port

Send the query to port instead of the default of 4330.

--service=service, -s service,[service ...]

Request information for the specified service names. This option can be given multiple times to request information about multiple services. The services can also be specified as a comma-separated list, or a combination of multiple options and comma-separated lists.

--timeout=timeout, -t timeout

Use a timeout of timeout seconds instead of the default of 10 seconds.

EXAMPLES

Send a version three query to www.example.com and print the results:

    lbcdclient www.example.com

Send a version two query to foo.example.org on port 14330, asking for information about the smtp and http services in addition to the default service, with a timeout of five seconds.

    lbcdclient -2 -p 14330 -t 5 -s smtp -s http foo.example.org

AUTHORS

Written by Russ Allbery <eagle@eyrie.org> based on an earlier version by Larry Schwimmer.

COPYRIGHT AND LICENSE

Copyright 2000, 2004, 2006, 2012, 2013 The Board of Trustees of the Leland Stanford Junior University

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

lbcd(8)

The current version of this program is available from its web page at <http://www.eyrie.org/~eagle/software/lbcd/>.

Last modified and spun 2015-04-27