• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ print_revision函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中print_revision函数的典型用法代码示例。如果您正苦于以下问题:C++ print_revision函数的具体用法?C++ print_revision怎么用?C++ print_revision使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了print_revision函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mp_getopt

int mp_getopt(int *argc, char **argv[], const char *optstring,
                const struct option *longopts, int *longindex) {
    int c;

    while (1) {
        c = getopt_long(*argc, *argv, optstring, longopts, NULL);

        if (c == -1 || c == EOF)
            return c;

        /* Handle default opts */
        switch (c) {
            case 'h':
                print_help();
                exit(0);
            case 'V':
                print_revision();
                exit(0);
            case 'v':
                mp_verbose++;
                break;
            case MP_LONGOPT_EOPT:
                *argv = mp_eopt(argc, *argv, optarg);
                break;
            case 't':
                mp_timeout = (int)strtol(optarg, NULL, 10);
                break;
            default:
                // Let the caller handle this option
                return c;
        };
    }

    return EOF;
}
开发者ID:rjuju,项目名称:monitoringplug,代码行数:35,代码来源:mp_getopt.c


示例2: print_help

void
print_help (void)
{
  char *myport;

  asprintf (&myport, "%d", DEFAULT_PORT);

  print_revision (progname, revision);

  printf ("Copyright (c) 2000 Karl DeBisschop <[email protected]>\n");
  printf (COPYRIGHT, copyright, email);

  printf (_("This plugin test the DNS service on the specified host using dig"));

  printf ("\n\n");

  print_usage ();

  printf (_(UT_HELP_VRSN));

  printf (_(UT_HOST_PORT), 'p', myport);

  printf (" %s\n","-l, --lookup=STRING");
  printf ("    %s\n",_("machine name to lookup"));
  printf (" %s\n","-T, --record_type=STRING");
  printf ("    %s\n",_("record type to lookup (default: A)"));
  printf (" %s\n","-a, --expected_address=STRING");
  printf ("    %s\n",_("an address expected to be in the answer section.if not set, uses whatever was in -l"));
  printf (_(UT_WARN_CRIT));
  printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
  printf (_(UT_VERBOSE));
  printf (_(UT_SUPPORT));
}
开发者ID:Elbandi,项目名称:nagios-plugins,代码行数:33,代码来源:check_dig.c


示例3: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf (_(COPYRIGHT), copyright, email);

	printf ("%s\n", _("Check swap space on local machine."));

  printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (" %s\n", "-w, --warning=INTEGER");
  printf ("    %s\n", _("Exit with WARNING status if less than INTEGER bytes of swap space are free"));
  printf (" %s\n", "-w, --warning=PERCENT%%");
  printf ("    %s\n", _("Exit with WARNING status if less than PERCENT of swap space is free"));
  printf (" %s\n", "-c, --critical=INTEGER");
  printf ("    %s\n", _("Exit with CRITICAL status if less than INTEGER bytes of swap space are free"));
  printf (" %s\n", "-c, --critical=PERCENT%%");
  printf ("    %s\n", _("Exit with CRITCAL status if less than PERCENT of swap space is free"));
  printf (" %s\n", "-a, --allswaps");
  printf ("    %s\n", _("Conduct comparisons for all swap partitions, one by one"));
	printf (UT_VERBOSE);

	printf ("\n");
  printf ("%s\n", _("Notes:"));
  printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s."));

	printf (UT_SUPPORT);
}
开发者ID:abgandar,项目名称:nagios-plugins,代码行数:34,代码来源:check_swap.c


示例4: print_help

