using gnuplot for time plotting

Couple of days back, I was working with some data and wanted to plot it. I had couple of options Excel, ploticus and then our own gnuplot. My choice here was gnuplot, as this is most commonly available and helps me write scripts that can automate my repetitive task. So far, so good. The data I was plotting was against time, that was the problem. Couple of quick searches did not result into any luck to get me on the path and hence with some man pages and some documentation, finally I found this, might be this will be helpful for others.

1
2
3
4
5
gnuplot> set xdata time

gnuplot> set timefmt "%Y-%m-%d"

gnuplot> plot "sample.dat" using 1:2 with boxes
Enhanced by Zemanta

Zabbix error\’d — just for fun

\"History-Zabbix

I was woking on Zabbix some days back and here\’s a screenshot that I took from Zabbix running on Red Hat Enterprise Linux 5. Pretty interesting to see that there is a graph with all the values on the Y-axis as 3.26GB and still there is a trend on the graph. How many times did you get such graph 🙂

\"Enhanced

Finding all numbers that are bigger than 1 in vim

/^([2-9]d*|1d+)
If we have a csv like structure

The trick here is simple, lets look at the regex from the begining:

^ – start from the begining
() – start and end of block
[] – digits within this. So we are looking from 2 to 9 to exclude the numbers begining with 1
d – search for digits
* – search for one or more
| – or operation
1 – search for numbers begining with 1
+ – containing atleast one occurence or more.

\"Reblog