QSROTATE(1)

πŸ“¦
version 11.74 Β· 2 versions
, in epel 9, ubuntu noble

πŸ’« QSROTATE(1) β€” the qsrotate glow-up πŸ’«

okay bestie, welcome to the qsrotate man page, section 1 of the manual (the "you can just run this, no cap" section). she's a log rotation tool, basically the cooler cousin of Apache's rotatelogs. yes ma'am, the same job, but with ✨vibes✨.


πŸŽ€ NAME πŸŽ€

qsrotate β€” a log rotation tool (similar to Apache's rotatelogs). it rotates. it logs. it's giving main character energy fr fr. πŸ’…


🌸 SYNOPSIS 🌸

qsrotate -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g
<num>] [-u <name>] [-m <mask>] [-p] [-d]

like, that's the whole invocation. read it slowly, she's not complicated, she's just iconic. πŸ¦‹


✨ DESCRIPTION ✨

so here's the tea: qsrotate reads from stdin (that's your piped log, bestie 🫢) and writes the data into the file you hand her. then β€” and this is the part that eats β€” she rotates the file after the time interval you specified. no drama, no manual deleting, just clean rotation. periodt. πŸ’–


πŸ’… OPTIONS πŸ’…

  • -o <file> β€” the output log file where the data goes. use an absolute path, bestie, don't be out here with relative paths, that's how you end up crying. 😭
  • -s <sec> β€” rotation interval in seconds. default is 86400 seconds (that's a whole day, she's patient). ⏰
  • -t <hours> β€” offset to UTC. this one also enables DST support, so she's ready for the time change chaos. default is 0. πŸ•°οΈ
  • -b <bytes> β€” file size limitation. default and max are 2147352576 bytes, and the min is 1048576 bytes. respect the range or she will simply not. πŸ’€
  • -f β€” forced log rotation at the specified interval, even when no data is written. she rotates on schedule no matter what. stubborn queen behavior. πŸ‘‘
  • -z β€” compress (gzip) the rotated file. smaller files, bigger slay. πŸ”₯
  • -g <num> β€” generations, aka the number of files to keep. keep it tidy. πŸŽ€
  • -u <name> β€” become another user, e.g. www-data. yes, she can change identity, it's very undercover popstar of her. 🧚
  • -m <mask> β€” file permission, which is either 600, 640, 660 (the default) or 664. those are the options, don't freestyle. πŸ”’
  • -p β€” writes data also to stdout (for piped logging). sharing is caring. 🌈
  • -d β€” line-by-line data reading, prefixing every line with a timestamp. every line gets its little time stamp of approval. ⭐

πŸ“ EXAMPLE πŸ“

TransferLog "|/usr/bin/qsrotate -f -z -g 3 -o
/var/log/apache/access.log -s 86400"

and here's the part you need to remember: the name of the rotated file will be /dest/filee.YYYYmmddHHMMSS where YYYYmmddHHMMSS is the system time at which the data has been rotated. so every rotation gets its own timestamped lil name. obsessed. πŸ’œ


πŸ¦‹ NOTE πŸ¦‹

  • Each qsrotate instance must use an individual file. one file per instance, no sharing, that's the rule bestie. πŸ™ˆ
  • You may trigger a file rotation manually by sending the signal USR1 to the process. yes, you can just... poke her. and she'll rotate. iconic. πŸ’…

🌈 SEE ALSO 🌈

qsdt(1), qsexec(1), qsfilter2(1), qsgeo(1), qsgrep(1), qshead(1), qslog(1), qslogger(1), qsre(1), qsrespeed(1), qspng(1), qssign(1), qstail(1)

(the whole friend group, go say hi 🫢)


πŸ’– AUTHOR πŸ’–

Pascal Buchbinder, http://mod-qos.sourceforge.net/


and that's the whole page, bestie! this was mod_qos utilities 11.74, dated May 2023, and yes she ate and left no crumbs. go rotate some logs, you've got this. πŸ‘‘βœ¨πŸŽ€

πŸ“¦ where this page comes from