void print_help(void)
{
  char *mcport;
  asprintf(&mcport, "%d", MEMCACHED_PORT);

  print_revision (progname, revision);

  printf (_(MY_COPYRIGHT), copyright, email);

  printf ("%s\n", _("This program checks results of request sequentially: SET, GET, DELETE, GET"));

  printf ("\n\n");

  print_usage ();

  printf (_(UT_HELP_VRSN));
  printf (_(UT_EXTRA_OPTS));
  printf (_(UT_WARN_CRIT_RANGE));
  printf (_(UT_HOST_PORT), 'P', mcport);
  printf (" -E, --expire=INTEGER\n    expire time(second) for SET command (default: 0)\n");

#ifdef NP_EXTRA_OPTS
  printf ("\n");
  printf ("%s\n", _("Notes:"));
  printf (_(UT_EXTRA_OPTS_NOTES));
#endif

  /* printf (_(UT_SUPPORT)); */
  puts("\nRepository:\n  http://github.com/hirose31/nagios-check_memcached_paranoid/tree/master\n\n");
}
开发者ID:kuriyama,项目名称:nagios-check_memcached_paranoid,代码行数:30,代码来源:check_memcached_paranoid.c


示例5: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Ethan Galstad <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf ("%s\n", _("This plugin tests the STATUS of an HP printer with a JetDirect card."));
	printf ("%s\n", _("Net-snmp must be installed on the computer running the plugin."));

	printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (" %s\n", "-C, --community=STRING");
	printf ("    %s", _("The SNMP community name "));
	printf (_("(default=%s)"), DEFAULT_COMMUNITY);
	printf ("\n");
	printf (" %s\n", "-p, --port=STRING");
	printf ("    %s", _("Specify the port to check "));
	printf (_("(default=%s)"), DEFAULT_PORT);
	printf ("\n");

	printf (UT_SUPPORT);
}
开发者ID:Bobzikwick,项目名称:monitoring-plugins,代码行数:29,代码来源:check_hpjd.c


示例6: print_help

void print_help (void) {
    print_revision();
    print_revision_snmp();
    print_copyright();

    printf("\n");

    printf("Check description: %s", progdesc);

    printf("\n\n");

    print_usage();

    printf("\nIf no On/Off-Ports are defines all ports are asumed as should be On.\n");
    printf("\nOn/Off-Ports can be named or nubered. ex: --on '1,Outlet 3,4'\n");

    print_help_default();

    printf(" -o, --on=PORT[,PORTS]\n");
    printf("      Ports which should be On.\n");
    printf(" -O, --off=PORT[,PORTS]\n");
    printf("      Ports which should be Off.\n");

    print_help_snmp();
}
开发者ID:rjuju,项目名称:monitoringplug,代码行数:25,代码来源:check_apc_pdu.c


示例7: print_help

void print_help (void) {
    print_revision();
    print_revision_snmp();
    print_copyright();

    printf("\n");

    printf("Check description: %s", progdesc);

    printf("\n\n");

    print_usage();

    print_help_default();

    print_help_warn("remaining charge", DEFAULT_CHARGE_WARNING);
    print_help_crit("remaining charge", DEFAULT_CHARGE_CRITICAL);
    printf(" -W\n");
    printf("      Return warning if remaining runtime exceeds limit. "
           "Defaults to %s\n", DEFAULT_RUNTIME_WARNING);
    printf(" -Z\n");
    printf("      Return critical if remaining runtime exceeds limit. "
           "Defaults to %s\n", DEFAULT_RUNTIME_CRITICAL);
    printf(" -e, --extended-status\n");
    printf("      Print extended status.\n");

    print_help_snmp();
}
开发者ID:MonitoringPlug,项目名称:monitoringplug,代码行数:28,代码来源:check_snmp_ups.c


