what is makewhatis - Redhat

This is a discussion on what is makewhatis - Redhat ; I have a redhat 7.3 machine and (for the first time) got a cron.weekly error message on makewhatis.cron . I reran the cron job and got no error message. I have psad installed which apparently comes with its own whatis ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: what is makewhatis

  1. what is makewhatis

    I have a redhat 7.3 machine and (for the first time) got a cron.weekly error
    message on makewhatis.cron .

    I reran the cron job and got no error message.

    I have psad installed which apparently comes with its own whatis directory
    searches.

    If anyone can help explain this please let me know. I don't know what is
    going on. I used to do some AWK programming years ago but am getting too
    old to try to understand this script I think.

    Michael

    --------------------------------------------------------------------------


    ----- Original Message -----
    From: "Cron Daemon" <>
    To:
    Sent: Sunday, April 04, 2004 4:24 AM
    Subject: Cron run-parts /etc/cron.weekly


    > /etc/cron.weekly/makewhatis.cron:
    >
    > awk: cmd. line:186: (FILENAME=- FNR=1163) fatal error: internal error
    > /usr/sbin/makewhatis: line 360: 17138 Broken pipe find . -name

    '*' $findarg -print
    > 17139 Aborted | $AWK '
    >
    > function readline() {
    > if (use_zcat) {
    > result = (pipe_cmd | getline);
    > if (result < 0) {
    > print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
    > }
    > } else {
    > result = (getline < filename);
    > if (result < 0) {
    > print "Read file error: " filename " " ERRNO > "/dev/stderr";
    > }
    > }
    > return result;
    > }
    >
    > function closeline() {
    > if (use_zcat) {
    > return close(pipe_cmd);
    > } else {
    > return close(filename);
    > }
    > }
    >
    > function do_one() {
    > insh = 0; thisjoin = 1; done = 0;
    > entire_line = "";
    >
    > if (verbose) {
    > print "adding " filename > "/dev/stderr"
    > }
    >
    > use_zcat = match(filename,"\\.Z$") ||
    > match(filename,"\\.z$") || match(filename,"\\.gz$");
    > if(use_zcat) {
    > filename_no_gz = substr(filename, 0, RSTART - 1);
    > } else {
    > filename_no_gz = filename;
    > }
    > match(filename_no_gz, "/[^/]+$");
    > progname = substr(filename, RSTART + 1, RLENGTH - 1);
    > if (match(progname, "\\." section "[A-Za-z]+")) {
    > actual_section = substr(progname, RSTART + 1, RLENGTH - 1);
    > } else {
    > actual_section = section;
    > }
    > sub(/\..*/, "", progname);
    > if (use_zcat) {
    > pipe_cmd = "zcat \"" filename "\"";
    > # try to avoid suspicious stuff
    > if (filename ~ /[;&|`$(]/) {
    > print "ignored strange file name " filename " in " curdir >

    "/dev/stderr";
    > return;
    > }
    > }
    >
    > while (!done && readline() > 0) {
    > gsub(/.\b/, "");
    > if (($1 ~ /^\.[Ss][Hh]/ &&
    > ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
    > $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ ||
    > $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
    > $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
    > $2 ~ /^NOME/ || $2 ~ /^NAAM/)) ||
    > (pages == "cat" && $1 ~ /^NAME/)) {
    > if (!insh) {
    > insh = 1;
    > } else {
    > done = 1;
    > }
    > } else if (insh) {
    > if ($1 ~ /^\.[Ss][HhYS]/ ||
    > (pages == "cat" &&
    > ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
    > $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
    > $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
    > $0 ~ /^[^ ]/))) {
    > # end insh for Synopsis, Syntax, but also for
    > # DESCRIPTION (e.g., XFree86.1x),
    > # COMMAND (e.g., xspread.1)
    > # OVERVIEW (e.g., TclCommandWriting.3)
    > # STRUCTURES (e.g., XEvent.3x)
    > # INTRODUCTION (e.g., TclX.n)
    > # and anything at all that begins in Column 1, so
    > # is probably a section header.
    > done = 1;
    > } else {
    > if (!after && $0 ~ progname"-") { # Fix old cat pages
    > sub(progname"-", progname" - ");
    > }
    > if ($0 ~ /[^ ]-$/) {
    > sub(/-$/, ""); # Handle Hyphenations
    > nextjoin = 1;
    > } else if ($0 ~ /\\c$/) {
    > sub(/\\c$/, ""); # Handle Continuations
    > nextjoin = 1;
    > } else
    > nextjoin = 0;
    >
    > sub(/^.[IB] /, ""); # Kill bold and italics
    > sub(/^.BI /, ""); #
    > sub(/^.SM /, ""); # Kill small
    > sub(/^.Nm /, ""); # Kill bold
    > sub(/^.Tn /, ""); # Kill normal
    > sub(/^.Li /, ""); # Kill .Li
    > sub(/^.Dq /, ""); # Kill .Dq
    > sub(/^.Nd */, "- "); # Convert .Nd to dash
    > sub(/\\\".*/, ""); # Trim pending comments
    > sub(/ *$/, ""); # Trim pending spaces
    > sub(/^\.$/, ""); # Kill blank comments
    > sub(/^'"'"'.*/, ""); # Kill comment/troff lines
    > sub(/^.in .*/, ""); # Kill various macros
    > sub(/^.ti .*/, "");
    > sub(/^.ta .*/, "");
    > sub(/^.Vb .*/, "");
    > sub(/^.[PLTH]P$/, ""); # .PP/.LP/.TP/.HP
    > sub(/^.Pp$/, "");
    > sub(/^.IX .*$/, "");
    > sub(/^.nolinks$/, "");
    > sub(/^.B$/, "");
    > sub(/^.nf$/, "");
    >
    > if (($1 ~ /^\.../ || $1 == "") &&
    > (entire_line ~ / - / || entire_line ~ / \\- /)) {
    > # Assume that this ends the description of one line
    > # Sometimes there are several descriptions in one page,
    > # as in outb(2).
    > handle_entire_line();
    > entire_line = "";
    > thisjoin = 1;
    > } else {
    > if (thisjoin) {
    > entire_line = entire_line $0;
    > } else {
    > entire_line = entire_line " " $0;
    > }
    > thisjoin = nextjoin;
    > }
    > }
    > }
    > }
    > handle_entire_line();
    > closeline();
    > }
    >
    > function handle_entire_line() {
    > x = entire_line; # Keep it short
    >
    > gsub(/\015/, "", x); # Kill DOS remains
    > gsub(/ /, " ", x); # Translate tabs to spaces
    > gsub(/ +/, " ", x); # Collapse spaces
    > gsub(/ *, */, ", ", x); # Fix comma spacings
    > sub(/^ /, "", x); # Kill initial spaces
    > sub(/ $/, "", x); # Kill trailing spaces
    > sub(/__+/, "_", x); # Collapse underscores
    >
    > gsub(/\\f\(../, "", x); # Kill font changes
    > gsub(/\\f[PRIB0123]/, "", x); # Kill font changes
    > gsub(/\\s[-+0-9]*/, "", x); # Kill size changes
    > gsub(/\\&/, "", x); # Kill \&
    > gsub(/\\\|/, "", x); # Kill \|
    > gsub(/\\\((ru|ul)/, "_", x); # Translate
    > gsub(/\\\((mi|hy|em)/, "-", x); # Translate
    > gsub(/\\\*\(../, "", x); # Kill troff strings
    > gsub(/\\/, "", x); # Kill all backslashes
    > gsub(/"/, "", x); # Kill quotes (from .Nd "foo bar")
    > sub(/

    /, "", x);# Yuk! HTML cruft
    > gsub(/ +/, " ", x); # Collapse spaces (again)
    > sub(/^ /, "", x); # Kill initial spaces (again)
    > sub(/ $/, "", x); # Kill trailing spaces (again)
    > sub(/\.$/, "", x); # Kill trailing period
    >
    > if (!match(x, / - /))
    > return;
    >
    > after_dash = substr(x, RSTART);
    > head = substr(x, 1, RSTART-1) ", ";
    > while (match(head, /, /)) {
    > prog = substr(head, 1, RSTART-1);
    > head = substr(head, RSTART+2);
    > if (prog != progname)
    > prog = prog " [" progname "]";
    > printf "%-*s (%s) %s\n", 20, prog, actual_section, after_dash;
    > }
    > }
    >
    > { # Main action - process each filename read in.
    > filename = $0;
    > do_one();
    > }
    > ' pages=$pages section=$section verbose=$verbose curdir=$curdir
    >





  2. Re: what is makewhatis


    Whatis...
    http://www.linuxjournal.com/article.php?sid=1329

    Does psad touche the whatis database? Unlikely? I do not know.

    >>awk: cmd. line:186: (FILENAME=- FNR=1163) fatal error: internal error
    >>/usr/sbin/makewhatis: line 360: 17138 Broken pipe find . -name


    o Probably out of memory.
    o not enough disk space on /tmp (or other partitions).
    o foreshadow of disk-malfunction.

    Check systemlogs for that day and time.

    // moma
    http://www.futuredesktop.org


    Michael wrote:
    > I have a redhat 7.3 machine and (for the first time) got a cron.weekly error
    > message on makewhatis.cron .
    >
    > I reran the cron job and got no error message.
    >
    > I have psad installed which apparently comes with its own whatis directory
    > searches.
    >
    > If anyone can help explain this please let me know. I don't know what is
    > going on. I used to do some AWK programming years ago but am getting too
    > old to try to understand this script I think.
    >
    > Michael
    >
    > --------------------------------------------------------------------------
    >
    >
    > ----- Original Message -----
    > From: "Cron Daemon" <>
    > To:
    > Sent: Sunday, April 04, 2004 4:24 AM
    > Subject: Cron run-parts /etc/cron.weekly
    >
    >
    >
    >>/etc/cron.weekly/makewhatis.cron:
    >>
    >>awk: cmd. line:186: (FILENAME=- FNR=1163) fatal error: internal error
    >>/usr/sbin/makewhatis: line 360: 17138 Broken pipe find . -name

    >
    > '*' $findarg -print
    >
    >> 17139 Aborted | $AWK '
    >>
    >> function readline() {
    >> if (use_zcat) {
    >>result = (pipe_cmd | getline);
    >>if (result < 0) {
    >> print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
    >>}
    >> } else {
    >>result = (getline < filename);
    >>if (result < 0) {
    >> print "Read file error: " filename " " ERRNO > "/dev/stderr";
    >>}
    >> }
    >> return result;
    >> }
    >>
    >> function closeline() {
    >> if (use_zcat) {
    >>return close(pipe_cmd);
    >> } else {
    >>return close(filename);
    >> }
    >> }
    >>
    >> function do_one() {
    >> insh = 0; thisjoin = 1; done = 0;
    >> entire_line = "";
    >>
    >> if (verbose) {
    >>print "adding " filename > "/dev/stderr"
    >> }
    >>
    >> use_zcat = match(filename,"\\.Z$") ||
    >>match(filename,"\\.z$") || match(filename,"\\.gz$");
    >> if(use_zcat) {
    >>filename_no_gz = substr(filename, 0, RSTART - 1);
    >> } else {
    >>filename_no_gz = filename;
    >> }
    >> match(filename_no_gz, "/[^/]+$");
    >> progname = substr(filename, RSTART + 1, RLENGTH - 1);
    >> if (match(progname, "\\." section "[A-Za-z]+")) {
    >>actual_section = substr(progname, RSTART + 1, RLENGTH - 1);
    >> } else {
    >>actual_section = section;
    >> }
    >> sub(/\..*/, "", progname);
    >> if (use_zcat) {
    >>pipe_cmd = "zcat \"" filename "\"";
    >># try to avoid suspicious stuff
    >>if (filename ~ /[;&|`$(]/) {
    >> print "ignored strange file name " filename " in " curdir >

    >
    > "/dev/stderr";
    >
    >> return;
    >>}
    >> }
    >>
    >> while (!done && readline() > 0) {
    >>gsub(/.\b/, "");
    >>if (($1 ~ /^\.[Ss][Hh]/ &&
    >> ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
    >> $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ ||
    >> $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
    >> $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
    >> $2 ~ /^NOME/ || $2 ~ /^NAAM/)) ||
    >> (pages == "cat" && $1 ~ /^NAME/)) {
    >> if (!insh) {
    >> insh = 1;
    >> } else {
    >> done = 1;
    >> }
    >>} else if (insh) {
    >> if ($1 ~ /^\.[Ss][HhYS]/ ||
    >> (pages == "cat" &&
    >> ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
    >> $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
    >> $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
    >> $0 ~ /^[^ ]/))) {
    >> # end insh for Synopsis, Syntax, but also for
    >> # DESCRIPTION (e.g., XFree86.1x),
    >> # COMMAND (e.g., xspread.1)
    >> # OVERVIEW (e.g., TclCommandWriting.3)
    >> # STRUCTURES (e.g., XEvent.3x)
    >> # INTRODUCTION (e.g., TclX.n)
    >> # and anything at all that begins in Column 1, so
    >> # is probably a section header.
    >> done = 1;
    >> } else {
    >> if (!after && $0 ~ progname"-") { # Fix old cat pages
    >>sub(progname"-", progname" - ");
    >> }
    >> if ($0 ~ /[^ ]-$/) {
    >> sub(/-$/, ""); # Handle Hyphenations
    >> nextjoin = 1;
    >> } else if ($0 ~ /\\c$/) {
    >> sub(/\\c$/, ""); # Handle Continuations
    >> nextjoin = 1;
    >> } else
    >> nextjoin = 0;
    >>
    >> sub(/^.[IB] /, ""); # Kill bold and italics
    >> sub(/^.BI /, ""); #
    >> sub(/^.SM /, ""); # Kill small
    >> sub(/^.Nm /, ""); # Kill bold
    >> sub(/^.Tn /, ""); # Kill normal
    >> sub(/^.Li /, ""); # Kill .Li
    >> sub(/^.Dq /, ""); # Kill .Dq
    >> sub(/^.Nd */, "- "); # Convert .Nd to dash
    >> sub(/\\\".*/, ""); # Trim pending comments
    >> sub(/ *$/, ""); # Trim pending spaces
    >> sub(/^\.$/, ""); # Kill blank comments
    >> sub(/^'"'"'.*/, ""); # Kill comment/troff lines
    >> sub(/^.in .*/, ""); # Kill various macros
    >> sub(/^.ti .*/, "");
    >> sub(/^.ta .*/, "");
    >> sub(/^.Vb .*/, "");
    >> sub(/^.[PLTH]P$/, ""); # .PP/.LP/.TP/.HP
    >> sub(/^.Pp$/, "");
    >> sub(/^.IX .*$/, "");
    >> sub(/^.nolinks$/, "");
    >> sub(/^.B$/, "");
    >> sub(/^.nf$/, "");
    >>
    >> if (($1 ~ /^\.../ || $1 == "") &&
    >> (entire_line ~ / - / || entire_line ~ / \\- /)) {
    >> # Assume that this ends the description of one line
    >> # Sometimes there are several descriptions in one page,
    >> # as in outb(2).
    >> handle_entire_line();
    >> entire_line = "";
    >> thisjoin = 1;
    >> } else {
    >> if (thisjoin) {
    >>entire_line = entire_line $0;
    >> } else {
    >>entire_line = entire_line " " $0;
    >> }
    >> thisjoin = nextjoin;
    >> }
    >> }
    >>}
    >> }
    >> handle_entire_line();
    >> closeline();
    >> }
    >>
    >> function handle_entire_line() {
    >> x = entire_line; # Keep it short
    >>
    >> gsub(/\015/, "", x); # Kill DOS remains
    >> gsub(/ /, " ", x); # Translate tabs to spaces
    >> gsub(/ +/, " ", x); # Collapse spaces
    >> gsub(/ *, */, ", ", x); # Fix comma spacings
    >> sub(/^ /, "", x); # Kill initial spaces
    >> sub(/ $/, "", x); # Kill trailing spaces
    >> sub(/__+/, "_", x); # Collapse underscores
    >>
    >> gsub(/\\f\(../, "", x); # Kill font changes
    >> gsub(/\\f[PRIB0123]/, "", x); # Kill font changes
    >> gsub(/\\s[-+0-9]*/, "", x); # Kill size changes
    >> gsub(/\\&/, "", x); # Kill \&
    >> gsub(/\\\|/, "", x); # Kill \|
    >> gsub(/\\\((ru|ul)/, "_", x); # Translate
    >> gsub(/\\\((mi|hy|em)/, "-", x); # Translate
    >> gsub(/\\\*\(../, "", x); # Kill troff strings
    >> gsub(/\\/, "", x); # Kill all backslashes
    >> gsub(/"/, "", x); # Kill quotes (from .Nd "foo bar")
    >> sub(/

    /, "", x);# Yuk! HTML cruft
    >> gsub(/ +/, " ", x); # Collapse spaces (again)
    >> sub(/^ /, "", x); # Kill initial spaces (again)
    >> sub(/ $/, "", x); # Kill trailing spaces (again)
    >> sub(/\.$/, "", x); # Kill trailing period
    >>
    >> if (!match(x, / - /))
    >>return;
    >>
    >> after_dash = substr(x, RSTART);
    >> head = substr(x, 1, RSTART-1) ", ";
    >> while (match(head, /, /)) {
    >>prog = substr(head, 1, RSTART-1);
    >>head = substr(head, RSTART+2);
    >>if (prog != progname)
    >> prog = prog " [" progname "]";
    >>printf "%-*s (%s) %s\n", 20, prog, actual_section, after_dash;
    >> }
    >> }
    >>
    >> { # Main action - process each filename read in.
    >> filename = $0;
    >> do_one();
    >> }
    >> ' pages=$pages section=$section verbose=$verbose curdir=$curdir
    >>

    >
    >
    >
    >



+ Reply to Thread