Created
January 16, 2017 02:24
-
-
Save tckmn/efa526b3cc031c78ded0cf269033490f to your computer and use it in GitHub Desktop.
density plot of pacman / alpm transactions by time of day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# license: unlicense <http://unlicense.org/> | |
times <- system2('bash', args=c('-c', shQuote('grep "\\[ALPM\\] transaction started" /var/log/pacman.log | cut -c 13-17')), stdout=TRUE) | |
times <- strtoi(substr(times, 1, 2), 10) + strtoi(substr(times, 4, 5), 10) / 60 | |
plot(density(c(times-24, times, times+24), bw=0.3), xlim=range(0:24), xaxs="i", axes=FALSE) | |
axis(side=1, at=c(0:24), las=2) | |
box() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment