Examples
Previous  Top  Next

Send a message to the localhost, priority user.info:
klog –m "It's almost lunchtime"  

Send a syslog message to host 'rotterdam', with priority user.notice:
klog -h rotterdam -F user -L notice –m "The quick brown fox tripped"  

Send a TCP message to the 'mailhost' Unix server advising of an email:
klog -h mailhost –t -F daemon -L info –m "Mail message sent by Piero"  

Send a message to machine 'timesvr' every second until a key is pressed on the keyboard:
klog -h timesvr –w –m "Tick tock"  

Send a message to the syslog daemon on 'sysloghost' running on UDP port 2110. Use RFC headers, with a process name of 'myproc'. Use a pre-calculated priority of 122:
klog -h sysloghost -u 2110 -r myproc -p 122 –m "Local event occurred"  

Send the output from a DIR command to host 192.168.1.2:
DIR *.* | klog -h 192.168.1.2 -i