Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: crontab program
by shenme (Priest) on Nov 09, 2003 at 05:21 UTC
    I'm confused by your mention of "terminal 3" and 'cluster' and "connect as".   All that has me thinking you just want this:
    Each machine in your cluster has a cron line like you have, but specifically outputs to /dev/tty3.   If you login at the physical console using screen 3 then you will see messages from the cron for _that_ machine.
    If, however, you really meant /dev/pts/3, as in a remote connection to each machine, then confusion abounds.   A "pseudo-terminal" is allocated for remote connections like telnet or ssh in a somewhat unpredictable manner.   That is, you can't be sure which connection will get a particular pts, like pts/3.   Thus you couldn't be sure who would be getting the messages.

    So what we're really wondering is if you want to output your messages to some _central_ place, like a file or a daemon, as you mentioned.   That is why Zaxo mentioned files and sockets.

    If you wanted to append your output from each machine to one file somewhere you might need to use NFS, but I fear the machines might interfere with each other (corrupt the one file).   You could use a separate file for each machine and 'watch' the files with something like the Perl module File::Tail which can watch several files at once.

    Or you could write a small daemon that accepts messages from each of your machines over network connections and then dumps them in a file for you to monitor.

    Anyway, tell us more what you were really thinking about ...

Re: crontab program
by Zaxo (Archbishop) on Nov 09, 2003 at 03:57 UTC

    Your crontab line is talking to a local device. You might try redirecting to an nfs file on the monitoring node. I've never tried that sort of thing with devices, not sure it will work, but it will work with an ordinary file.

    Update. Another approach: print to a socket which talks to a little daemon on the monitor node.

    After Compline,
    Zaxo