pcheck

Name

pcheck --  popcheck client

Synopsis

pcheck [-s SERVER, --server=SERVER] [-p PORT, --port=PORT] [-t TIMEOUT, --timeout=TIMEOUT] [--help] [--version] [-l, --get-load | -m MAILBOX, --get-mailbox=MAILBOX]

Description

This command is used for checking the proper function of the pcheckd. It will send a UDP request to the pcheckd running on the machine server (default: 127.0.0.1) on port port (default: 50110). It will wait for timeout seconds for an answer. The answer is printed on stdout.

There are two types of requests: The mailbox request (-m) will ask the server about the state of the named mailbox and will output it ('0 no mail', '1 mail', '2 new mail', or '3 load too high'). The load request (-l) will ask the server for the load avarage for the last minute.

The output of the command is the answer to the request returned by the server. It has the general format '+OK some message' if the request was successfull or '-ERR error message' if some error occured on the server side.

Options

--help

Get help on parameters.

--version

Print version information.

-s server

Host name or IP address of POPCHECK server.

-p port

UDP port for POPCHECK service on server.

-t timeout

Timeout in seconds when waiting for answer.

-l

Return load avarage of server.

-m mailbox

Name of mailbox to check.

Return Codes

0

Successful, 'no mails' when using option -m.

1

Successful, 'mails available' when using option -m.

2

Error connecting to server, other system errors or "-ERR" msg from server

3

Error while parsing the command line.

See Also

pcheckd(8), pclean(8), pcontrol(1), pdeliver(1), pproxy(8), pserv(8), pstatus(1), ptestpdm(1), The POPular Manual