Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-23-2014, 08:45 PM   #1
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Rep: Reputation: 0
centos 7: how to manually start a new system log?

The system log is in /var/log/system. It can grow large, and being on an unstable system, I'd like to recreate the error on a smaller log file before posting it. Is there a way for me to manually initiate the use of a new system log file?

Old 12-23-2014, 08:57 PM   #2
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,415
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
Do you have logrotate installed? It should help manage the size of the log files.

If this is an error you can reproduce at will, you could run

tail -f /var/log/[somelog]
and capture the output to the console as the error is logged.


I just learned about this command in this thread. It may do what you want.

Last edited by frankbell; 12-23-2014 at 09:25 PM. Reason: More information
Old 12-26-2014, 06:55 PM   #3
LQ Newbie
Registered: Dec 2014
Posts: 3

Rep: Reputation: Disabled
Either use the "tail -f" as suggested above, or ...

mv -f /var/log/system /tmp/old_system_log; killall -HUP <syslog_process>

Hope this helps,
Old 12-26-2014, 07:20 PM   #4
Senior Member
Registered: Mar 2010
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 271Reputation: 271Reputation: 271
/var/run/ contains the process id of syslogd. Every month I kill that process, rename /var/log/syslog and the other log files to which syslogd writes, adding the year and month, e.g. syslog becomes syslog-201412, then start syslogd again. On my distribution I can use /etc/rc.d/rc.syslog to start and stop syslogd, but that's unnecessary.

I reserve syslog for the most important system information by separating non-essential stuff into separate log files, most importantly the dhcp stuff (and lynx, for me, but who else uses that anymore?). I did the same for acpi and apm back when I had them.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant Display System Log on Centos linuxquestionmember Linux - General 5 05-11-2011 10:14 PM
Please check log system on Centos 5 chobong Linux - Newbie 7 10-13-2010 03:47 AM
how to shrink and manually rotate log bangsters Linux - General 9 09-20-2009 01:57 PM
Start FC10 in runlevel 3, and than MANUALLY start X - how? rylan76 Linux - Newbie 2 05-27-2009 07:22 AM
samba refuses to start on startup, but will start manually pepsimachine15 Linux - Software 8 04-20-2009 11:03 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration