Score:0

In log rotation configuration file. I have to append the boot count

ph flag

I have to append the boot count in log rotation file in this format:

boot-0000001-syslog_1.log                                                                     
boot-0000001-syslog_2.log

This is my logrotate config file:

/mnt/software/appdata/syslog/all/syslog.log
{
  missingok
  rotate 1
  size 10M
  Compress
  Create 
  dateext
  dateformat -%Y%m%d_%H:%M:%S
  Postrotate
  invoke-rc.d syslog-ng reload > /dev/null
  endscript
} 

I am expecting the output of log rotation in this format:

boot-00000001-syslog_1.log

Note: the boot count is stored in file, the file name is counter. I have to add the boot count in syslog file in this format.

boot-0000001-syslog_1.log

Kindly help me. Thanks

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.