lm(formula = (100 - CPU_IDLE) ~ TXN_WEIGHT, data = NMON)

Residuals:
Min 1Q Median 3Q Max
-7.8733 -2.2875 -0.4454 0.5365 10.8198

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.866e+01 6.968e+00 6.984 8.03e-10 ***
TXN_WEIGHT 3.368e-06 1.574e-06 2.139 0.0355 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.923 on 79 degrees of freedom
Multiple R-squared: 0.05475, Adjusted R-squared: 0.04278
F-statistic: 4.576 on 1 and 79 DF, p-value: 0.03552
lm(formula = (100 - CPU_IDLE) ~ TXN_NUM, data = NMON)

Residuals:
Min 1Q Median 3Q Max
-9.5149 -2.6369 0.0829 1.2740 10.2412

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.808e+01 1.496e+01 3.882 0.000213 ***
TXN_NUM 6.092e-07 1.670e-06 0.365 0.716216
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 4.031 on 79 degrees of freedom
Multiple R-squared: 0.001682, Adjusted R-squared: -0.01095
F-statistic: 0.1331 on 1 and 79 DF, p-value: 0.7162
library(RODBC)
library(rgl, pos=4)
library(mgcv, pos=4)
library(aplpack, pos=4)

SQL <- "SELECT * FROM nmon.app_cpu"

myDB <- odbcConnect("NMON")
odbcQuery(myDB, SQL)
NMON <- sqlGetResults(myDB, as.is=T)
odbcClose(myDB)

NMON$TXN_NUM <- as.numeric(NMON$TXN_NUM)
NMON$TXN_WEIGHT<- as.numeric(NMON$TXN_WEIGHT)
NMON$AVG_TIME<- as.numeric(NMON$AVG_TIME)
NMON$CPU_USER<- as.numeric(NMON$CPU_USER)
NMON$CPU_SYS<- as.numeric(NMON$CPU_SYS)
NMON$CPU_WAIT<- as.numeric(NMON$CPU_WAIT)
NMON$CPU_IDLE<- as.numeric(NMON$CPU_IDLE)

attach(NMON)

plot(100-NMON$CPU_IDLE, type="h", ylab="CPU%")
Hist(100-NMON$CPU_IDLE, scale="percent", breaks="Sturges", col="darkgray", xlab="CPU%")

scatterplot((100-CPU_IDLE)~TXN_WEIGHT, xlab="TXN*TIME", ylab="CPU%",
reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=NMON)

scatterplot((100-CPU_IDLE)~TXN_NUM, xlab="TXN", ylab="CPU%",
reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=NMON)

RegModel.CPU <- lm((100-CPU_IDLE)~TXN_WEIGHT, data=NMON)
summary(RegModel.CPU)

RegModel.CPU <- lm((100-CPU_IDLE)~TXN_NUM, data=NMON)
summary(RegModel.CPU)

資料集
資料分析
回歸分析
lm(formula = VALUE ~ TXN_WGHT, data = NMON)

Residuals:
     Min       1Q   Median       3Q      Max 
-248.876  -33.638   -6.525   48.061  216.819 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)  75.1539   168.3597   0.446    0.657  
TXN_WGHT      0.9780     0.3804   2.571    0.012 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Residual standard error: 94.78 on 79 degrees of freedom
Multiple R-squared: 0.07721,    Adjusted R-squared: 0.06553 
F-statistic:  6.61 on 1 and 79 DF,  p-value: 0.01202
library(RODBC)
library(rgl, pos=4)
library(mgcv, pos=4)
library(aplpack, pos=4)

SQL <- "SELECT * FROM nmon.disk_busy_date"

myDB <- odbcConnect("NMON")
odbcQuery(myDB, SQL)
NMON <- sqlGetResults(myDB, as.is=T)
odbcClose(myDB)

NMON$PERF_DATE <- as.numeric(NMON$PERF_DATE)
NMON$DISK_VALUE <- as.numeric(NMON$DISK_VALUE)
NMON$TXN_NUM <- as.numeric(NMON$TXN_NUM)
NMON$TXN_WEIGHT<- as.numeric(NMON$TXN_WEIGHT)
NMON$AVG_TIME<- as.numeric(NMON$AVG_TIME)
NMON$CPU_USAGE<- as.numeric(NMON$CPU_USAGE)

attach(NMON)

VALUE <- NMON$DISK_VALUE / 1000
TXN_WGHT <- NMON$TXN_WEIGHT/ 10000

scatterplot(VALUE~TXN_WGHT, xlab="TXN*TIME", ylab="DISK VALUE",
reg.line=lm, smooth=TRUE, spread=TRUE, boxplots='xy', span=0.5, data=NMON)

RegModel.DISK <- lm(VALUE~TXN_WGHT, data=NMON)
summary(RegModel.DISK)

detach(NMON)
remove(myDB)
remove(NMON)

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: