check_disk.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. /******************************************************************************
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  13. $Id$
  14. *****************************************************************************/
  15. const char *progname = "check_disk";
  16. const char *program_name = "check_disk"; // Required for coreutils libs
  17. const char *revision = "$Revision$";
  18. const char *copyright = "1999-2003";
  19. const char *email = "nagiosplug-devel@lists.sourceforge.net";
  20. #include "common.h"
  21. #if HAVE_INTTYPES_H
  22. # include <inttypes.h>
  23. #endif
  24. #include <assert.h>
  25. #include "popen.h"
  26. #include "utils.h"
  27. #include <stdarg.h>
  28. #include "../lib/fsusage.h"
  29. #include "../lib/mountlist.h"
  30. #if HAVE_LIMITS_H
  31. # include <limits.h>
  32. #endif
  33. /* If nonzero, show inode information. */
  34. /* static int inode_format; */
  35. /* If nonzero, show even filesystems with zero size or
  36. uninteresting types. */
  37. static int show_all_fs = 1;
  38. /* If nonzero, show only local filesystems. */
  39. static int show_local_fs = 0;
  40. /* If positive, the units to use when printing sizes;
  41. if negative, the human-readable base. */
  42. /* static int output_block_size; */
  43. /* If nonzero, invoke the `sync' system call before getting any usage data.
  44. Using this option can make df very slow, especially with many or very
  45. busy disks. Note that this may make a difference on some systems --
  46. SunOs4.1.3, for one. It is *not* necessary on Linux. */
  47. /* static int require_sync = 0; */
  48. /* A filesystem type to display. */
  49. struct name_list
  50. {
  51. char *name;
  52. int found;
  53. uintmax_t w_df;
  54. uintmax_t c_df;
  55. double w_dfp;
  56. double c_dfp;
  57. struct name_list *name_next;
  58. };
  59. /* Linked list of filesystem types to display.
  60. If `fs_select_list' is NULL, list all types.
  61. This table is generated dynamically from command-line options,
  62. rather than hardcoding into the program what it thinks are the
  63. valid filesystem types; let the user specify any filesystem type
  64. they want to, and if there are any filesystems of that type, they
  65. will be shown.
  66. Some filesystem types:
  67. 4.2 4.3 ufs nfs swap ignore io vm efs dbg */
  68. /* static struct name_list *fs_select_list; */
  69. /* Linked list of filesystem types to omit.
  70. If the list is empty, don't exclude any types. */
  71. static struct name_list *fs_exclude_list;
  72. static struct name_list *dp_exclude_list;
  73. static struct name_list *path_select_list;
  74. static struct name_list *dev_select_list;
  75. /* Linked list of mounted filesystems. */
  76. static struct mount_entry *mount_list;
  77. /* For long options that have no equivalent short option, use a
  78. non-character as a pseudo short option, starting with CHAR_MAX + 1. */
  79. enum
  80. {
  81. SYNC_OPTION = CHAR_MAX + 1,
  82. NO_SYNC_OPTION,
  83. BLOCK_SIZE_OPTION
  84. };
  85. #ifdef _AIX
  86. #pragma alloca
  87. #endif
  88. int process_arguments (int, char **);
  89. void print_path (const char *mypath);
  90. int validate_arguments (uintmax_t, uintmax_t, double, double, char *);
  91. int check_disk (double usp, double free_disk);
  92. int walk_name_list (struct name_list *list, const char *name);
  93. void print_help (void);
  94. void print_usage (void);
  95. uintmax_t w_df = 0;
  96. uintmax_t c_df = 0;
  97. double w_dfp = -1.0;
  98. double c_dfp = -1.0;
  99. char *path;
  100. char *exclude_device;
  101. char *units;
  102. uintmax_t mult = 1024 * 1024;
  103. int verbose = 0;
  104. int erronly = FALSE;
  105. int display_mntp = FALSE;
  106. /* Linked list of mounted filesystems. */
  107. static struct mount_entry *mount_list;
  108. int
  109. main (int argc, char **argv)
  110. {
  111. double usp = -1.0;
  112. int result = STATE_UNKNOWN;
  113. int disk_result = STATE_UNKNOWN;
  114. char file_system[MAX_INPUT_BUFFER];
  115. char *output;
  116. char *details;
  117. char *perf;
  118. uintmax_t psize;
  119. float free_space, free_space_pct, total_space;
  120. struct mount_entry *me;
  121. struct fs_usage fsp;
  122. struct name_list *temp_list;
  123. output = strdup (" - free space:");
  124. details = strdup ("");
  125. perf = strdup ("");
  126. setlocale (LC_ALL, "");
  127. bindtextdomain (PACKAGE, LOCALEDIR);
  128. textdomain (PACKAGE);
  129. mount_list = read_filesystem_list (0);
  130. if (process_arguments (argc, argv) != OK)
  131. usage (_("check_disk: could not parse arguments\n"));
  132. for (me = mount_list; me; me = me->me_next) {
  133. if (path_select_list &&
  134. (walk_name_list (path_select_list, me->me_mountdir) ||
  135. walk_name_list (path_select_list, me->me_devname) ) )
  136. get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
  137. else if (dev_select_list || path_select_list)
  138. continue;
  139. else if (me->me_remote && show_local_fs)
  140. continue;
  141. else if (me->me_dummy && !show_all_fs)
  142. continue;
  143. else if (fs_exclude_list && walk_name_list (fs_exclude_list, me->me_type))
  144. continue;
  145. else if (dp_exclude_list &&
  146. (walk_name_list (dp_exclude_list, me->me_devname) ||
  147. walk_name_list (dp_exclude_list, me->me_mountdir)))
  148. continue;
  149. else
  150. get_fs_usage (me->me_mountdir, me->me_devname, &fsp);
  151. if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
  152. usp = (double)(fsp.fsu_blocks - fsp.fsu_bavail) * 100 / fsp.fsu_blocks;
  153. disk_result = check_disk (usp, (double)(fsp.fsu_bavail * fsp.fsu_blocksize / mult));
  154. result = max_state (disk_result, result);
  155. psize = fsp.fsu_blocks*fsp.fsu_blocksize/mult;
  156. asprintf (&perf, "%s %s", perf,
  157. perfdata ((!strcmp(file_system, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
  158. psize-(fsp.fsu_bavail*fsp.fsu_blocksize/mult), units,
  159. TRUE, min ((uintmax_t)psize-(uintmax_t)w_df, (uintmax_t)((1.0-w_dfp/100.0)*psize)),
  160. TRUE, min ((uintmax_t)psize-(uintmax_t)c_df, (uintmax_t)((1.0-c_dfp/100.0)*psize)),
  161. TRUE, 0,
  162. TRUE, psize));
  163. if (disk_result==STATE_OK && erronly && !verbose)
  164. continue;
  165. free_space = (float)fsp.fsu_bavail*fsp.fsu_blocksize/mult;
  166. free_space_pct = (float)fsp.fsu_bavail*100/fsp.fsu_blocks;
  167. total_space = (float)fsp.fsu_blocks*fsp.fsu_blocksize/mult;
  168. if (disk_result!=STATE_OK || verbose>=0)
  169. asprintf (&output, ("%s %s %.0f %s (%.0f%%);"),
  170. output,
  171. (!strcmp(file_system, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
  172. free_space,
  173. units,
  174. free_space_pct);
  175. asprintf (&details, _("%s\n\
  176. %.0f of %.0f %s (%.0f%%) free on %s (type %s mounted on %s) warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%"),
  177. details, free_space, total_space, units, free_space_pct,
  178. me->me_devname, me->me_type, me->me_mountdir,
  179. (unsigned long)w_df, (unsigned long)c_df, w_dfp, c_dfp);
  180. }
  181. }
  182. asprintf (&output, "%s|%s", output, perf);
  183. if (verbose > 2)
  184. asprintf (&output, "%s%s", output, details);
  185. /* Override result if paths specified and not found */
  186. temp_list = path_select_list;
  187. while (temp_list) {
  188. if (temp_list->found != TRUE) {
  189. asprintf (&output, _("%s [%s not found]"), output, temp_list->name);
  190. result = STATE_CRITICAL;
  191. }
  192. temp_list = temp_list->name_next;
  193. }
  194. printf ("DISK %s%s\n", state_text (result), output);
  195. return result;
  196. }
  197. /* process command-line arguments */
  198. int
  199. process_arguments (int argc, char **argv)
  200. {
  201. int c;
  202. struct name_list *se;
  203. struct name_list **pathtail = &path_select_list;
  204. struct name_list **fstail = &fs_exclude_list;
  205. struct name_list **dptail = &dp_exclude_list;
  206. struct name_list *temp_list;
  207. int result = OK;
  208. unsigned long l;
  209. int option = 0;
  210. static struct option longopts[] = {
  211. {"timeout", required_argument, 0, 't'},
  212. {"warning", required_argument, 0, 'w'},
  213. {"critical", required_argument, 0, 'c'},
  214. {"local", required_argument, 0, 'l'},
  215. {"kilobytes", required_argument, 0, 'k'},
  216. {"megabytes", required_argument, 0, 'm'},
  217. {"units", required_argument, 0, 'u'},
  218. {"path", required_argument, 0, 'p'},
  219. {"partition", required_argument, 0, 'p'},
  220. {"exclude_device", required_argument, 0, 'x'},
  221. {"exclude-type", required_argument, 0, 'X'},
  222. {"mountpoint", no_argument, 0, 'M'},
  223. {"errors-only", no_argument, 0, 'e'},
  224. {"verbose", no_argument, 0, 'v'},
  225. {"quiet", no_argument, 0, 'q'},
  226. {"clear", no_argument, 0, 'C'},
  227. {"version", no_argument, 0, 'V'},
  228. {"help", no_argument, 0, 'h'},
  229. {0, 0, 0, 0}
  230. };
  231. if (argc < 2)
  232. return ERROR;
  233. se = (struct name_list *) malloc (sizeof (struct name_list));
  234. se->name = strdup ("iso9660");
  235. se->name_next = NULL;
  236. *fstail = se;
  237. fstail = &se->name_next;
  238. for (c = 1; c < argc; c++)
  239. if (strcmp ("-to", argv[c]) == 0)
  240. strcpy (argv[c], "-t");
  241. while (1) {
  242. c = getopt_long (argc, argv, "+?VqhveCt:c:w:u:p:x:X:mklM", longopts, &option);
  243. if (c == -1 || c == EOF)
  244. break;
  245. switch (c) {
  246. case 't': /* timeout period */
  247. if (is_integer (optarg)) {
  248. timeout_interval = atoi (optarg);
  249. break;
  250. }
  251. else {
  252. usage2 (_("Timeout interval must be a positive integer"), optarg);
  253. }
  254. case 'w': /* warning threshold */
  255. if (is_intnonneg (optarg)) {
  256. w_df = atoi (optarg);
  257. break;
  258. }
  259. else if (strpbrk (optarg, ",:") &&
  260. strstr (optarg, "%") &&
  261. sscanf (optarg, "%lu%*[:,]%lf%%", &l, &w_dfp) == 2) {
  262. w_df = (uintmax_t)l;
  263. break;
  264. }
  265. else if (strstr (optarg, "%") && sscanf (optarg, "%lf%%", &w_dfp) == 1) {
  266. break;
  267. }
  268. else {
  269. usage (_("Warning threshold must be integer or percentage!\n"));
  270. }
  271. case 'c': /* critical threshold */
  272. if (is_intnonneg (optarg)) {
  273. c_df = atoi (optarg);
  274. break;
  275. }
  276. else if (strpbrk (optarg, ",:") &&
  277. strstr (optarg, "%") &&
  278. sscanf (optarg, "%lu%*[,:]%lf%%", &l, &c_dfp) == 2) {
  279. c_df = (uintmax_t)l;
  280. break;
  281. }
  282. else if (strstr (optarg, "%") && sscanf (optarg, "%lf%%", &c_dfp) == 1) {
  283. break;
  284. }
  285. else {
  286. usage (_("Critical threshold must be integer or percentage!\n"));
  287. }
  288. case 'u':
  289. if (units)
  290. free(units);
  291. if (! strcmp (optarg, "bytes")) {
  292. mult = (uintmax_t)1;
  293. units = strdup ("B");
  294. } else if (! strcmp (optarg, "kB")) {
  295. mult = (uintmax_t)1024;
  296. units = strdup ("kB");
  297. } else if (! strcmp (optarg, "MB")) {
  298. mult = (uintmax_t)1024 * 1024;
  299. units = strdup ("MB");
  300. } else if (! strcmp (optarg, "GB")) {
  301. mult = (uintmax_t)1024 * 1024 * 1024;
  302. units = strdup ("GB");
  303. } else if (! strcmp (optarg, "TB")) {
  304. mult = (uintmax_t)1024 * 1024 * 1024 * 1024;
  305. units = strdup ("TB");
  306. } else {
  307. die (STATE_UNKNOWN, _("unit type %s not known\n"), optarg);
  308. }
  309. if (units == NULL)
  310. die (STATE_UNKNOWN, _("failed allocating storage for '%s'\n"), "units");
  311. break;
  312. case 'k': /* display mountpoint */
  313. mult = 1024;
  314. if (units)
  315. free(units);
  316. units = strdup ("kB");
  317. break;
  318. case 'm': /* display mountpoint */
  319. mult = 1024 * 1024;
  320. if (units)
  321. free(units);
  322. units = strdup ("MB");
  323. break;
  324. case 'l':
  325. show_local_fs = 1;
  326. break;
  327. case 'p': /* select path */
  328. se = (struct name_list *) malloc (sizeof (struct name_list));
  329. se->name = optarg;
  330. se->name_next = NULL;
  331. se->w_df = w_df;
  332. se->c_df = c_df;
  333. se->w_dfp = w_dfp;
  334. se->c_dfp = c_dfp;
  335. *pathtail = se;
  336. pathtail = &se->name_next;
  337. break;
  338. case 'x': /* exclude path or partition */
  339. se = (struct name_list *) malloc (sizeof (struct name_list));
  340. se->name = optarg;
  341. se->name_next = NULL;
  342. se->w_df = 0;
  343. se->c_df = 0;
  344. se->w_dfp = -1.0;
  345. se->c_dfp = -1.0;
  346. *dptail = se;
  347. dptail = &se->name_next;
  348. break;
  349. case 'X': /* exclude file system type */
  350. se = (struct name_list *) malloc (sizeof (struct name_list));
  351. se->name = optarg;
  352. se->name_next = NULL;
  353. se->w_df = 0;
  354. se->c_df = 0;
  355. se->w_dfp = -1.0;
  356. se->c_dfp = -1.0;
  357. *fstail = se;
  358. fstail = &se->name_next;
  359. break;
  360. case 'v': /* verbose */
  361. verbose++;
  362. break;
  363. case 'q': /* verbose */
  364. verbose--;
  365. break;
  366. case 'e':
  367. erronly = TRUE;
  368. break;
  369. case 'M': /* display mountpoint */
  370. display_mntp = TRUE;
  371. break;
  372. case 'C':
  373. w_df = 0;
  374. c_df = 0;
  375. w_dfp = -1.0;
  376. c_dfp = -1.0;
  377. break;
  378. case 'V': /* version */
  379. print_revision (progname, revision);
  380. exit (STATE_OK);
  381. case 'h': /* help */
  382. print_help ();
  383. exit (STATE_OK);
  384. case '?': /* help */
  385. printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
  386. print_usage ();
  387. exit (STATE_UNKNOWN);
  388. }
  389. }
  390. /* Support for "check_disk warn crit [fs]" with thresholds at used level */
  391. c = optind;
  392. if (w_dfp < 0 && argc > c && is_intnonneg (argv[c]))
  393. w_dfp = (100.0 - atof (argv[c++]));
  394. if (c_dfp < 0 && argc > c && is_intnonneg (argv[c]))
  395. c_dfp = (100.0 - atof (argv[c++]));
  396. if (argc > c && path == NULL) {
  397. se = (struct name_list *) malloc (sizeof (struct name_list));
  398. se->name = strdup (argv[c++]);
  399. se->name_next = NULL;
  400. se->w_df = w_df;
  401. se->c_df = c_df;
  402. se->w_dfp = w_dfp;
  403. se->c_dfp = c_dfp;
  404. *pathtail = se;
  405. }
  406. if (path_select_list) {
  407. temp_list = path_select_list;
  408. while (temp_list) {
  409. if (validate_arguments (temp_list->w_df,
  410. temp_list->c_df,
  411. temp_list->w_dfp,
  412. temp_list->c_dfp,
  413. temp_list->name) == ERROR)
  414. result = ERROR;
  415. temp_list = temp_list->name_next;
  416. }
  417. return result;
  418. } else {
  419. return validate_arguments (w_df, c_df, w_dfp, c_dfp, NULL);
  420. }
  421. }
  422. void
  423. print_path (const char *mypath)
  424. {
  425. if (mypath == NULL)
  426. printf ("\n");
  427. else
  428. printf (" for %s\n", mypath);
  429. return;
  430. }
  431. int
  432. validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, char *mypath)
  433. {
  434. if (w < 0 && c < 0 && wp < 0.0 && cp < 0.0) {
  435. printf (_("INPUT ERROR: No thresholds specified"));
  436. print_path (mypath);
  437. return ERROR;
  438. }
  439. else if ((wp >= 0.0 || cp >= 0.0) &&
  440. (wp < 0.0 || cp < 0.0 || wp > 100.0 || cp > 100.0 || cp > wp)) {
  441. printf (_("\
  442. INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be between zero and 100 percent, inclusive"),
  443. cp, wp);
  444. print_path (mypath);
  445. return ERROR;
  446. }
  447. else if ((w > 0 || c > 0) && (w == 0 || c == 0 || c > w)) {
  448. printf (_("\
  449. INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greater than zero"),
  450. (unsigned long)c, (unsigned long)w);
  451. print_path (mypath);
  452. return ERROR;
  453. }
  454. if (units == NULL) {
  455. units = strdup ("MB");
  456. mult = (uintmax_t)1024 * 1024;
  457. }
  458. return OK;
  459. }
  460. int
  461. check_disk (double usp, double free_disk)
  462. {
  463. int result = STATE_UNKNOWN;
  464. /* check the percent used space against thresholds */
  465. if (usp >= 0.0 && c_dfp >=0.0 && usp >= (100.0 - c_dfp))
  466. result = STATE_CRITICAL;
  467. else if (c_df > 0 && free_disk <= c_df)
  468. result = STATE_CRITICAL;
  469. else if (usp >= 0.0 && w_dfp >=0.0 && usp >= (100.0 - w_dfp))
  470. result = STATE_WARNING;
  471. else if (w_df > 0 && free_disk <= w_df)
  472. result = STATE_WARNING;
  473. else if (usp >= 0.0)
  474. result = STATE_OK;
  475. return result;
  476. }
  477. int
  478. walk_name_list (struct name_list *list, const char *name)
  479. {
  480. while (list) {
  481. if (! strcmp(list->name, name)) {
  482. list->found = 1;
  483. /* if required for name_lists that have not saved w_df, etc (eg exclude lists) */
  484. if (list->w_df) w_df = list->w_df;
  485. if (list->c_df) c_df = list->c_df;
  486. if (list->w_dfp>=0.0) w_dfp = list->w_dfp;
  487. if (list->c_dfp>=0.0) c_dfp = list->c_dfp;
  488. return TRUE;
  489. }
  490. list = list->name_next;
  491. }
  492. return FALSE;
  493. }
  494. void
  495. print_help (void)
  496. {
  497. print_revision (progname, revision);
  498. printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
  499. printf (COPYRIGHT, copyright, email);
  500. printf (_("\
  501. This plugin checks the amount of used disk space on a mounted file system\n\
  502. and generates an alert if free space is less than one of the threshold values."));
  503. print_usage ();
  504. printf (_(UT_HELP_VRSN));
  505. printf (_("\
  506. -w, --warning=INTEGER\n\
  507. Exit with WARNING status if less than INTEGER --units of disk are free\n\
  508. -w, --warning=PERCENT%%\n\
  509. Exit with WARNING status if less than PERCENT of disk space is free\n\
  510. -c, --critical=INTEGER\n\
  511. Exit with CRITICAL status if less than INTEGER --units of disk are free\n\
  512. -c, --critical=PERCENT%%\n\
  513. Exit with CRITCAL status if less than PERCENT of disk space is free\n\
  514. -C, --clear\n\
  515. Clear thresholds\n"));
  516. printf (_("\
  517. -u, --units=STRING\n\
  518. Choose bytes, kB, MB, GB, TB (default: MB)\n\
  519. -k, --kilobytes\n\
  520. Same as '--units kB'\n\
  521. -m, --megabytes\n\
  522. Same as '--units MB'\n"));
  523. printf (_("\
  524. -l, --local\n\
  525. Only check local filesystems\n\
  526. -p, --path=PATH, --partition=PARTITION\n\
  527. Path or partition (may be repeated)\n\
  528. -x, --exclude_device=PATH <STRING>\n\
  529. Ignore device (only works if -p unspecified)\n\
  530. -X, --exclude-type=TYPE <STRING>\n\
  531. Ignore all filesystems of indicated type (may be repeated)\n\
  532. -M, --mountpoint\n\
  533. Display the mountpoint instead of the partition\n\
  534. -e, --errors-only\n\
  535. Display only devices/mountpoints with errors\n"));
  536. printf (_(UT_WARN_CRIT));
  537. printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
  538. printf (_(UT_VERBOSE));
  539. printf ("%s", _("Examples:\n\
  540. check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /\n\
  541. Checks /tmp and /var at 10%,5% and / at 100MB, 50MB\n"));
  542. printf (_(UT_SUPPORT));
  543. }
  544. void
  545. print_usage (void)
  546. {
  547. printf (_("\
  548. Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n\
  549. [-v] [-q]\n\
  550. %s (-h|--help)\n\
  551. %s (-V|--version)\n"),
  552. progname, progname, progname);
  553. }