示例8: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Ethan Galstad <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf ("%s\n", _("This plugin will check either the average or maximum value of one of the"));
  printf ("%s\n", _("two variables recorded in an MRTG log file."));

  printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (" %s\n", "-F, --logfile=FILE");
  printf ("   %s\n", _("The MRTG log file containing the data you want to monitor"));
  printf (" %s\n", "-e, --expires=MINUTES");
  printf ("   %s\n", _("Minutes before MRTG data is considered to be too old"));
  printf (" %s\n", "-a, --aggregation=AVG|MAX");
  printf ("   %s\n", _("Should we check average or maximum values?"));
  printf (" %s\n", "-v, --variable=INTEGER");
  printf ("   %s\n", _("Which variable set should we inspect? (1 or 2)"));
  printf (" %s\n", "-w, --warning=INTEGER");
  printf ("   %s\n", _("Threshold value for data to result in WARNING status"));
  printf (" %s\n", "-c, --critical=INTEGER");
  printf ("   %s\n", _("Threshold value for data to result in CRITICAL status"));
	printf (" %s\n", "-l, --label=STRING");
  printf ("   %s\n", _("Type label for data (Examples: Conns, \"Processor Load\", In, Out)"));
  printf (" %s\n", "-u, --units=STRING");
  printf ("   %s\n", _("Option units label for data (Example: Packets/Sec, Errors/Sec,"));
  printf ("   %s\n", _("\"Bytes Per Second\", \"%% Utilization\")"));

  printf ("\n");
	printf (" %s\n", _("If the value exceeds the <vwl> threshold, a WARNING status is returned. If"));
  printf (" %s\n", _("the value exceeds the <vcl> threshold, a CRITICAL status is returned.  If"));
  printf (" %s\n", _("the data in the log file is older than <expire_minutes> old, a WARNING"));
  printf (" %s\n", _("status is returned and a warning message is printed."));

  printf ("\n");
	printf (" %s\n", _("This plugin is useful for monitoring MRTG data that does not correspond to"));
  printf (" %s\n", _("bandwidth usage.  (Use the check_mrtgtraf plugin for monitoring bandwidth)."));
  printf (" %s\n", _("It can be used to monitor any kind of data that MRTG is monitoring - errors,"));
  printf (" %s\n", _("packets/sec, etc.  I use MRTG in conjuction with the Novell NLM that allows"));
  printf (" %s\n", _("me to track processor utilization, user connections, drive space, etc and"));
  printf (" %s\n\n", _("this plugin works well for monitoring that kind of data as well."));

	printf ("%s\n", _("Notes:"));
  printf (" %s\n", _("- This plugin only monitors one of the two variables stored in the MRTG log"));
  printf ("   %s\n", _("file.  If you want to monitor both values you will have to define two"));
  printf ("   %s\n", _("commands with different values for the <variable> argument.  Of course,"));
  printf ("   %s\n", _("you can always hack the code to make this plugin work for you..."));
  printf (" %s\n", _("- MRTG stands for the Multi Router Traffic Grapher.  It can be downloaded from"));
  printf ("   %s\n", "http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html");

	printf (UT_SUPPORT);
}
开发者ID:abgandar,项目名称:nagios-plugins,代码行数:60,代码来源:check_mrtg.c


示例9: print_help

void print_help (void) {
    print_revision();
    print_revision_ldns();
    print_copyright();

    printf("\n");

    printf("Check description: %s", progdesc);

    printf("\n\n");

    print_usage();

    print_help_default();
    print_help_host();
    print_help_ldns();
    printf(" -D, --domain=DOMAIN\n");
    printf("      The name of the domain to check.\n");
    printf(" -T, --trace-from=DOMAIN\n");
    printf("      The name of the domain to trace from. (default: .)\n");
    printf(" -k, --trusted-keys=FILE\n");
    printf("      File to read trust-anchors from.\n");
    printf(" -R, --resolver=HOST\n");
    printf("      Host name or IP Address of the resolver to use.\n");

    printf("\n");
    print_help_ldns_keyfile();
}
开发者ID:MonitoringPlug,项目名称:monitoringplug,代码行数:28,代码来源:check_dnssec_trace.c


示例10: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf (_(COPYRIGHT), copyright, email);

	printf ("%s\n", _("This plugin checks the status of the Nagios process on the local machine"));
  printf ("%s\n", _("The plugin will check to make sure the Nagios status log is no older than"));
  printf ("%s\n", _("the number of minutes specified by the expires option."));
  printf ("%s\n", _("It also checks the process table for a process matching the command argument."));

  printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (" %s\n", "-F, --filename=FILE");
  printf ("    %s\n", _("Name of the log file to check"));
  printf (" %s\n", "-e, --expires=INTEGER");
  printf ("    %s\n", _("Minutes aging after which logfile is considered stale"));
  printf (" %s\n", "-C, --command=STRING");
  printf ("    %s\n", _("Substring to search for in process arguments"));
  printf (" %s\n", "-t, --timeout=INTEGER");
  printf ("    %s\n", _("Timeout for the plugin in seconds"));
  printf (UT_VERBOSE);

  printf ("\n");
  printf ("%s\n", _("Examples:"));
  printf (" %s\n", "check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagios");

  printf (UT_SUPPORT);
}
开发者ID:abgandar,项目名称:nagios-plugins,代码行数:35,代码来源:check_nagios.c


示例11: print_help

/* print usage help */
void print_help(void){

	print_revision(progname, NP_VERSION);

	printf("Copyright (c) 2001-2004 Ethan Galstad ([email protected])\n");
	printf (COPYRIGHT, copyright, email);

	printf("%s\n", _("This plugin tests the availability of DHCP servers on a network."));

  printf ("\n\n");

	print_usage();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (UT_VERBOSE);

	printf (" %s\n", "-s, --serverip=IPADDRESS");
  printf ("    %s\n", _("IP address of DHCP server that we must hear from"));
  printf (" %s\n", "-r, --requestedip=IPADDRESS");
  printf ("    %s\n", _("IP address that should be offered by at least one DHCP server"));
  printf (" %s\n", "-t, --timeout=INTEGER");
  printf ("    %s\n", _("Seconds to wait for DHCPOFFER before timeout occurs"));
  printf (" %s\n", "-i, --interface=STRING");
  printf ("    %s\n", _("Interface to to use for listening (i.e. eth0)"));
  printf (" %s\n", "-m, --mac=STRING");
  printf ("    %s\n", _("MAC address to use in the DHCP request"));
  printf (" %s\n", "-u, --unicast");
  printf ("    %s\n", _("Unicast testing: mimic a DHCP relay, requires -s"));

  printf (UT_SUPPORT);
	return;
	}
开发者ID:FatLASP,项目名称:nagios-plugins,代码行数:35,代码来源:check_dhcp.c


示例12: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Ethan Galstad\n");
	printf (COPYRIGHT, copyright, email);

	printf ("%s\n", _("This plugin checks the number of users currently logged in on the local"));
	printf ("%s\n", _("system and generates an error if the number exceeds the thresholds specified."));

	printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (" %s\n", "-w, --warning=INTEGER");
	printf ("    %s\n", _("Set WARNING status if more than INTEGER users are logged in"));
	printf (" %s\n", "-c, --critical=INTEGER");
	printf ("    %s\n", _("Set CRITICAL status if more than INTEGER users are logged in"));

	printf (UT_SUPPORT);
}
开发者ID:andersk,项目名称:nagios-plugins,代码行数:25,代码来源:check_users.c


示例13: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 2000 Karl DeBisschop <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf ("%s\n", _("This plugin wraps the text output of another command (plugin)"));
  printf ("%s\n", _("in HTML <A> tags, thus displaying the child plugin's output as a clickable link in"));
  printf ("%s\n", _("the Nagios status screen.  This plugin returns the status of the invoked plugin."));

  printf ("\n\n");

	print_usage ();

  printf (UT_HELP_VRSN);

  printf ("\n");
  printf ("%s\n", _("Examples:"));
	printf ("%s\n", _("Pay close attention to quoting to ensure that the shell passes the expected"));
  printf ("%s\n\n", _("data to the plugin. For example, in:"));
  printf (" %s\n\n", _("urlize http://example.com/ check_http -H example.com -r 'two words'"));
  printf ("    %s\n", _("the shell will remove the single quotes and urlize will see:"));
  printf (" %s\n\n", _("urlize http://example.com/ check_http -H example.com -r two words"));
  printf ("    %s\n\n", _("You probably want:"));
  printf (" %s\n", _("urlize http://example.com/ \"check_http -H example.com -r 'two words'\""));

	printf (UT_SUPPORT);
}
开发者ID:heavydawson,项目名称:nagios-plugins,代码行数:30,代码来源:urlize.c


