Sathyajith Bhat's Blog, page 2

December 28, 2016

Gaming Report for 2016

[image error]


End of the year is here and while other services are busy sending Year in 2016 report, there sparked a mini gaming report in our telegram group and I decided to compile my gaming in 2016 report. At the start of the year I had decided to finish more games this year and I guess I did a pretty decent in accomplishing this. So here’s my summary


Games finished this year:

PC:



Just Cause 3 – Screens | Video
Transistor – Review | Screens
Grand Theft Auto V – Thoughts | Screens
Cities:Skylines (though can’t say this as “finished”)
Metal Gear Rising: Revengeance – Screens | Videos
Forza Horizon 3 – Videos



The Witcher 2 – Assassins of Kings Enhanced Edition – Screens




PS4:



Uncharted
Uncharted 2
Uncharted 3
Uncharted 4
Journey
Diablo 3
Transformers: Devastation
Stories: Path of Destinies

Started but not close to completion:

Anomaly 2 + others in the series
Witcher 3 (~12 hours played)
Bioshock Infinite (~8 hours played)
Divinity:Original Sin (~3 hours)
MGS: Phantom Pain (put in ~12 hours, got annoyed with the first mission itself :|)
Pillars of Eternity (10 hours in)
Valkyria Chronicles (6 hours in)

For the year ahead I hope to play and finish more games. 2017, on wards!

 •  0 comments  •  flag
Share on Twitter
Published on December 28, 2016 02:59

December 12, 2016

Statutory warning: Decimals in your logrotate config can be bad for your server’s disk space

Last night as I was about to head to sleep, Sensu started emailing me about disk space warnings on one of the backend servers. That’s strange, I thought. I had set up logrotate with appropriate limits to ensure the log file size is reasonable and rotation happens on a daily basis.


Curious, I ssh’d into the server to investigate. Running a df -h indicated as expected the disk space in use was over 70% (which is the trigger for sensu to send a notification) and the log files had grown way over expected size. So why didn’t logrotate rotate the files? I ran logrotate again to see what’s happening




$ sudo /etc/cron.daily/logrotate

error: backend:7 bad size '536870912.0'

error: found error in "log/production.log", skipping


Huh, ok so now we know why logrotate didn’t run. But having a decimal in the config causes it to flag as bad size? I checked the documentation and it doesn’t mention so:


size size
Log files are rotated when they grow bigger then size bytes. If
size is followed by M, the size if assumed to be in megabytes.
If the k is used, the size is in kilobytes. So size 100, size
100k, and size 100M are all valid.

Removing the decimal allowed logrotate to work fine and rotated the files. So that’s a TIL for me. In case you’re wondering how that decimal came into the picture, Chef is used as the CM tool for deploying all changes. The size is defined in a recipe as so


size (0.5 * (1024 * 1024 * 1024))

maxsize (0.5 * (1024 * 1024 * 1024))


Now the first number is templated based on what service is being deployed and for the backend, it is configured as 0.5. Since Chef uses Ruby, this evaluates to ‘536870912.0’ and thus, the error.

 •  0 comments  •  flag
Share on Twitter
Published on December 12, 2016 02:15

Sathyajith Bhat's Blog

Sathyajith Bhat
Sathyajith Bhat isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Sathyajith Bhat's blog with rss.