当前位置: 首页>>代码示例>>C++>>正文


C++ print_revision函数代码示例

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


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


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