Here's what I have:
Client side (192.168.11.121):Windows Vista,Firefox
Server side (192.168.11.16): Windows 2003, My web server or IIS
Fiddler running on the client shows that some images take much longer to download than others, even though images are same size. I ran a client side packet trace and found that the difference between the "fast" and "slow" downloads is that for the slow downloads, the client is receiving the data quickly but not sending ACKs, leading the server to retransmit. The first trace below contains both a successful and a slow request.
A successful image request:
1132 is the image request from the browser
1133-1155 is the response. As the server sends data packets, the client ACKs them as they arrive
An image request with retransmits:
1159 is the image request from the browser
1160-1182 is the response. This time the client is not ACKing the packets.
1183 is a duplicate ack from the client to server - why?
I have read about delayed ACKs but I don't think the conditions apply, as the client should be acking at least every other packet, right?
Does client think there is a missing packet and is therefore not sending the acks? Is there a missing packet? If so, I don't see it.
I have tried 2 client machines with this server - problem manifests for both. Both these clients can download images fine from other servers running same OS and webserver. So I think it's a server side problem, but what?
No. Time Source Destination Protocol Info
1132 7.217259 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [PSH, ACK] Seq=6097 Ack=75896 Win=65700 Len=1016
1133 7.219314 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=75896 Ack=7113 Win=64519 Len=1460
1134 7.219318 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=77356 Ack=7113 Win=64519 Len=1460
1135 7.219339 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=78816 Win=65700 Len=0
1136 7.219654 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=78816 Ack=7113 Win=64519 Len=1460
1137 7.219656 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=80276 Ack=7113 Win=64519 Len=1460
1138 7.219659 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=81736 Ack=7113 Win=64519 Len=1460
1139 7.219675 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=83196 Win=65700 Len=0
1140 7.219978 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=83196 Ack=7113 Win=64519 Len=1460
1141 7.219980 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=84656 Ack=7113 Win=64519 Len=1460
1142 7.219991 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=86116 Win=65700 Len=0
1143 7.220310 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=86116 Ack=7113 Win=64519 Len=1460
1144 7.220313 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=87576 Ack=7113 Win=64519 Len=1460
1145 7.220315 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=89036 Ack=7113 Win=64519 Len=1460
1146 7.220327 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=90496 Win=65700 Len=0
1147 7.220645 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=90496 Ack=7113 Win=64519 Len=1460
1148 7.220647 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=91956 Ack=7113 Win=64519 Len=1460
1149 7.220649 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=93416 Ack=7113 Win=64519 Len=1460
1150 7.220662 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=94876 Win=65700 Len=0
1151 7.220976 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=94876 Ack=7113 Win=64519 Len=1460
1152 7.220978 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=96336 Ack=7113 Win=64519 Len=1460
1153 7.220989 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=97796 Win=65700 Len=0
1154 7.221316 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=97796 Ack=7113 Win=64519 Len=1460
1155 7.221319 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [PSH, ACK] Seq=99256 Ack=7113 Win=64519 Len=710
1156 7.221335 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=7113 Ack=99966 Win=65700 Len=0
1159 7.414879 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [PSH, ACK] Seq=7113 Ack=99966 Win=65700 Len=1016
1160 7.417006 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=99966 Ack=8129 Win=65535 Len=1460
1161 7.417009 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=101426 Ack=8129 Win=65535 Len=1460
1162 7.417337 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=102886 Ack=8129 Win=65535 Len=1460
1163 7.417339 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=104346 Ack=8129 Win=65535 Len=1460
1164 7.417343 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=105806 Ack=8129 Win=65535 Len=1460
1165 7.417661 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=107266 Ack=8129 Win=65535 Len=1460
1166 7.417664 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=108726 Ack=8129 Win=65535 Len=1460
1167 7.418004 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=110186 Ack=8129 Win=65535 Len=1460
1168 7.418006 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=111646 Ack=8129 Win=65535 Len=1460
1169 7.418008 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=113106 Ack=8129 Win=65535 Len=1460
1170 7.418336 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=114566 Ack=8129 Win=65535 Len=1460
1171 7.418339 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=116026 Ack=8129 Win=65535 Len=1460
1172 7.418342 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=117486 Ack=8129 Win=65535 Len=1460
1173 7.418674 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=118946 Ack=8129 Win=65535 Len=1460
1174 7.418677 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=120406 Ack=8129 Win=65535 Len=1460
1175 7.419002 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=121866 Ack=8129 Win=65535 Len=1460
1176 7.419004 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=123326 Ack=8129 Win=65535 Len=1460
1177 7.419007 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=124786 Ack=8129 Win=65535 Len=1460
1178 7.419375 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=126246 Ack=8129 Win=65535 Len=1460
1179 7.419378 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=127706 Ack=8129 Win=65535 Len=1460
1180 7.419708 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=129166 Ack=8129 Win=65535 Len=1460
1181 7.419710 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=130626 Ack=8129 Win=65535 Len=1460
1182 7.419712 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [PSH, ACK] Seq=132086 Ack=8129 Win=65535 Len=316
1183 7.419741 192.168.11.121 192.168.11.16 TCP [TCP Dup ACK 1159#1] 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=99966 Win=65700 Len=0 SLE=132086 SRE=132402
1186 7.617479 192.168.11.16 192.168.11.121 TCP [TCP Dup ACK 1182#1] ddi-tcp-1 > 60781 [ACK] Seq=132402 Ack=8129 Win=65535 Len=0
1187 7.742696 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=99966 Ack=8129 Win=65535 Len=1460
1188 7.939708 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=101426 Win=65700 Len=0 SLE=132086 SRE=132402
1189 7.940725 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=101426 Ack=8129 Win=65535 Len=1460
1190 7.940727 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=102886 Ack=8129 Win=65535 Len=1460
1191 7.940750 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=104346 Win=65700 Len=0 SLE=132086 SRE=132402
1192 7.941698 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=104346 Ack=8129 Win=65535 Len=1460
1193 7.941700 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=105806 Ack=8129 Win=65535 Len=1460
1194 7.941712 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=107266 Win=65700 Len=0 SLE=132086 SRE=132402
1195 7.942030 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=107266 Ack=8129 Win=65535 Len=1460
1196 7.942684 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=108726 Ack=8129 Win=65535 Len=1460
1197 7.942687 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=110186 Ack=8129 Win=65535 Len=1460
1198 7.942700 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=111646 Win=65700 Len=0 SLE=132086 SRE=132402
1199 7.943015 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=111646 Ack=8129 Win=65535 Len=1460
1200 7.943651 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=113106 Ack=8129 Win=65535 Len=1460
1201 7.943653 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=114566 Ack=8129 Win=65535 Len=1460
1202 7.943664 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=116026 Win=65700 Len=0 SLE=132086 SRE=132402
1203 7.943983 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=116026 Ack=8129 Win=65535 Len=1460
1204 7.943985 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=117486 Ack=8129 Win=65535 Len=1460
1205 7.943995 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=118946 Win=65700 Len=0 SLE=132086 SRE=132402
1206 7.944665 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=118946 Ack=8129 Win=65535 Len=1460
1207 7.944667 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=120406 Ack=8129 Win=65535 Len=1460
1208 7.944681 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=121866 Win=65700 Len=0 SLE=132086 SRE=132402
1209 7.944999 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=121866 Ack=8129 Win=65535 Len=1460
1210 7.945002 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=123326 Ack=8129 Win=65535 Len=1460
1211 7.945004 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=124786 Ack=8129 Win=65535 Len=1460
1212 7.945018 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=126246 Win=65700 Len=0 SLE=132086 SRE=132402
1213 7.945330 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=126246 Ack=8129 Win=65535 Len=1460
1214 7.945333 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=127706 Ack=8129 Win=65535 Len=1460
1215 7.945344 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=129166 Win=65700 Len=0 SLE=132086 SRE=132402
1216 7.945664 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=129166 Ack=8129 Win=65535 Len=1460
1217 7.945667 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [ACK] Seq=130626 Ack=8129 Win=65535 Len=1460
1218 7.945669 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] ddi-tcp-1 > 60781 [PSH, ACK] Seq=132086 Ack=8129 Win=65535 Len=316
1219 7.945686 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=132402 Win=65700 Len=0
1220 7.945692 192.168.11.121 192.168.11.16 TCP [TCP Dup ACK 1219#1] 60781 > ddi-tcp-1 [ACK] Seq=8129 Ack=132402 Win=65700 Len=0 SLE=132086 SRE=132402
1223 8.038426 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [PSH, ACK] Seq=8129 Ack=132402 Win=65700 Len=1016
1224 8.040480 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=132402 Ack=9145 Win=64519 Len=1460
1225 8.040482 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=133862 Ack=9145 Win=64519 Len=1460
1226 8.040499 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=9145 Ack=135322 Win=65700 Len=0
1227 8.040813 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=135322 Ack=9145 Win=64519 Len=1460
1228 8.040815 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=136782 Ack=9145 Win=64519 Len=1460
1229 8.040817 192.168.11.16 192.168.11.121 TCP ddi-tcp-1 > 60781 [ACK] Seq=138242 Ack=9145 Win=64519 Len=1460
1230 8.040830 192.168.11.121 192.168.11.16 TCP 60781 > ddi-tcp-1 [ACK] Seq=9145 Ack=139702 Win=65700 Len=0
I see the same behavior downloading images from IIS on this server:
No. Time Source Destination Protocol Info
287 22.257956 192.168.11.121 192.168.11.16 TCP 49387 > http [PSH, ACK] Seq=4531 Ack=86993 Win=65700 Len=869
288 22.261529 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=86993 Ack=5400 Win=65535 Len=1460
289 22.261532 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=88453 Ack=5400 Win=65535 Len=1460
290 22.261859 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=89913 Ack=5400 Win=65535 Len=1460
291 22.261861 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=91373 Ack=5400 Win=65535 Len=1460
292 22.261864 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=92833 Ack=5400 Win=65535 Len=1460
293 22.262194 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=94293 Ack=5400 Win=65535 Len=1460
294 22.262196 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=95753 Ack=5400 Win=65535 Len=1460
295 22.262526 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=97213 Ack=5400 Win=65535 Len=1460
296 22.262527 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=98673 Ack=5400 Win=65535 Len=1460
297 22.262530 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=100133 Ack=5400 Win=65535 Len=1460
298 22.262858 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=101593 Ack=5400 Win=65535 Len=1460
299 22.262860 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=103053 Ack=5400 Win=65535 Len=1460
300 22.263193 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=104513 Ack=5400 Win=65535 Len=1460
301 22.263196 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=105973 Ack=5400 Win=65535 Len=1460
302 22.263197 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=107433 Ack=5400 Win=65535 Len=1460
303 22.263530 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=108893 Ack=5400 Win=65535 Len=1460
304 22.263532 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=110353 Ack=5400 Win=65535 Len=1460
305 22.263534 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=111813 Ack=5400 Win=65535 Len=1460
306 22.263863 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=113273 Ack=5400 Win=65535 Len=1460
307 22.263865 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=114733 Ack=5400 Win=65535 Len=1460
308 22.264196 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=116193 Ack=5400 Win=65535 Len=1460
309 22.264198 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=117653 Ack=5400 Win=65535 Len=1460
310 22.264200 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=119113 Ack=5400 Win=65535 Len=1460
311 22.264528 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=120573 Ack=5400 Win=65535 Len=1460
312 22.264531 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=122033 Ack=5400 Win=65535 Len=1460
313 22.264533 192.168.11.16 192.168.11.121 TCP http > 49387 [ACK] Seq=123493 Ack=5400 Win=65535 Len=1460
314 22.264859 192.168.11.16 192.168.11.121 TCP http > 49387 [PSH, ACK] Seq=124953 Ack=5400 Win=65535 Len=928
315 22.264886 192.168.11.121 192.168.11.16 TCP [TCP Dup ACK 287#1] 49387 > http [ACK] Seq=5400 Ack=86993 Win=65700 Len=0 SLE=124953 SRE=125881
324 22.459724 192.168.11.16 192.168.11.121 TCP [TCP Dup ACK 314#1] http > 49387 [ACK] Seq=125881 Ack=5400 Win=65535 Len=0
326 22.788166 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=86993 Ack=5400 Win=65535 Len=1460
330 22.980324 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=88453 Win=65700 Len=0 SLE=124953 SRE=125881
331 22.981699 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=88453 Ack=5400 Win=65535 Len=1460
332 22.981703 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=89913 Ack=5400 Win=65535 Len=1460
333 22.981755 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=91373 Win=65700 Len=0 SLE=124953 SRE=125881
334 22.983025 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=91373 Ack=5400 Win=65535 Len=1460
335 22.983028 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=92833 Ack=5400 Win=65535 Len=1460
336 22.983034 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=94293 Ack=5400 Win=65535 Len=1460
337 22.983085 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=95753 Win=65700 Len=0 SLE=124953 SRE=125881
338 22.984287 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=95753 Ack=5400 Win=65535 Len=1460
339 22.984290 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=97213 Ack=5400 Win=65535 Len=1460
340 22.984292 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=98673 Ack=5400 Win=65535 Len=1460
341 22.984294 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=100133 Ack=5400 Win=65535 Len=1460
342 22.984339 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=101593 Win=65700 Len=0 SLE=124953 SRE=125881
343 22.985373 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=101593 Ack=5400 Win=65535 Len=1460
344 22.985377 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=103053 Ack=5400 Win=65535 Len=1460
345 22.985382 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=104513 Ack=5400 Win=65535 Len=1460
346 22.985435 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=105973 Win=65700 Len=0 SLE=124953 SRE=125881
347 22.985706 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=105973 Ack=5400 Win=65535 Len=1460
348 22.985710 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=107433 Ack=5400 Win=65535 Len=1460
349 22.985753 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=108893 Win=65700 Len=0 SLE=124953 SRE=125881
350 22.986436 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=108893 Ack=5400 Win=65535 Len=1460
351 22.986438 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=110353 Ack=5400 Win=65535 Len=1460
352 22.986459 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=111813 Win=65700 Len=0 SLE=124953 SRE=125881
353 22.987002 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=111813 Ack=5400 Win=65535 Len=1460
354 22.987005 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=113273 Ack=5400 Win=65535 Len=1460
355 22.987011 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=114733 Ack=5400 Win=65535 Len=1460
356 22.987013 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=116193 Ack=5400 Win=65535 Len=1460
357 22.987064 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=117653 Win=65700 Len=0 SLE=124953 SRE=125881
358 22.987174 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=117653 Ack=5400 Win=65535 Len=1460
359 22.987741 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=119113 Ack=5400 Win=65535 Len=1460
360 22.987744 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=120573 Ack=5400 Win=65535 Len=1460
361 22.987747 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=122033 Ack=5400 Win=65535 Len=1460
362 22.987805 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=123493 Win=65700 Len=0 SLE=124953 SRE=125881
363 22.988171 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [ACK] Seq=123493 Ack=5400 Win=65535 Len=1460
364 22.988175 192.168.11.16 192.168.11.121 TCP [TCP Retransmission] http > 49387 [PSH, ACK] Seq=124953 Ack=5400 Win=65535 Len=928
365 22.988219 192.168.11.121 192.168.11.16 TCP 49387 > http [ACK] Seq=5400 Ack=125881 Win=65700 Len=0
366 22.988236 192.168.11.121 192.168.11.16 TCP [TCP Dup ACK 365#1] 49387 > http [ACK] Seq=5400 Ack=125881 Win=65700 Len=0 SLE=124953 SRE=125881
409 25.633275 192.168.11.121 192.168.11.16 TCP 49387 > http [PSH, ACK] Seq=5400 Ack=125881 Win=65700 Len=990
You have run monitoring program in server side (192.168.11.16), right?
So you don't directly see what packets the client received.
But packet number 1183 (selective ack from client 192.168.11.121) tells all what we need:
Client acknowledge bytes from the begin to 99966, and 132086-132401.
Client did not receive packets 1160-1181. Packets 1156 and 1182 where received. So the ack 1183 was triggered by packet 1182.
The problem is not in server or client application.
There are lot of possible reasons, why packets 1160-1181 were lost between hosts.
We can only start quessing:
Both captured problems seem to be wery similar: Only the last (smaller) packet pass without retransmit. So this could be some kind of PMTU and 'don't fragment' problem. Or just a broken NIC or switch.
Related
Could someone look at the following packet capture and tell me what may be happening? Packet 57 shows the TCP reset from the server side. This is not expected. After the TCP reset, retrans packets are still arriving. Could the reason for the TCP reset be explained by this data?
49 2022-04-26 10:35:20.613859 xx.xxx.x.xxx 10.30.16.101 TLSv1.2 476 Application Data
50 2022-04-26 10:35:20.613891 10.30.16.101 xx.xxx.x.xxx TCP 66 15189 → 2017 [ACK] Seq=45 Ack=7929 Win=19203 Len=0 TSval=1662586616 TSecr=1410411633
51 2022-04-26 10:35:20.803241 xx.xxx.x.xxx 10.30.16.101 TLSv1.2 384 Application Data
52 2022-04-26 10:35:20.803289 10.30.16.101 xx.xxx.x.xxx TCP 66 15189 → 2017 [ACK] Seq=45 Ack=8247 Win=19203 Len=0 TSval=1662586806 TSecr=1410411823
53 2022-04-26 10:35:20.992987 xx.xxx.x.xxx 10.30.16.101 TLSv1.2 97 Application Data
54 2022-04-26 10:35:20.993041 10.30.16.101 xx.xxx.x.xxx TCP 66 15189 → 2017 [ACK] Seq=45 Ack=8278 Win=19203 Len=0 TSval=1662586995 TSecr=1410412013
55 2022-04-26 10:35:23.898574 xx.xxx.x.xxx 10.30.16.101 TLSv1.2 97 Application Data
56 2022-04-26 10:35:23.898613 10.30.16.101 xx.xxx.x.xxx TCP 66 15189 → 2017 [ACK] Seq=45 Ack=8309 Win=19203 Len=0 TSval=1662589901 TSecr=1410414918
57 2022-04-26 10:35:23.900616 xx.xxx.x.xxx 10.30.16.101 TCP 54 2017 → 15189 [RST, ACK] Seq=8309 Ack=45 Win=19203 Len=0
58 2022-04-26 10:35:24.106220 xx.xxx.x.xxx 10.30.16.101 TCP 97 [TCP Spurious Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=31 TSval=1410415126 TSecr=1662586995
59 2022-04-26 10:35:24.106255 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
60 2022-04-26 10:35:24.244805 xx.xxx.x.xxx 10.30.16.101 TLSv1.2 475 Application Data
61 2022-04-26 10:35:24.244835 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
62 2022-04-26 10:35:24.314219 xx.xxx.x.xxx 10.30.16.101 TCP 506 [TCP Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=440 TSval=1410415334 TSecr=1662586995
63 2022-04-26 10:35:24.314260 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
64 2022-04-26 10:35:24.746226 xx.xxx.x.xxx 10.30.16.101 TCP 506 [TCP Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=440 TSval=1410415766 TSecr=1662586995
65 2022-04-26 10:35:24.746279 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
66 2022-04-26 10:35:25.578251 xx.xxx.x.xxx 10.30.16.101 TCP 506 [TCP Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=440 TSval=1410416598 TSecr=1662586995
67 2022-04-26 10:35:25.578306 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
68 2022-04-26 10:35:27.246246 xx.xxx.x.xxx 10.30.16.101 TCP 506 [TCP Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=440 TSval=1410418266 TSecr=1662586995
69 2022-04-26 10:35:27.246286 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
70 2022-04-26 10:35:30.698227 xx.xxx.x.xxx 10.30.16.101 TCP 506 [TCP Retransmission] 2017 → 15189 [PSH, ACK] Seq=8278 Ack=45 Win=277 Len=440 TSval=1410421718 TSecr=1662586995
71 2022-04-26 10:35:30.698289 10.30.16.101 xx.xxx.x.xxx TCP 54 15189 → 2017 [RST] Seq=45 Win=0 Len=0
Any direction is appreciated.
Thanks
I am trying to print leap years between user given years as a vector.
leap_years<-function(V1,V2){
for(i in V1:V2){
if(i%%4==0 && i%%100!=0 ||i%%400==0)
{print(i)}}}
This gives me right years but as a single units. How to get them in single vector?
If you want to store the results in a vector you will need to store them.
Start by initiating an empty vector, and then instead of printing just append the value to the vector.
I modified your code in that sense:
leap_years<-function(V1,V2){
leap_vect=NULL
for(i in V1:V2){
if(i%%4==0 && i%%100!=0 ||i%%400==0){
leap_vect = append(leap_vect,i)
}
}
return(leap_vect)
}
Actually you can vectorize operations in function leap_years like below
leap_years <- function(V1,V2) {
v <- V1:V2
v[(v%%4==0 & v%%100!=0) | v%%400==0]
}
such that
> leap_years(1000,2000)
[1] 1004 1008 1012 1016 1020 1024 1028 1032 1036 1040 1044 1048 1052 1056 1060
[16] 1064 1068 1072 1076 1080 1084 1088 1092 1096 1104 1108 1112 1116 1120 1124
[31] 1128 1132 1136 1140 1144 1148 1152 1156 1160 1164 1168 1172 1176 1180 1184
[46] 1188 1192 1196 1200 1204 1208 1212 1216 1220 1224 1228 1232 1236 1240 1244
[61] 1248 1252 1256 1260 1264 1268 1272 1276 1280 1284 1288 1292 1296 1304 1308
[76] 1312 1316 1320 1324 1328 1332 1336 1340 1344 1348 1352 1356 1360 1364 1368
[91] 1372 1376 1380 1384 1388 1392 1396 1404 1408 1412 1416 1420 1424 1428 1432
[106] 1436 1440 1444 1448 1452 1456 1460 1464 1468 1472 1476 1480 1484 1488 1492
[121] 1496 1504 1508 1512 1516 1520 1524 1528 1532 1536 1540 1544 1548 1552 1556
[136] 1560 1564 1568 1572 1576 1580 1584 1588 1592 1596 1600 1604 1608 1612 1616
[151] 1620 1624 1628 1632 1636 1640 1644 1648 1652 1656 1660 1664 1668 1672 1676
[166] 1680 1684 1688 1692 1696 1704 1708 1712 1716 1720 1724 1728 1732 1736 1740
[181] 1744 1748 1752 1756 1760 1764 1768 1772 1776 1780 1784 1788 1792 1796 1804
[196] 1808 1812 1816 1820 1824 1828 1832 1836 1840 1844 1848 1852 1856 1860 1864
[211] 1868 1872 1876 1880 1884 1888 1892 1896 1904 1908 1912 1916 1920 1924 1928
[226] 1932 1936 1940 1944 1948 1952 1956 1960 1964 1968 1972 1976 1980 1984 1988
[241] 1992 1996 2000
I'm presently working with data which is UTF-8 encoded. I am trying to apply a grepl to see if certain strings are present in a body of text or not. But to no avail I was unable to get my desired result. (Note: I do know that the string is present).
To use an example, I have the following string of integers:
(NOTE: Despite being numbers the structure of the data is a single character string)
>tancd[[1]]
[1] "1512 1463 1489 1460 1468 1497 32 1488 1457 1500 1460 1497 1506 1462 1494 1462 1512"
I want to see if the above is present in the string below (Which it is):
[Note: the desired string is framed with ***- its not in the actual data]
> dat
[1] "1488 32 1502 1461 1488 1461 1497 1502 1464 1514 1463 1497 32 1511 1493 1465 1512 1460 1497 1503 32 1488 1462 1514 32 1513 1473 1456 1502 1463 1506 32 1489 1468 1456 1506 1463 1512 1456 1489 1460 1497 1514 46 32 1502 1460 1513 1468 1473 1464 1506 1464 1492 32 1513 1473 1462 1492 1463 1499 1468 1465 1492 1458 1504 1460 1497 1501 32 1504 1460 1499 1456 1504 1464 1505 1460 1497 1501 32 1500 1462 1488 1457 1499 1465 1500 32 1489 1468 1460 1514 1456 1512 1493 1468 1502 1464 1514 1464 1503 44 32 1506 1463 1491 32 1505 1493 1465 1507 32 1492 1464 1488 1463 1513 1473 1456 1502 1493 1468 1512 1464 1492 32 1492 1464 1512 1460 1488 1513 1473 1493 1465 1504 1464 1492 44 32 1491 1468 1460 1489 1456 1512 1461 1497 32 ***1512 1463 1489 1468 1460 1497 32 1488 1457 1500 1460 1497 1506 1462 1494 1462 1512*** 46 32 1493 1463 1495 1458 1499 1464 1502 1460 1497 1501 32 1488 1493 1465 1502 1456 1512 1460 1497 1501 44 32 1506 1463 1491 32 1495 1458 1510 1493 1465 1514 46 32 1512 1463 1489 1468 1464 1503 32 1490 1468 1463 1502 1456 1500 1460 1497 1488 1461 1500 32 1488 1493 1465 1502 1461 1512 44 32 1506 1463 1491 32 1513 1473 1462 1497 1468 1463 1506 1458 1500 1462 1492 32 1506 1463 1502 1468 1493 1468 1491 32 1492 1463 1513 1468 1473 1464 1495 1463 1512 46 32 1502 1463 1506 1458 1513 1474 1462 1492 32 1513 1473 1462 1489 1468 1464 1488 1493 1468 32 1489 1464 1504 1464 1497 1493 32 1502 1460 1489 1468 1461 1497 1514 32 1492 1463 1502 1468 1460 1513 1473 1456 1514 1468 1462 1492 44 32 1488 1464 1502 1456 1512 1493 1468 32 1500 1493 1465 44 32 1500 1465 1488 32 1511 1464 1512 1460 1497 1504 1493 1468 32 1488 1462 1514 32 1513 1473 1456 1502 1463 1506 46 32 1488 1464 1502 1463 1512 32 1500 1464 1492 1462 1501 44 32 1488 1460 1501 32 1500 1465 1488 32 1506 1464 1500 1464 1492 32 1506 1463 1502 1468 1493 1468 1491 32 1492 1463 1513 1468 1473 1463 1495 1463 1512 44 32 1495 1463 1497 1468 1464 1489 1460 1497 1503 32 1488 1463 1514 1468 1462 1501 32 1500 1460 1511 1456 1512 1493 1465 1514 46 32 1493 1456 1500 1465 1488 32 1494 1493 1465 32 1489 1468 1460 1500 1456 1489 1463 1491 44 32 1488 1462 1500 1468 1464 1488 32 1499 1468 1464 1500 32 1502 1463 1492 32 1513 1468 1473 1462 1488 1464 1502 1456 1512 1493 1468 32 1495 1458 1499 1464 1502 1460 1497 1501 32 1506 1463 1491 32 1495 1458 1510 1493 1465 1514 44 32 1502 1460 1510 1456 1493 1464 1514 1464 1503 32 1506 1463 1491 32 1513 1473 1462 1497 1468 1463 1506 1458 1500 1462 1492 32 1506 1463 1502 1468 1493 1468 1491 32 1492 1463 1513 1468 1473 1464 1495 1463 1512 46 32 1492 1462 1511 1456 1496 1461 1512 32 1495 1458 1500 1464 1489 1460 1497 1501 32 1493 1456 1488 1461 1489 1464 1512 1460 1497 1501 44 32 1502 1460 1510 1456 1493 1464 1514 1464 1503 32 1506 1463 1491 32 1513 1473 1462 1497 1468 1463 1506 1458 1500 1462 1492 32 1506 1463 1502 1468 1493 1468 1491 32 1492 1463 1513 1468 1473 1464 1495 1463 1512 46 32 1493 1456 1499 1464 1500 32 1492 1463 1504 1468 1462 1488 1457 1499 1464 1500 1460 1497 1501 32 1500 1456 1497 1493 1465 1501 32 1488 1462 1495 1464 1491 44 32 1502 1460 1510 1456 1493 1464 1514 1464 1503 32 1506 1463 1491 32 1513 1473 1462 1497 1468 1463 1506 1458 1500 1462 1492 32 1506 1463 1502 1468 1493 1468 1491 32 1492 1463 1513 1468 1473 1464 1495 1463 1512 46 32 1488 1460 1501 32 1499 1468 1461 1503 44 32 1500 1464 1502 1468 1464 1492 32 1488 1464 1502 1456 1512 1493 1468 32 1495 1458 1499 1464 1502 1460 1497 1501 32 1506 1463 1491 32 1495 1458 1510 1493 1465 1514 44 32 1499 1468 1456 1491 1461 1497 32 1500 1456 1492 1463 1512 1456 1495 1460 1497 1511 32 1488 1462 1514 32 1492 1464 1488 1464 1491 1464 1501 32 1502 1460 1503 32 1492 1464 1506 1458 1489 1461 1512 1464 1492 58"
My Problem:
When I use the grepl I get the following result:
> grepl(tancd[[1]],dat)
[1] FALSE
Similarly if I use string_detect() from the stringr package I get the same result:
> str_detect(tancd[[1]],dat)
[1] FALSE
Is there a way to grepl this set and get the correct desired result?
The string you have between the astrisks is different than the string you are looking for.
string in dat : "1512 1463 1489 1468 1460 1497 32 1488 1457 1500 1460 1497 1506 1462 1494 1462 1512"
string in tancd : "1512 1463 1489 1460 1468 1497 32 1488 1457 1500 1460 1497 1506 1462 1494 1462 1512"
You'll notice that 1468 and 1460 are inverted in tancd. If you fix tancd it should work.
tancd[[1]] <- "1512 1463 1489 1468 1460 1497 32 1488 1457 1500 1460 1497 1506 1462 1494 1462 1512"
grepl(dat, pattern=tancd[[1]])
There is a machine in the office with 2 NICS installed, a web server is running on it.
1st NIC) hardwired connection :
Connection specific DNS Suffix : nl.xxx.com
IP: 10.0.232.62
Subnet: 255.255.255.0
Default Gateway : 10.0.232.1
2nd NIC) Wireless network connecton
Connection specific DNS Suffix : nl.xxx.com
IP: 10.0.238.122
Subnet: 255.255.255.0
Default Gateway: 10.0.238.1
There is another machine with only one NIC which is connected to the same wireless network with the first machine.
Connection specific DNS Suffix : nl.xxx.com
IP: 10.0.238.92
Subnet: 255.255.255.0
Default Gateway: 10.0.238.1
I can not ping the first machine(web server) nor can I access the web server on port 80. The connection can not be established. This might be a routing problem because the first server has 2 NICs installed. When I disconnect the first server from hardwired connection, there is no problem. But the first machine needs to be connected to both 2 NICs.
Can you please help me how to solve this connectivity problem.
Both machines are Windows 7 machines.
ROUTE PRINT OUTPUT WHEN 2NICS CONNECTED
C:\Users\ozgen.gunay>route PRINT
===========================================================================
Interface List
18...e8 94 f6 10 c5 87 ......TP-LINK N600 Wireless Dual Band USB Adapter
11...bc 30 5b eb 3d 35 ......Broadcom NetXtreme 57xx Gigabit Controller
20...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
22...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
1...........................Software Loopback Interface 1
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.232.1 10.0.232.62 10
0.0.0.0 0.0.0.0 10.0.238.1 10.0.238.122 25
10.0.232.0 255.255.255.0 On-link 10.0.232.62 266
10.0.232.62 255.255.255.255 On-link 10.0.232.62 266
10.0.232.255 255.255.255.255 On-link 10.0.232.62 266
10.0.238.0 255.255.255.0 On-link 10.0.238.122 281
10.0.238.122 255.255.255.255 On-link 10.0.238.122 281
10.0.238.255 255.255.255.255 On-link 10.0.238.122 281
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.17.0 255.255.255.0 On-link 192.168.17.1 276
192.168.17.1 255.255.255.255 On-link 192.168.17.1 276
192.168.17.255 255.255.255.255 On-link 192.168.17.1 276
192.168.248.0 255.255.255.0 On-link 192.168.248.1 276
192.168.248.1 255.255.255.255 On-link 192.168.248.1 276
192.168.248.255 255.255.255.255 On-link 192.168.248.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.0.232.62 266
224.0.0.0 240.0.0.0 On-link 192.168.17.1 276
224.0.0.0 240.0.0.0 On-link 192.168.248.1 276
224.0.0.0 240.0.0.0 On-link 10.0.238.122 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.0.232.62 266
255.255.255.255 255.255.255.255 On-link 192.168.17.1 276
255.255.255.255 255.255.255.255 On-link 192.168.248.1 276
255.255.255.255 255.255.255.255 On-link 10.0.238.122 281
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 306 ::1/128 On-link
11 266 fe80::/64 On-link
20 276 fe80::/64 On-link
22 276 fe80::/64 On-link
18 281 fe80::/64 On-link
11 266 fe80::81b9:bd46:d647:e4d1/128
On-link
20 276 fe80::8cd1:1226:41e0:2004/128
On-link
18 281 fe80::b887:5d9e:22a4:18be/128
On-link
22 276 fe80::fc51:3127:e185:92a7/128
On-link
1 306 ff00::/8 On-link
11 266 ff00::/8 On-link
20 276 ff00::/8 On-link
22 276 ff00::/8 On-link
18 281 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
ROUTE PRINT OUTPUT WHEN 1NIC CONNECTED
C:\Users\ozgen.gunay>route PRINT
===========================================================================
Interface List
18...e8 94 f6 10 c5 87 ......TP-LINK N600 Wireless Dual Band USB Adapter
20...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
22...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
1...........................Software Loopback Interface 1
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.238.1 10.0.238.122 25
10.0.238.0 255.255.255.0 On-link 10.0.238.122 281
10.0.238.122 255.255.255.255 On-link 10.0.238.122 281
10.0.238.255 255.255.255.255 On-link 10.0.238.122 281
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.17.0 255.255.255.0 On-link 192.168.17.1 276
192.168.17.1 255.255.255.255 On-link 192.168.17.1 276
192.168.17.255 255.255.255.255 On-link 192.168.17.1 276
192.168.248.0 255.255.255.0 On-link 192.168.248.1 276
192.168.248.1 255.255.255.255 On-link 192.168.248.1 276
192.168.248.255 255.255.255.255 On-link 192.168.248.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.17.1 276
224.0.0.0 240.0.0.0 On-link 192.168.248.1 276
224.0.0.0 240.0.0.0 On-link 10.0.238.122 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.17.1 276
255.255.255.255 255.255.255.255 On-link 192.168.248.1 276
255.255.255.255 255.255.255.255 On-link 10.0.238.122 281
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 306 ::1/128 On-link
20 276 fe80::/64 On-link
22 276 fe80::/64 On-link
18 281 fe80::/64 On-link
20 276 fe80::8cd1:1226:41e0:2004/128
On-link
18 281 fe80::b887:5d9e:22a4:18be/128
On-link
22 276 fe80::fc51:3127:e185:92a7/128
On-link
1 306 ff00::/8 On-link
20 276 ff00::/8 On-link
22 276 ff00::/8 On-link
18 281 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
I am working with a trade tick database, investigating market micro structure. the example code below is for a specific trading day.
What approach would be advised to determine the day of the xts object's index and then use it to loop through the code below, per day?
my.xts <- xts(my.frame1[,-1], order.by=my.frame1[,1])
my.val <- my.xts[,1]*my.xts[,2]
my.cumvol <- cumsum(my.xts[,2])
my.cumval <- cumsum(my.val[,1])
my.vwap <- my.cumval/my.cumvol
my.ratio <- (my.xts[,1]/my.vwap - 1)*10000
op <- par(mfrow=c(1,2))
plot(my.ratio)
plot(my.xts[,1])
lines(my.vwap)
par(op)
Example of my.xts:
PRICE QUANTITY
2013-06-05 10:00:08 2772 1250
2013-06-05 10:00:08 2772 1204
2013-06-05 10:00:11 2772 1773
2013-06-05 10:00:11 2772 62
2013-06-05 10:00:11 2773 1250
2013-06-05 10:00:11 2773 1250
2013-06-05 10:00:14 2773 1250
2013-06-05 10:00:14 2773 1250
2013-06-05 10:00:14 2772 1217
2013-06-05 10:00:33 2773 1811
2013-06-05 10:00:33 2773 1250
2013-06-05 10:00:42 2773 1610
2013-06-05 10:00:42 2773 1420
2013-06-05 10:00:42 2773 190
2013-06-05 10:01:17 2773 1357
2013-06-05 10:01:17 2773 1800
2013-06-05 10:01:17 2773 1495
2013-06-05 10:01:17 2773 283
2013-06-05 10:02:07 2775 246
2013-06-05 10:02:07 2775 171
2013-06-05 10:02:07 2775 1233
2013-06-05 10:02:14 2775 1500
2013-06-05 10:02:33 2773 700
2013-06-05 10:02:40 2773 3034
2013-06-05 10:02:40 2773 750
2013-06-05 10:02:40 2773 1498
2013-06-05 10:02:58 2773 515
2013-06-05 10:02:58 2773 11985
2013-06-05 10:03:02 2773 1665
2013-06-05 10:03:03 2772 1360
2013-06-05 10:03:03 2771 1140
2013-06-05 10:03:08 2775 3325
2013-06-05 10:03:34 2772 1500
2013-06-05 10:03:34 2772 1360
2013-06-05 10:03:34 2772 1220
2013-06-05 10:03:34 2772 3323
2013-06-05 10:03:42 2772 327
2013-06-05 10:04:13 2775 3339
2013-06-05 10:04:39 2773 7730
2013-06-05 10:04:48 2775 1554
2013-06-05 10:05:15 2774 3561
2013-06-05 10:05:15 2774 1439
2013-06-05 10:05:16 2773 577
2013-06-05 10:05:16 2773 2225
2013-06-05 10:05:16 2773 1083
2013-06-05 10:05:16 2773 1900
2013-06-05 10:05:16 2774 1502
2013-06-05 10:05:16 2773 102
2013-06-05 10:05:16 2773 1338
2013-06-05 10:05:16 2773 1228
2013-06-05 10:05:16 2773 2270
2013-06-05 10:05:26 2773 2775
2013-06-05 10:05:36 2772 9000
2013-06-05 10:05:36 2772 1000
2013-06-05 10:05:42 2773 2409
2013-06-05 10:05:44 2773 464
2013-06-05 10:05:44 2773 1743
2013-06-05 10:05:44 2773 1477
2013-06-05 10:05:44 2773 1925
2013-06-05 10:05:44 2773 2438
2013-06-05 10:05:44 2773 309
2013-06-05 10:05:44 2773 1932
2013-06-05 10:05:44 2773 1447
2013-06-05 10:05:44 2773 446
2013-06-05 10:05:44 2773 1410
2013-06-05 10:05:44 2773 372
2013-06-05 10:05:44 2773 715
2013-06-05 10:05:44 2773 847
2013-06-05 10:05:44 2773 1628
2013-06-05 10:05:44 2773 1574
2013-06-05 10:05:44 2773 1504
2013-06-05 10:05:44 2773 963
2013-06-05 10:05:44 2773 1531
2013-06-05 10:05:44 2773 1628
2013-06-05 10:05:44 2773 2185
2013-06-05 10:05:44 2773 1639
2013-06-05 10:05:44 2773 2330
2013-06-05 10:05:44 2773 2113
2013-06-05 10:05:44 2773 841
2013-06-05 10:05:45 2773 2226
2013-06-05 10:05:45 2773 1332
2013-06-05 10:05:45 2773 2320
2013-06-05 10:05:45 2773 845
2013-06-05 10:05:45 2773 1665
2013-06-05 10:05:45 2773 609
2013-06-05 10:05:45 2773 2226
2013-06-05 10:05:45 2773 1497
2013-06-05 10:05:45 2773 405
2013-06-05 10:05:45 2773 1022
2013-06-05 10:05:45 2773 174
2013-06-05 10:05:45 2773 1608
2013-06-05 10:05:45 2773 228
2013-06-05 10:05:45 2773 2020
2013-06-05 10:05:45 2773 1885
2013-06-05 10:05:45 2773 1524
2013-06-05 10:05:45 2773 2262
2013-06-05 10:05:45 2773 1618
2013-06-05 10:05:45 2773 2060
2013-06-05 10:05:45 2773 1843
2013-06-05 10:05:45 2773 2036
2013-06-05 10:05:45 2773 293
2013-06-05 10:05:45 2773 2034
2013-06-05 10:05:45 2773 1039
2013-06-05 10:05:45 2773 704
2013-06-05 10:05:46 2773 91
2013-06-05 10:05:46 2773 1135
2013-06-05 10:05:46 2773 1583
2013-06-05 10:05:46 2773 972
2013-06-05 10:05:46 2773 1309
2013-06-05 10:05:46 2773 2429
2013-06-05 10:05:46 2773 2164
2013-06-05 10:05:46 2773 1708
2013-06-05 10:05:46 2773 1527
2013-06-05 10:05:46 2773 2174
2013-06-05 10:05:46 2773 434
2013-06-05 10:05:46 2773 892
2013-06-05 10:05:46 2773 1554
2013-06-05 10:05:46 2773 2091
2013-06-05 10:05:46 2773 2107
2013-06-05 10:05:46 2773 1933
2013-06-05 10:05:46 2773 2341
2013-06-05 10:05:46 2773 619
2013-06-05 10:05:46 2773 623
2013-06-05 10:05:46 2773 2393
2013-06-05 10:05:46 2773 1977
2013-06-05 10:05:46 2773 1897
2013-06-05 10:05:46 2773 204
2013-06-05 10:05:46 2773 890
2013-06-05 10:05:46 2773 1738
2013-06-05 10:05:46 2773 1998
2013-06-05 10:05:46 2773 1684
2013-06-05 10:05:46 2773 1069
2013-06-05 10:05:46 2773 1578
2013-06-05 10:05:46 2773 1769
2013-06-05 10:05:47 2773 1535
2013-06-05 10:05:47 2773 1159
2013-06-05 10:05:47 2773 1354
2013-06-05 10:05:47 2773 1300
2013-06-05 10:05:47 2773 1300
2013-06-05 10:05:47 2773 1605
2013-06-05 10:05:47 2773 937
2013-06-05 10:05:47 2775 2802
2013-06-05 10:05:47 2773 2063
2013-06-05 10:05:47 2773 2095
2013-06-05 10:05:47 2773 283
2013-06-05 10:05:47 2773 366
2013-06-05 10:05:47 2773 1940
2013-06-05 10:05:52 2775 2011
2013-06-05 10:05:52 2775 1135
2013-06-05 10:06:01 2775 3184
2013-06-05 10:06:02 2775 3184
2013-06-05 10:06:02 2775 1911
2013-06-05 10:06:02 2775 3184
2013-06-05 10:06:02 2775 3184
2013-06-05 10:06:05 2779 703
2013-06-05 10:06:05 2779 1109
2013-06-05 10:06:05 2779 2802
2013-06-05 10:06:05 2779 1212
2013-06-05 10:06:05 2778 740
2013-06-05 10:06:05 2777 1346
2013-06-05 10:06:05 2778 260
2013-06-05 10:06:06 2779 1591
2013-06-05 10:06:06 2780 51
2013-06-05 10:06:07 2779 3006
2013-06-05 10:06:18 2779 3188
2013-06-05 10:06:18 2779 3188
2013-06-05 10:06:18 2779 564
2013-06-05 10:06:18 2779 2624
2013-06-05 10:06:19 2779 2207
2013-06-05 10:06:21 2776 1136
2013-06-05 10:06:21 2776 1300
2013-06-05 10:06:21 2776 1300
2013-06-05 10:06:21 2776 1800
2013-06-05 10:06:21 2776 16
2013-06-05 10:06:30 2780 3051
2013-06-05 10:06:30 2780 3179
2013-06-05 10:06:30 2779 229
2013-06-05 10:06:30 2780 2950
2013-06-05 10:06:41 2780 3171
2013-06-05 10:06:41 2780 2598
2013-06-05 10:06:41 2780 573
2013-06-05 10:06:41 2780 859
2013-06-05 10:06:49 2780 4768
2013-06-05 10:06:49 2780 2338
2013-06-05 10:06:49 2780 2856
2013-06-05 10:06:49 2780 38
2013-06-05 10:06:52 2782 292
2013-06-05 10:06:52 2781 2932
2013-06-05 10:07:34 2782 209
2013-06-05 10:07:34 2782 3255
2013-06-05 10:07:42 2780 1435
2013-06-05 10:07:42 2780 1285
2013-06-05 10:07:42 2780 400
2013-06-05 10:07:42 2780 637
2013-06-05 10:07:42 2780 1547
2013-06-05 10:07:42 2780 263
2013-06-05 10:07:42 2780 5200
2013-06-05 10:07:42 2780 5200
2013-06-05 10:07:42 2782 4475
2013-06-05 10:07:42 2780 2663
2013-06-05 10:07:42 2780 438
2013-06-05 10:07:42 2780 5200
2013-06-05 10:07:42 2781 1900
2013-06-05 10:07:42 2780 510
2013-06-05 10:07:42 2780 910
2013-06-05 10:07:42 2782 2646
2013-06-05 10:07:42 2780 1445
2013-06-05 10:07:42 2780 4290
2013-06-05 10:07:42 2780 3477
2013-06-05 10:07:42 2780 4800
2013-06-05 10:07:43 2780 3200
2013-06-05 10:07:43 2780 3877
2013-06-05 10:07:43 2780 1323
2013-06-05 10:07:54 2782 2373
2013-06-05 10:07:59 2782 3249
2013-06-05 10:08:03 2780 2077
2013-06-05 10:08:03 2780 10000
2013-06-05 10:08:03 2780 1903
2013-06-05 10:08:03 2780 1226
2013-06-05 10:08:03 2780 670
2013-06-05 10:08:03 2780 7359
2013-06-05 10:08:03 2780 2923
2013-06-05 10:08:03 2780 10000
2013-06-05 10:08:03 2780 564
2013-06-05 10:08:04 2780 1488
2013-06-05 10:08:11 2780 200
2013-06-05 10:08:11 2780 223
2013-06-05 10:08:11 2780 4713
2013-06-05 10:08:13 2778 1453
2013-06-05 10:08:13 2780 1500
2013-06-05 10:08:13 2780 1594
2013-06-05 10:08:13 2780 8837
2013-06-05 10:08:13 2780 1599
2013-06-05 10:08:13 2780 3186
2013-06-05 10:08:13 2780 10000
2013-06-05 10:08:13 2780 10000
2013-06-05 10:08:13 2780 2763
2013-06-05 10:08:13 2780 1163
2013-06-05 10:08:13 2780 1900
2013-06-05 10:08:14 2782 2924
2013-06-05 10:08:23 2782 3183
2013-06-05 10:08:24 2782 1572
2013-06-05 10:08:24 2780 1211
2013-06-05 10:08:24 2782 1372
2013-06-05 10:08:24 2782 239
2013-06-05 10:08:24 2782 2581
2013-06-05 10:08:24 2782 3183
2013-06-05 10:08:25 2780 5596
2013-06-05 10:08:25 2780 1845
2013-06-05 10:08:25 2780 1307
2013-06-05 10:08:25 2780 1500
2013-06-05 10:08:25 2780 6604
2013-06-05 10:08:25 2780 10000
2013-06-05 10:08:25 2780 1300
2013-06-05 10:08:37 2782 597
2013-06-05 10:08:37 2782 3180
2013-06-05 10:08:39 2780 2028
2013-06-05 10:08:39 2780 3005
2013-06-05 10:08:39 2780 251
2013-06-05 10:08:39 2780 1430
2013-06-05 10:08:39 2780 244
2013-06-05 10:08:39 2780 673
2013-06-05 10:08:39 2781 1300
2013-06-05 10:08:39 2780 1500
2013-06-05 10:08:39 2780 10000
2013-06-05 10:08:39 2780 947
2013-06-05 10:08:39 2781 1500
2013-06-05 10:08:39 2780 10000
2013-06-05 10:08:42 2782 886
2013-06-05 10:08:46 2782 717
2013-06-05 10:08:46 2784 283
2013-06-05 10:08:50 2780 1889
2013-06-05 10:08:50 2780 2254
2013-06-05 10:08:50 2780 1650
2013-06-05 10:08:50 2780 1300
2013-06-05 10:08:50 2780 1549
2013-06-05 10:08:50 2780 1758
2013-06-05 10:08:50 2780 2274
2013-06-05 10:08:50 2780 1097
2013-06-05 10:08:50 2780 1500
2013-06-05 10:08:51 2780 1804
2013-06-05 10:08:51 2780 2386
2013-06-05 10:08:51 2780 2337
2013-06-05 10:08:51 2780 2042
2013-06-05 10:08:51 2780 2377
2013-06-05 10:08:51 2780 2066
2013-06-05 10:08:51 2780 182
2013-06-05 10:08:51 2780 1784
2013-06-05 10:08:51 2780 1913
2013-06-05 10:08:51 2780 457
2013-06-05 10:08:51 2780 2429
2013-06-05 10:08:51 2780 1511
2013-06-05 10:08:51 2780 2316
2013-06-05 10:08:51 2780 1569
2013-06-05 10:08:51 2780 2008
2013-06-05 10:08:51 2780 777
2013-06-05 10:08:51 2780 1792
2013-06-05 10:08:51 2780 1815
2013-06-05 10:08:51 2780 933
2013-06-05 10:08:51 2780 1684
2013-06-05 10:08:51 2780 2255
2013-06-05 10:08:51 2780 2049
2013-06-05 10:08:51 2780 1858
2013-06-05 10:08:51 2780 1659
2013-06-05 10:08:56 2784 1000
2013-06-05 10:08:56 2784 3717
2013-06-05 10:08:57 2783 3173
2013-06-05 10:08:57 2783 3173
2013-06-05 10:08:57 2783 3173
2013-06-05 10:08:58 2783 1215
2013-06-05 10:08:58 2783 3173
2013-06-05 10:09:09 2780 2469
2013-06-05 10:09:09 2780 2412
2013-06-05 10:09:09 2780 1859
2013-06-05 10:09:09 2780 3186
2013-06-05 10:09:09 2780 1732
2013-06-05 10:09:09 2780 1787
2013-06-05 10:09:09 2780 1827
2013-06-05 10:09:09 2780 2419
2013-06-05 10:09:09 2780 2238
2013-06-05 10:09:09 2780 2120
2013-06-05 10:09:09 2780 1300
2013-06-05 10:09:09 2780 3186
2013-06-05 10:09:10 2780 1846
2013-06-05 10:09:10 2780 1023
2013-06-05 10:09:10 2780 2213
2013-06-05 10:09:10 2780 1514
2013-06-05 10:09:10 2780 2172
2013-06-05 10:09:10 2780 1741
2013-06-05 10:09:10 2780 2267
2013-06-05 10:09:10 2780 1523
2013-06-05 10:09:10 2780 1510
2013-06-05 10:09:10 2780 2056
2013-06-05 10:09:10 2780 1593
2013-06-05 10:09:10 2780 3186
2013-06-05 10:09:10 2780 1727
2013-06-05 10:09:10 2780 276
2013-06-05 10:09:10 2780 771
2013-06-05 10:09:10 2780 2240
2013-06-05 10:09:10 2780 2134
2013-06-05 10:09:19 2783 3174
2013-06-05 10:09:20 2783 3174
2013-06-05 10:09:20 2783 1207
2013-06-05 10:09:20 2783 3174
2013-06-05 10:09:20 2783 3174
2013-06-05 10:09:21 2780 2238
2013-06-05 10:09:21 2780 1619
2013-06-05 10:09:21 2780 938
2013-06-05 10:09:21 2780 1572
2013-06-05 10:09:21 2780 2496
2013-06-05 10:09:21 2780 2339
2013-06-05 10:09:21 2780 2457
2013-06-05 10:09:21 2780 2398
2013-06-05 10:09:21 2780 1806
2013-06-05 10:09:21 2780 1811
2013-06-05 10:09:21 2780 1300
2013-06-05 10:09:21 2780 1907
2013-06-05 10:09:21 2780 1804
2013-06-05 10:09:21 2780 1919
2013-06-05 10:09:21 2780 2098
2013-06-05 10:09:22 2780 808
2013-06-05 10:09:22 2780 2128
2013-06-05 10:09:22 2780 1604
2013-06-05 10:09:22 2780 1620
2013-06-05 10:09:22 2778 303
2013-06-05 10:09:22 2778 1362
2013-06-05 10:09:22 2780 1910
2013-06-05 10:09:22 2780 2277
2013-06-05 10:09:22 2778 1331
2013-06-05 10:09:22 2780 2018
2013-06-05 10:09:22 2780 2422
2013-06-05 10:09:22 2780 2142
2013-06-05 10:09:22 2778 341
2013-06-05 10:09:22 2780 142
2013-06-05 10:09:22 2780 2222
2013-06-05 10:09:22 2780 1502
2013-06-05 10:09:22 2780 2271
2013-06-05 10:09:22 2780 1574
2013-06-05 10:09:22 2780 2187
2013-06-05 10:09:22 2780 1515
2013-06-05 10:09:22 2780 2079
2013-06-05 10:09:22 2780 1669
2013-06-05 10:09:23 2778 1115
2013-06-05 10:09:23 2780 1857
2013-06-05 10:09:23 2777 1750
2013-06-05 10:09:23 2777 1650
2013-06-05 10:09:35 2783 1010
2013-06-05 10:09:35 2783 2190
2013-06-05 10:09:35 2783 3200
2013-06-05 10:09:35 2783 3200
2013-06-05 10:09:35 2783 3200
2013-06-05 10:09:36 2783 796
2013-06-05 10:09:49 2783 3191
2013-06-05 10:09:49 2783 3117
2013-06-05 10:09:49 2783 1926
2013-06-05 10:09:49 2783 74
2013-06-05 10:10:01 2783 1512
2013-06-05 10:10:01 2783 2687
2013-06-05 10:10:16 2783 3145
2013-06-05 10:10:16 2783 966
2013-06-05 10:10:27 2783 662
2013-06-06 10:00:40 2733 353
2013-06-06 10:00:40 2733 2145
2013-06-06 10:00:40 2733 1569
2013-06-06 10:00:58 2732 9000
2013-06-06 10:00:58 2732 1500
2013-06-06 10:00:58 2732 1884
2013-06-06 10:00:58 2732 2508
2013-06-06 10:01:00 2732 5942
2013-06-06 10:01:03 2732 650
2013-06-06 10:01:03 2732 250
2013-06-06 10:01:03 2732 1458
2013-06-06 10:01:04 2732 712
2013-06-06 10:01:04 2732 1674
2013-06-06 10:01:04 2732 26
2013-06-06 10:01:08 2732 901
2013-06-06 10:01:21 2732 1386
2013-06-06 10:01:21 2732 422
2013-06-06 10:01:22 2732 1600
2013-06-06 10:01:34 2731 3003
2013-06-06 10:01:34 2731 1361
2013-06-06 10:01:34 2731 3000
2013-06-06 10:01:34 2731 1541
2013-06-06 10:01:34 2731 4000
2013-06-06 10:01:35 2730 4723
2013-06-06 10:01:38 2732 1000
2013-06-06 10:01:41 2732 5758
2013-06-06 10:01:41 2732 1932
2013-06-06 10:01:41 2732 8092
2013-06-06 10:01:41 2732 9253
2013-06-06 10:01:41 2732 2549
2013-06-06 10:01:41 2732 704
2013-06-06 10:01:41 2732 6654
2013-06-06 10:01:55 2735 500
2013-06-06 10:02:01 2733 1260
2013-06-06 10:02:01 2733 1260
2013-06-06 10:02:01 2733 1997
2013-06-06 10:02:01 2733 419
2013-06-06 10:03:13 2735 1813
2013-06-06 10:03:16 2735 1832
2013-06-06 10:03:16 2735 374
2013-06-06 10:03:16 2735 2864
2013-06-06 10:03:16 2735 4324
2013-06-06 10:03:17 2735 2245
2013-06-06 10:03:18 2735 5645
2013-06-06 10:03:18 2735 2518
2013-06-06 10:03:19 2735 1305
2013-06-06 10:03:19 2735 1354
2013-06-06 10:03:21 2735 597
2013-06-06 10:03:21 2735 1712
2013-06-06 10:03:22 2735 200
2013-06-06 10:03:22 2735 197
2013-06-06 10:03:22 2735 2045
2013-06-06 10:03:22 2735 45
2013-06-06 10:03:25 2737 200
2013-06-06 10:03:29 2735 2234
2013-06-06 10:03:34 2739 1500
2013-06-06 10:03:41 2739 4458
2013-06-06 10:03:41 2739 2500
2013-06-06 10:03:46 2739 14603
2013-06-06 10:03:50 2736 359
2013-06-06 10:04:06 2739 1088
2013-06-06 10:04:10 2739 1499
2013-06-06 10:04:10 2739 1
2013-06-06 10:04:11 2739 1
2013-06-06 10:04:11 2739 1495
2013-06-06 10:04:16 2739 3505
2013-06-06 10:04:19 2740 172
2013-06-06 10:04:19 2738 9910
2013-06-06 10:04:19 2738 1300
2013-06-06 10:04:24 2738 1468
2013-06-06 10:04:24 2738 1824
2013-06-06 10:04:41 2739 1601
2013-06-06 10:04:47 2738 4595
2013-06-06 10:04:53 2738 394
2013-06-06 10:04:53 2738 6165
2013-06-06 10:04:53 2738 6162
2013-06-06 10:04:53 2738 1800
2013-06-06 10:04:53 2738 5479
2013-06-06 10:05:01 2739 7985
2013-06-06 10:05:05 2739 1947
2013-06-06 10:05:08 2740 5000
2013-06-06 10:05:08 2739 3664
2013-06-06 10:05:08 2739 5527
2013-06-06 10:05:08 2740 3056
2013-06-06 10:05:08 2740 5000
2013-06-06 10:05:53 2740 516
2013-06-06 10:06:07 2740 1000
2013-06-06 10:06:44 2740 3347
2013-06-06 10:06:44 2740 3653
2013-06-06 10:06:58 2740 730
2013-06-06 10:07:27 2738 4613
2013-06-06 10:07:27 2738 1532
2013-06-06 10:07:27 2738 1505
2013-06-06 10:07:38 2738 100
2013-06-06 10:07:47 2738 6052
2013-06-06 10:07:47 2738 5287
2013-06-06 10:07:47 2738 1542
2013-06-06 10:07:47 2738 1443
2013-06-06 10:08:17 2739 5419
2013-06-06 10:08:17 2739 3650
2013-06-06 10:08:17 2739 3385
2013-06-06 10:08:17 2739 2149
2013-06-06 10:08:19 2738 1936
2013-06-06 10:08:22 2738 3971
2013-06-06 10:08:29 2739 1961
2013-06-06 10:08:29 2739 4278
2013-06-06 10:08:29 2739 1426
2013-06-06 10:08:32 2739 1847
2013-06-06 10:08:38 2739 3838
2013-06-06 10:08:38 2740 2662
2013-06-06 10:08:44 2740 1963
2013-06-06 10:08:45 2740 300
2013-06-06 10:08:52 2740 75
2013-06-06 10:08:52 2740 75
2013-06-06 10:08:52 2740 75
2013-06-06 10:08:52 2740 75
2013-06-06 10:08:52 2740 31
2013-06-06 10:09:12 2745 3210
2013-06-06 10:09:12 2745 3381
2013-06-06 10:09:12 2745 1331
2013-06-06 10:09:12 2745 69
2013-06-06 10:09:12 2745 3649
2013-06-06 10:09:12 2745 3000
2013-06-06 10:09:12 2745 5912
2013-06-06 10:09:12 2745 1487
2013-06-06 10:09:28 2745 5000
2013-06-06 10:09:28 2745 5000
2013-06-06 10:09:56 2745 1829
2013-06-06 10:09:57 2745 1918
2013-06-06 10:09:57 2745 1082
2013-06-06 10:10:05 2745 3000
2013-06-06 10:10:05 2745 1724
2013-06-06 10:10:05 2746 2467
2013-06-06 10:10:05 2745 3000
2013-06-06 10:10:05 2745 2911
2013-06-06 10:10:06 2745 1000
2013-06-06 10:10:06 2745 3000
2013-06-06 10:10:06 2745 2911
2013-06-06 10:10:07 2745 2911
2013-06-06 10:10:07 2745 2911
2013-06-06 10:10:08 2745 2911
2013-06-06 10:10:08 2745 2911
2013-06-06 10:10:09 2745 2911
2013-06-06 10:10:10 2745 2911
2013-06-06 10:10:10 2745 2911
2013-06-06 10:10:11 2745 2911
2013-06-06 10:10:12 2745 2911
2013-06-06 10:10:13 2745 2911
2013-06-06 10:10:13 2748 1877
2013-06-06 10:10:14 2745 2911
2013-06-06 10:10:17 2745 1777
2013-06-06 10:10:42 2746 1430
2013-06-06 10:10:42 2745 1134
2013-06-06 10:10:43 2746 1430
2013-06-06 10:10:44 2745 1553
2013-06-06 10:10:44 2745 1430
2013-06-06 10:10:44 2745 1282
2013-06-06 10:10:44 2745 8866
2013-06-06 10:10:45 2745 1926
Hopefully this works....
full.xts.obj is the xts object you create using all the data you have for my.frame1 converted into an xts object
your.code.func <- function(my.xts){
my.val <- my.xts[,1]*my.xts[,2]
my.cumvol <- cumsum(my.xts[,2])
my.cumval <- cumsum(my.val[,1])
my.vwap <- my.cumval/my.cumvol
my.ratio <- (my.xts[,1]/my.vwap - 1)*10000
op <- par(mfrow=c(1,2))
plot(my.ratio)
plot(my.xts[,1])
lines(my.vwap)
par(op)
}
data.list <- split(full.xts.obj,'days')
for(i in c(1:(length(data.list))){
tmp <- data.list[[i]]
your.code.func(tmp)
}