5 # system("parse_rt_data.py 22 > rt_monitor_data.csv");
6 m <- read.csv('rt_monitor_data.csv', sep=',', header=TRUE)
10 h<-hist(log(log(m$replies)), breaks=50)
11 lines(h$breaks[which(h$counts!=0)], h$counts[which(h$counts!=0)])
12 h<-hist(log(log(log(m$replies))), breaks=50)
13 lines(h$breaks[which(h$counts!=0)], h$counts[which(h$counts!=0)])
18 m2 <- m[which(m$complete == 1),]
19 d <- (m2$lastreply - m2$start)/(60*60)
21 #start_image("rt_hist_ttc_1000.png")
22 #hist(d[which(d<1000)], xlab="hours from creation to last reply", breaks=30)
25 #start_image("rt_hist_ttc_200.png")
26 #hist(d[which(d<200)], xlab="hours from creation to last reply", breaks=30)
29 #start_image("rt_hist_ttc_50.png")
30 #hist(d[which(d<50)], xlab="hours from creation to last reply", breaks=30)
33 #start_image("rt_hist_ttc_10.png")
34 #hist(d[which(d<10)], xlab="hours from creation to last reply", breaks=30)
37 #d2 <- (t2$lastreply - t2$start)
38 #h<-hist(log(d2), plot=F, breaks=50)
39 #lines(h$breaks[which(h$counts!=0)], h$counts[which(h$counts!=0)])
42 # this doesn't work as I would like. I think the bins aren't as I expect
43 #h <- hist(d, plot=F, breaks=c(seq(0,max(d)+1, .1)))
44 #plot(h$counts, log="x", pch=20, col="blue",
45 # main="Log-normal distribution",
46 # xlab="Value", ylab="Frequency")
51 d2<-(m2$lastreply-m2$start)
52 start_image("rt_monitor_ttc.png")
59 start_image("rt_monitor_trends.png")
60 hist(log(d2[which(d2>59026)]), breaks=60, xlab="LOG(time to last-reply)", main="Monitor Queue Traffic patterns")
63 tstamp_78 <-unclass(as.POSIXct("2008-01-01", origin="1960-01-01"))[1]
64 tstamp_89 <-unclass(as.POSIXct("2009-01-01", origin="1960-01-01"))[1]
66 m_7 <- m2[which( m2$start < tstamp_78 ),]
67 m_8 <- m2[which( m2$start >= tstamp_78 & m2$start < tstamp_89 ),]
68 m_9 <- m2[which( m2$start >= tstamp_89 ),]
78 tstamp <-unclass(as.POSIXct("2008-01-01", origin="1960-01-01"))
79 m_67 <- m2[which( m2$start < tstamp[1] ),]
80 m_89 <- m2[which( m2$start >= tstamp[1] ),]
90 s_list <- c('2006'=1112, '2007'=1591, '2008'=1019, '2009'=815)
91 m_list <- c('2006'=0, '2007'=119, '2008'=229, '2009'=251)
93 start_image('rt_aggregate_traffic.png')
98 s_list <- c(1519, 1596, 1112, 1591, 1019, 815)
99 m_list <- c(0,0,0, 119, 229, 251)
100 x_online_node_list <- c(1, 2.5, 4, 5.5, 7, 8.5)
101 y_online_node_list <- c(330, 480, 500, 550, 575, 642)
103 y<- rbind(support=s_list, monitor=m_list)
104 barplot(y, space=0.5, width=1, ylim=c(0,2000), xlim=c(0,9),
105 col=c('grey35', 'grey85'),
106 legend=F, ylab="Tickets with One or More Replies", xlab="Year", axes=F)
107 scale_by <- 1500 / 700
108 lines(x_online_node_list, y_online_node_list*scale_by)
109 points(x_online_node_list, y_online_node_list*scale_by, pch=c(22))
110 ticks<-c(0, 100, 200, 300, 400, 500, 600, 700)
112 axis(1, labels=c('2004', '2005', '2006', '2007', '2008', '2009'), at=x_online_node_list)
114 axis(4, las=1, labels=ticks, at=ticks*scale_by)
116 mtext("Online Node Count", 4, line=3)
119 legend=c("Online Node Count", "MyOps Tickets", "Support Tickets"),
120 fill=c(0, 'grey85', 'grey40'),
121 lty=c(1,0,0), merge=T)
124 start_image('rt_tickets_per_machine.png')
125 t_list <- s_list + m_list
126 plot(x_online_node_list, t_list / y_online_node_list, ylim=c(0,5), space=0.5, width=1, legend=F, ylab="Tickets per Online Node", xlab="Year", xlim=c(0,9), axes=F, type='l')
127 points(x_online_node_list, t_list / y_online_node_list, ylim=c(0,5), xlim=c(0,9), pch=c(23))
128 axis(1, labels=c('2004', '2005', '2006', '2007', '2008', '2009'), at=x_online_node_list)
132 legend=c("Tickets per Online Node"),
140 start_image("rt_monitor_seasonal.png")
142 par(mai=c(.3,.3,.3,.3))
143 year_hist(m_7, "2007", "2006/12/31", "2008/1/7", 60)
144 year_hist(m_8, "2008", "2007/12/30", "2009/1/7", 60)
145 year_hist(m_9, "2009", "2008/12/28", "2010/1/30", 60)