示例14: print_help

void print_help (void) {
    print_revision();
    print_revision_ldns();
    print_copyright();

    printf("\n");

    printf("Check description: %s", progdesc);

    printf("\n\n");

    print_usage();

    print_help_default();
    print_help_host();
    printf(" -D, --domain=DOMAIN\n");
    printf("      The name of the domain to check.\n");
    printf("     --norecursion\n");
    printf("      Do not test for disabled recursion.\n");
    printf("     --notcp\n");
    printf("      Do not test TCP queries.\n");
    printf("     --noudp\n");
    printf("      Do not test UDP queries.\n");
    printf("     --noaxfrn\n");
    printf("      Do not test for disabled AXFR.\n");
}
开发者ID:rjuju,项目名称:monitoringplug,代码行数:26,代码来源:check_dns_authoritative.c


示例15: print_help

void print_help (void) {
    print_revision();
    print_copyright();

    printf("\n");

    printf("Check description: %s", progdesc);

    printf("\n\n");

    print_usage();

    print_help_default();
    print_help_host();
#ifdef USE_IPV6
    print_help_46();
#endif //USE_IPV6

    printf(" -p, --packets=[NUM]\n");
    printf("      Number of packets to send. (Default to 5)\n");
    printf(" -q, --quick\n");
    printf("      Return as soon as OK is reached.\n");
    printf(" -i, --interval=[SEC]\n");
    printf("      Number of secounds to wait between packets. (Default to 1)\n");
    printf(" -I, --interfact=[DEV]\n");
    printf("      Set the outgoing network device to use.\n");
    printf(" -T, --ttl=[NUM]\n");
    printf("      Set TTL of packets to given value.\n");
    printf(" -w, --warning=<rta>,<pl>%%\n");
    printf("      Return warning if check exceeds TRA or Packet loss limit.\n");
    printf("            (Default to 90ms and 10%%)\n");
    printf(" -c, --critical=<rta>,<pl>%%\n");
    printf("      Return critical if check exceeds TRA or Packet loss limit\n");
    printf("            (Default to 100ms and 20%%)\n");
}
开发者ID:roachchip,项目名称:monitoringplug,代码行数:35,代码来源:check_oping.c


