Don't Let Logs FILL Your Server (Rotate Them!)

  Рет қаралды 4,873

Shawn Powers

Shawn Powers

Күн бұрын

Пікірлер: 23
@damianpodgorski6977
@damianpodgorski6977 2 жыл бұрын
Great to see your new video Shawn! Most of all glad you are feeling better! Interesting staff
@kazami6317
@kazami6317 2 жыл бұрын
Hope you are feeling better! Getting Covid and still teaching us 🙏🏻 Thank you so much!
@shawnp0wers
@shawnp0wers 2 жыл бұрын
Slowly getting better. But I missed making videos! :D
@scottb4029
@scottb4029 2 жыл бұрын
Your sounding better. Glad to see a video, well done considering your condition. Btw I made the plunge to totally Linux. I screwed up and overwrote my boot disk partitions. So I tried to recover my Mac OS system. No go. Now I am MX Linux with a 11 year old Mac mini. Works great! Thanks for the hard work. keep getting better.
@shawnp0wers
@shawnp0wers 2 жыл бұрын
Oh sweet!!! Bummer of a way to force the switch, hopefully you didn't lose any data. And thanks. I made a 10 minute video, and feel like I ran a marathon. But no regrets. :)
@nikolaidimitrov4156
@nikolaidimitrov4156 2 жыл бұрын
The part for "size 100M" is not completely true. Logrotate is executed via cron. So when logrotate is executed it will check if filesize is 100M and will rotate it. When you have extensive logs 100M every 30 minets for example this will not rotate your logs every 30 minutes but only when cron is executed.
@AndyHeasman
@AndyHeasman 2 жыл бұрын
Great video Shawn! Hope you feel better soon.
@shawnp0wers
@shawnp0wers 2 жыл бұрын
Thank you! Slowly but surely... still positive, but feeling pretty good. :)
@hw-manoj
@hw-manoj Ай бұрын
My Ubuntu doing this filling storage thing and it filled ~100gb.so I stopped rsyslog and deleted all logs.now whenever I open gnome-files it freezes and nothing works except I see mouse cursor movement only that too don't respond to clicks
@leelaprasad409
@leelaprasad409 2 жыл бұрын
Hi , I have used same directives but daily is not working for me . What to do pls suggest.
@igors_lv
@igors_lv 2 жыл бұрын
I think day week month is needed always, size is additional parameter. Rotate daily plus size 10M means it will try every day, but will not rotate if size is less than 10 megabytes Also logrotate has dry run option, it will output what it does, but not touch actual files, good for initial setup.
@jamesmichaels4209
@jamesmichaels4209 Жыл бұрын
thank you yes i hope you are feeling better
@ahmedw5
@ahmedw5 2 жыл бұрын
I will definitely try this out, thanks Shawn!
@shawnp0wers
@shawnp0wers 2 жыл бұрын
You bet! I've accidentally filled up too many server hard drives with runaway logs. And this is *so easy* to do. :)
@cr1ss4_yt
@cr1ss4_yt 2 жыл бұрын
With my own script files I use the date command to add an extra information to the output filename, like output_6.log for a log that is created on Saturday (6th day of week). With this you have some old logs and a limit for the total number of this old logs.
@leelaprasad409
@leelaprasad409 2 жыл бұрын
Can u share the script here for date command where for each execution it will be like output1.log , output2.log
@cr1ss4_yt
@cr1ss4_yt 2 жыл бұрын
I use this to limit the number of files and disk space without the need to delete old logs. DAYANDHOUR=`date +"%u_%H"` # %u => day of week (1..7); 1 is Monday echo "day of week and hour of day:" $DAYANDHOUR DAYOFYEAR=`date +"%j"` # %j => day of year (001..366) echo "day of year:" $DAYOFYEAR OUTPUT="output_$DAYANDHOUR" echo $OUTPUT day of week and hour of daa: 1_09 day of year: 016 output_1_09 For more information see: man date
@favourdaniel2410
@favourdaniel2410 2 жыл бұрын
I wish you quick recovery, probably hoping you feel a lot better now compared to when you made the video.
@shawnp0wers
@shawnp0wers 2 жыл бұрын
Thank you! I'm healed, but still exhausted most of the day. Hopefully I'll get back to normal soon!
@malikon6953
@malikon6953 Жыл бұрын
awesome. Thank you.
@JamesStoddah
@JamesStoddah 2 жыл бұрын
Sent by #HankGreeen
@laurenlinsalata4328
@laurenlinsalata4328 2 жыл бұрын
+
@shawnp0wers
@shawnp0wers 2 жыл бұрын
Thanks for stopping by! It was pretty surreal to get called out like that. :)
Logrotate - Log Management on Linux Servers
27:16
Better Stack
Рет қаралды 3,6 М.
Let's Manipulate Permissions and Ownership!
17:59
Shawn Powers
Рет қаралды 12 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Filtering .log files, with cat, grep, cut, sort, and uniq
15:36
Why More People Dont Use Linux
18:51
ThePrimeTime
Рет қаралды 350 М.
Linux Crash Course - Understanding Logging
29:10
Learn Linux TV
Рет қаралды 55 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 388 М.
Why Linux is better for (most) developers!
14:59
The Linux Experiment
Рет қаралды 486 М.
Logrotate
11:05
Ruby Tree Software, Inc.
Рет қаралды 55 М.
Creating Linux Users is (TOO?) Easy!
10:32
Shawn Powers
Рет қаралды 11 М.
Gitlab DELETING Production Databases | Prime Reacts
17:27
ThePrimeTime
Рет қаралды 366 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН