Other tips

  • FreeBSD System Log:

    To see latest system log messages:
    tail /var/log/messages
    
    To see system messages log live:
    tail -F /var/log/messages
    
    To write a custom message to the system log:
    logger My Custom Meassage Text
    
  • PC Speaker support in FreeBSD

    To enable PC speaker support, add line to the /boot/loader.conf:
    speaker_load="YES"
    
    This will load speaker device daemon at the boot time. To start it manually:
    kldload speaker
    
    To make a simple sound:
    echo -ne '\a'
    
    To make some sound on PC speaker using musical notes:
    echo "l32<<<<F" > /dev/speaker
    
    (see man speaker for more sound options).
    To make a sound every time someone accesses your webpage, create a following script and run it in the background:
    #!/bin/sh
    while date
     do
      tail -F -n 1 /var/log/httpd-access.cabin.log | echo "l32<<<<F" > /dev/speaker
     done
    


 .