示例16: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Nagios feature - 1999 Robert Dale <[email protected]>\n");
	printf ("(C) 1999 Ragnar Hojland Espinosa <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf (_("This plugin checks a local hard drive with the (Linux specific) SMART interface [http://smartlinux.sourceforge.net/smart/index.php]."));

  printf ("\n\n");

  print_usage ();

  printf (UT_HELP_VRSN);
  printf (UT_EXTRA_OPTS);

  printf (" %s\n", "-d, --device=DEVICE");
  printf ("    %s\n", _("Select device DEVICE"));
  printf ("    %s\n", _("Note: if the device is selected with this option, _no_ other options are accepted"));
  printf (" %s\n", "-i, --immediate");
  printf ("    %s\n", _("Perform immediately offline tests"));
  printf (" %s\n", "-q, --quiet-check");
  printf ("    %s\n", _("Returns the number of failed tests"));
  printf (" %s\n", "-1, --auto-on");
  printf ("    %s\n", _("Turn on automatic offline tests"));
  printf (" %s\n", "-0, --auto-off");
  printf ("    %s\n", _("Turn off automatic offline tests"));
  printf (" %s\n", "-n, --nagios");
  printf ("    %s\n", _("Output suitable for Nagios"));

  printf (UT_SUPPORT);
}
开发者ID:abradley,项目名称:nagios-plugins,代码行数:34,代码来源:check_ide_smart.c


示例17: print_help

void
print_help (void)
{
	char *myport;
	xasprintf (&myport, "%d", SSH_DFL_PORT);

	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Remi Paulmier <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf ("%s\n", _("Try to connect to an SSH server at specified server and port"));

  printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (UT_HOST_PORT, 'p', myport);

	printf (UT_IPv46);

	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);

	printf (" %s\n", "-r, --remote-version=STRING");
  printf ("    %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));

	printf (UT_VERBOSE);

	printf (UT_SUPPORT);
}
开发者ID:dermoth,项目名称:monitoring-plugins,代码行数:33,代码来源:check_ssh.c


示例18: print_help

void
print_help (void)
{
	char *myport;
	xasprintf (&myport, "%d", DEFAULT_PORT);

	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Didi Rieder ([email protected])\n");
	printf (COPYRIGHT, copyright, email);

	printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (UT_HOST_PORT, 'p', myport);

	printf (UT_IPv46);

	printf (" %s\n", "-a [--attr]");
  printf ("    %s\n", _("ldap attribute to search (default: \"(objectclass=*)\""));
  printf (" %s\n", "-b [--base]");
  printf ("    %s\n", _("ldap base (eg. ou=my unit, o=my org, c=at"));
  printf (" %s\n", "-D [--bind]");
  printf ("    %s\n", _("ldap bind DN (if required)"));
  printf (" %s\n", "-P [--pass]");
  printf ("    %s\n", _("ldap password (if required)"));
  printf (" %s\n", "-T [--starttls]");
  printf ("    %s\n", _("use starttls mechanism introduced in protocol version 3"));
  printf (" %s\n", "-S [--ssl]");
  printf ("    %s %i\n", _("use ldaps (ldap v2 ssl method). this also sets the default port to"), LDAPS_PORT);

#ifdef HAVE_LDAP_SET_OPTION
	printf (" %s\n", "-2 [--ver2]");
  printf ("    %s\n", _("use ldap protocol version 2"));
  printf (" %s\n", "-3 [--ver3]");
  printf ("    %s\n", _("use ldap protocol version 3"));
  printf ("    (%s %d)\n", _("default protocol version:"), DEFAULT_PROTOCOL);
#endif

	printf (UT_WARN_CRIT);

	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);

	printf (UT_VERBOSE);

	printf ("\n");
	printf ("%s\n", _("Notes:"));
	printf (" %s\n", _("If this plugin is called via 'check_ldaps', method 'STARTTLS' will be"));
	printf (_(" implied (using default port %i) unless --port=636 is specified. In that case\n"), DEFAULT_PORT);
	printf (" %s\n", _("'SSL on connect' will be used no matter how the plugin was called."));
	printf (" %s\n", _("This detection is deprecated, please use 'check_ldap' with the '--starttls' or '--ssl' flags"));
	printf (" %s\n", _("to define the behaviour explicitly instead."));

	printf (UT_SUPPORT);
}
开发者ID:abradley,项目名称:nagios-plugins,代码行数:59,代码来源:check_ldap.c


示例19: print_help

void
print_help (void)
{
	print_revision (progname, NP_VERSION);

	printf ("Copyright (c) 1999 Ethan Galstad <[email protected]>\n");
	printf (COPYRIGHT, copyright, email);

	printf (_("This plugin tests %s connections with the specified host (or unix socket).\n\n"),
	        SERVICE);

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (UT_HOST_PORT, 'p', "none");

	printf (UT_IPv46);

	printf (" %s\n", "-E, --escape");
  printf ("    %s\n", _("Can use \\n, \\r, \\t or \\\\ in send or quit string. Must come before send or quit option"));
  printf ("    %s\n", _("Default: nothing added to send, \\r\\n added to end of quit"));
  printf (" %s\n", "-s, --send=STRING");
  printf ("    %s\n", _("String to send to the server"));
  printf (" %s\n", "-e, --expect=STRING");
  printf ("    %s %s\n", _("String to expect in server response"), _("(may be repeated)"));
  printf (" %s\n", "-A, --all");
  printf ("    %s\n", _("All expect strings need to occur in server response. Default is any"));
  printf (" %s\n", "-q, --quit=STRING");
  printf ("    %s\n", _("String to send server to initiate a clean close of the connection"));
  printf (" %s\n", "-r, --refuse=ok|warn|crit");
  printf ("    %s\n", _("Accept TCP refusals with states ok, warn, crit (default: crit)"));
  printf (" %s\n", "-M, --mismatch=ok|warn|crit");
  printf ("    %s\n", _("Accept expected string mismatches with states ok, warn, crit (default: warn)"));
  printf (" %s\n", "-j, --jail");
  printf ("    %s\n", _("Hide output from TCP socket"));
  printf (" %s\n", "-m, --maxbytes=INTEGER");
  printf ("    %s\n", _("Close connection once more than this number of bytes are received"));
  printf (" %s\n", "-d, --delay=INTEGER");
  printf ("    %s\n", _("Seconds to wait between sending string and polling for response"));

#ifdef HAVE_SSL
	printf (" %s\n", "-D, --certificate=INTEGER[,INTEGER]");
  printf ("    %s\n", _("Minimum number of days a certificate has to be valid."));
  printf ("    %s\n", _("1st is #days for warning, 2nd is critical (if not specified - 0)."));
  printf (" %s\n", "-S, --ssl");
  printf ("    %s\n", _("Use SSL for the connection."));
#endif

	printf (UT_WARN_CRIT);

	printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);

	printf (UT_VERBOSE);

	printf (UT_SUPPORT);
}
开发者ID:fredrik-rambris,项目名称:monitoring-plugins,代码行数:58,代码来源:check_tcp.c


示例20: print_help

void
print_help (void)
{
	char *myport;

	xasprintf (&myport, "%d", DEFAULT_PORT);

	print_revision (progname, NP_VERSION);

	printf (COPYRIGHT, copyright, email);

	printf (_("Test whether a PostgreSQL Database is accepting connections."));

	printf ("\n\n");

	print_usage ();

	printf (UT_HELP_VRSN);
	printf (UT_EXTRA_OPTS);

	printf (UT_HOST_PORT, 'P', myport);

	printf (UT_IPv46);

	printf (" %s\n", "-d, --database=STRING");
	printf ("    %s", _("Database to check "));
	printf (_("(default: %s)"), DEFAULT_DB);
	printf (" %s\n", "-l, --logname = STRING");
	printf ("    %s\n", _("Login name of user"));
	printf (" %s\n", "-p, --password = STRING");
	printf ("    %s\n", _("Password (BIG SECURITY ISSUE)"));

	printf (UT_WARN_CRIT);

	printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);

	printf (UT_VERBOSE);

	printf ("\n");
	printf (" %s\n", _("All parameters are optional."));
	printf (" %s\n", _("This plugin tests a PostgreSQL DBMS to determine whether it is active and"));
	printf (" %s\n", _("accepting queries. In its current operation, it simply connects to the"));
	printf (" %s\n", _("specified database, and then disconnects. If no database is specified, it"));
	printf (" %s\n", _("connects to the template1 database, which is present in every functioning"));
	printf (" %s\n\n", _("PostgreSQL DBMS."));

	printf (" %s\n", _("The plugin will connect to a local postmaster if no host is specified. To"));
	printf (" %s\n", _("connect to a remote host, be sure that the remote postmaster accepts TCP/IP"));
	printf (" %s\n\n", _("connections (start the postmaster with the -i option)."));

	printf (" %s\n", _("Typically, the nagios user (unless the --logname option is used) should be"));
	printf (" %s\n", _("able to connect to the database without a password. The plugin can also send"));
	printf (" %s\n", _("a password, but no effort is made to obsure or encrypt the password."));

	printf (UT_SUPPORT);
}
开发者ID:abradley,项目名称:nagios-plugins,代码行数:56,代码来源:check_pgsql.c



注:本文中的print_revision函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ print_sockaddr函数代码示例发布时间:2022-05-30
下一篇:
C++ print_results函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap