Skip to content

Commit

Permalink
Merge branch 'master' of github.com:robinbaxon/kittens-minecraft-web
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbaxon committed Apr 14, 2018
2 parents de9204e + fdc73dd commit 991f6d1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crontab-entries.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* * * * * cd /www/default && git pull
* * * * * wget http://api.fhrnet.eu/mc/minecraft.baxon.org/25565/newinfo?method=json -O /www/default/static-test-api/minecraft.baxon.org/25565/newinfo
* * * * * /usr/bin/gnuplot /www/default/scripts/creategraph.gp > /www/default/images/memoryusage.png
40 changes: 40 additions & 0 deletions scripts/creategraph.gp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# gnuplot script file for plotting memory usage over time
#!/usr/bin/gnuplot
reset

set terminal unknown


set xdata time
set timefmt "%s"
set format x "%H:%M:%S"

plot "/home/minecraft/memorylogs/memorylog.dat" using 1:2 title "Minnebruk"
set xlabel "Tid/dato"
set ylabel "Minnebruk"

set ytics 200
#set xtics 1000

xspan = GPVAL_DATA_X_MAX - GPVAL_DATA_X_MIN
yspan = GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN

xequiv = 60
yequiv = 100
ar = yspan/xspan * xequiv/yequiv

ydim = 1080
xdim = 200/ar

set xrange [GPVAL_DATA_X_MIN:GPVAL_DATA_X_MAX+200]
set yrange [GPVAL_DATA_Y_MIN:GPVAL_DATA_Y_MAX]

set terminal png size xdim,ydim
set size ratio ar
set style data linespoints

set title "Minnebruk over tid"
set key below
set grid

plot "/home/minecraft/memorylogs/memorylog.dat" using 1:2 title "Minnebruk"

0 comments on commit 991f6d1

Please sign in to comment.