[R] Averate memory usage trend
arun
smartpink111 at yahoo.com
Fri Sep 20 15:30:04 CEST 2013
library(stringr)
read.table(text=gsub("[()]","",str_trim(input[input!=""])),sep="",header=FALSE,stringsAsFactors=FALSE)
# V1 V2 V3
#1 6.2 httpd 18
#2 4.0 httpd 11
#3 4.0 httpd 11
#4 3.3 httpd 9
#5 4.2 httpd 12
#6 4.2 httpd 12
#7 4.2 httpd 12
#8 4.2 httpd 12
#9 4.2 httpd 12
A.K.
----- Original Message -----
From: "mohan.radhakrishnan at polarisft.com" <mohan.radhakrishnan at polarisft.com>
To: r-help at r-project.org
Cc:
Sent: Friday, September 20, 2013 9:15 AM
Subject: Re: [R] Averate memory usage trend
Replying with some code.
input<- readLines(textConnection("
6.2 httpd (18)
4.0 httpd (11)
4.0 httpd (11)
3.3 httpd (9)
4.2 httpd (12)
4.2 httpd (12)
4.2 httpd (12)
4.2 httpd (12)
4.2 httpd (12)
"))
data<-input[input!=""]
> data
[1] " 6.2 httpd (18)" " 4.0 httpd (11)" " 4.0 httpd (11)" " 3.3
httpd (9)"
[5] " 4.2 httpd (12)" " 4.2 httpd (12)" " 4.2 httpd (12)" " 4.2
httpd (12)"
[9] " 4.2 httpd (12)"
m <- t(sapply(1:1,function(x) unlist(strsplit(data," +"))))
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
[,12] [,13] [,14]
[1,] "" "6.2" "httpd" "(18)" "" "4.0" "httpd" "(11)" "" "4.0"
"httpd" "(11)" "" "3.3"
[,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
[,25] [,26] [,27]
[1,] "httpd" "(9)" "" "4.2" "httpd" "(12)" "" "4.2" "httpd" "(12)"
"" "4.2" "httpd"
[,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36]
[1,] "(12)" "" "4.2" "httpd" "(12)" "" "4.2" "httpd" "(12)"
What I want to do is this ?
6.2 httpd 18
4.0 httpd 11
4.0 httpd 11
3.3 httpd 9)
4.2 httpd 12
4.2 httpd 12
4.2 httpd 12
4.2 httpd 12
4.2 httpd 12
Thanks,
Mohan
From: mohan.radhakrishnan at polarisft.com
To: r-help at r-project.org
Date: 09/20/2013 10:44 AM
Subject: [R] Averate memory usage trend
Sent by: r-help-bounces at r-project.org
Hi,
I would like to understand how to draw a graph to find out the
average memory used by a single httpd process given these details
collected over a period of
several days. I code R but this is about a method to find an average
memory utilization. I believe I have enough data.
How should I statistically calculate this ?
The figures inside braces are the total httpd processes at that time. Will
there be an error margin if I have combined totals like this ?
Sample data :
Private Shared RAM used Program
4.0 MiB 3.3 MiB 7.2 MiB httpd (11)
3.3 MiB 3.0 MiB 6.3 MiB httpd (9)
4.2 MiB 3.3 MiB 7.5 MiB httpd (12)
Thanks,
Mohan
This e-Mail may contain proprietary and confidential information and is
sent for the intended recipient(s) only. If by an addressing or
transmission error this mail has been misdirected to you, you are
requested to delete this mail immediately. You are also hereby notified
that any use, any form of reproduction, dissemination, copying,
disclosure, modification, distribution and/or publication of this e-mail
message, contents or its attachment other than by its intended recipient/s
is strictly prohibited.
Visit us at http://www.polarisFT.com
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polarisFT.com
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list