Make syslog reread its configuration file

pkill -HUP syslogd

-1
By: rimaya
2009-02-09 09:32:06

These Might Interest You

  • Send apache log to syslog-ng server without change configuration of syslog. Just add in httpd.conf or vhost conf.


    1
    CustomLog "|nc -u IP PORT "<134>%{%b %d %X}t %h %l %u %t \"%r\"%>s %b \"%{Referer}i\" \"%{User-agent}i\""
    flojb · 2012-12-26 09:32:52 0
  • # Docker & logstash... and (free) multiple online services! Register on the following services & make a gist with your OWN settings, have fun to collect! OPTIONAL: -e LOGSTASH_CONFIG_URL=http://gist..... * [Papertrail](https://papertrailapp.com/?thank=7cfb38) * [Logentries](https://logentries.com/learnmore?code=c4TEpHn52LKeRN9Yb6Aku8XZQxfWUhws) * Make a log dir, like /log on your MAIN host like: `mkdir /log && ln -f /var/log/syslog /log/syslog` * Lets write som logs! * Write directly over tcp: `echo das | nc -v YOURHOST 555` * Lets scrap logs with logstash:`ln -f /var/log.... /log/syslog` * Write debug stuff: `echo blablalba > /log/das` ......


    0
    docker run --name=logstash \ -p 9200:9200 -p 554:514/udp -p 555:514 \ -v /log:/log pblittle/docker-logstash
    dbiesecke · 2014-11-06 23:58:24 0
  • This command will log the output of your simple cronjobs to syslog, and syslog will take it from there. Works great for monitoring scripts which only produce simple output. Advantages: * This can be used by regular users, without modifying system files like /etc/syslog.conf * Reduce cron spam to root@localhost (Please stop spaming the sysadmins) * Uses common tools like syslog (and logrotate) so that you don't need to maintain yet another krufty logfile. * Still ensures that the output is logged somewhere, for posterity. Perhaps it's stored the secure, central syslog server, for example. * Seems to work fine on Ubuntu, CentOS, FreeBSD & MacOSX Show Sample Output


    6
    */5 * * * * root /usr/local/nagios/sbin/nsca_check_disk 2>&1 |/usr/bin/logger -t nsca_check_disk
    StefanLasiewski · 2010-07-02 00:47:05 2

  • 0
    tail -f --retry /var/log/syslog /var/log/auth.log | ccze -A
    Yury · 2009-05-13 00:02:50 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: