accel-cmd - Man Page
send commands to accel-ppp
Synopsis
accel-cmd [-n] [-4] [-6] [-f FAMILY] [-H HOST] [-p PORT] [-i TIMEOUT] [--] [COMMAND]
Description
accel-cmd is a client for accel-ppp's cli module. It sends COMMANDs to accel-ppp's tcp interface and displays the result on standard output. If no COMMAND is supplied, then accel-cmd reads and sends data from its standard input.
The "help" COMMAND can be used to get information about available COMMANDs and their syntax.
Options
- -f FAMILY, --family=FAMILY
Connect to HOST using the given protocol family. Supported families are inet (IPv4), inet6 (IPv6) and unspec (automatic).
- -4
Shorcut for --family=inet.
- -6
Shorcut for --family=inet6.
- -H HOST, --host=HOST
Set the host name or IP address to connect to. Defaults to localhost.
- -p PORT, --port=PORT
Set the service name or port number on which connection should be done. Defaults to 2001.
- -n, --numeric
Inhibit name resolution of HOST and PORT. In this case, HOST must be an IP address and PORT a numeric port number.
- -t TIMEOUT, --timeout=TIMEOUT
Set an inactivity timeout. TIMEOUT must be an integer and may be immediately followed by a time unit. Supported units are s (seconds), ms (milliseconds) and us (microseconds). The default unit is s. If this option is not supplied, or if TIMEOUT is zero, then no timeout is set.
- -P PASSWORD, --password=PASSWORD
Set the password. If this option is supplied and if PASSWORD is not empty, then password will be used for client authentication.
- -v, --verbose
Verbose output.
- -V, --version
Display version number and exit.
- -h, --help
Display help message and exit.
Examples
- Get information about available commands:
$ accel-cmd help
- Send the "show sessions" command to accel-ppp on localhost and display the result on standard output:
$ accel-cmd show sessions
- Execute commands stored in file "cmds":
$ accel-cmd < cmds
- Same as above, but send commands to another host and timeout after 1.5 seconds of inactivity:
$ accel-cmd --timeout 1500ms --host accelppp.example.com < cmds
Exit Status
- 0
success,
- 1
invalid command line option,
- 2
invalid parameter given to a command line option,
- 3
connection to accel-ppp failed,
- 4
timeout expired,
- 5
COMMAND too big (standard input may be used instead for sending big amounts of data),
- 100 (or above)
internal error.