def get_status(options):
payload = {  <EOL>"<STR_LIT:username>": options.username,<EOL>"<STR_LIT:password>": options.password,<EOL>"<STR_LIT>": options.server,<EOL>"<STR_LIT:port>": options.port,<EOL>}<EOL>try:<EOL><INDENT>if options.server.startswith("<STR_LIT:/>") and stat.S_ISSOCK(os.stat(options.server).st_mode):  <EOL><INDENT>try:<EOL><INDENT>import supervisor.xmlrpc<EOL><DEDENT>except ImportError as error:<EOL><INDENT>sys.stderr.write("<STR_LIT>".format(error=error))<EOL>sys.stderr.write("<STR_LIT>")<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>if all([options.username, options.password, ]):  <EOL><INDENT>connection = xmlrpclib.ServerProxy("<STR_LIT>", transport=supervisor.xmlrpc.SupervisorTransport(options.username, options.password, serverurl=URI[URI_TPL_SOCKET].format(**payload)))<EOL><DEDENT>else:<EOL><INDENT>connection = xmlrpclib.ServerProxy("<STR_LIT>", transport=supervisor.xmlrpc.SupervisorTransport(None, None, serverurl=URI[URI_TPL_SOCKET].format(**payload)))<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>if all([options.username, options.password, ]):  <EOL><INDENT>connection = xmlrpclib.Server(URI[URI_TPL_HTTP_AUTH].format(**payload))<EOL><DEDENT>else:<EOL><INDENT>connection = xmlrpclib.Server(URI[URI_TPL_HTTP].format(**payload))<EOL><DEDENT><DEDENT>return connection.supervisor.getAllProcessInfo()<EOL><DEDENT>except Exception as error:<EOL><INDENT>if not options.quiet:<EOL><INDENT>sys.stdout.write("<STR_LIT>".format(error=error))<EOL><DEDENT>sys.exit(EXIT_CODES.get(options.network_errors_exit_code, EXIT_CODE_UNKNOWN))<EOL><DEDENT>
Get programs statuses.

:param options: parsed commandline arguments.
:type options: optparse.Values.
:return: supervisord XML-RPC call result.
:rtype: dict.