man logger
echo „date“
SYNOPSIS
logger [-46Ais] [-f file] [-h host] [-p pri] [-t tag]
[message …]
DESCRIPTION
The logger utility provides a shell command interface to
the syslog(3)
system log module.
The following options are available:
-f file
Log the specified file.
Heisst das, daß ich hier das file angeben kann, in das geloggt
wird?
Urm… das habe ich so nicht gemacht. Und es scheint so auch nicht zu funkionieren. Bei mir geht sowas in die /var/log/allmessages…
-t tag Mark every line in the log with the specified
tag.
Kann ich als tag „echo „date““ angeben?
logger -t ping-statistik $(date)
Und wo geb ich das „ping www.host.tld“ an?
Sorry, aber mit Logging hab ich mich in dieser Form noch nicht
beschäftigt. Die Software, die ich so benutze, bringt ihre
eigenen Log-Mechanismen mit. Ein paar Sätze dazu wären
hilfreich.
echo $(date) $(ping -c 3 www.heise.de | grep min\/avg\/max) \>\> /tmp/pinglog