how to store the ping statistics after giving ctrl+c in a text file - ping

mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=15.2 ms
64 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=5.43 ms
64 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0.243 ms
^C64 bytes from 10.0.0.2: icmp_req=13 ttl=64 time=0.216 ms
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 12016ms
rtt min/avg/max/mdev = 0.136/1.809/15.257/4.119 ms
mininet>
I want to capture number of packets transmitted,packets received,packet loss percentage into a text file.
how to do this?
please help me.

just you have to type : ping ip >>out.txt
This will help you.

Related

Unable to establish SSL connection upon wget on Ubuntu 20.04 LTS

I use browserSetup.sh to install ucsc Genome Browser in the Cloud (GBiC) program, and getting the error
--2021-08-26 13:43:10-- https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
Unable to establish SSL connection.
I checked this script, there may be an error in this line
wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -P /usr/include/mysql/
I ran this line of code and got the same error,So i want to understand why Unable to establish SSL connection when I use wget.
I ping raw.githubusercontent.com and return
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=1 ttl=45 time=87.8 ms
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=2 ttl=45 time=57.9 ms
64 bytes from cdn-185-199-109-133.github.com (185.199.109.133): icmp_seq=3 ttl=45 time=57.9 ms
And I tried to use the --no-check-certificate parameter but still can't solve the error,How do i need to solve this problem?

Is tcpdump reliable? Why there are so many packets with length 0?

I am using tcpdump to collect packet data through wlan0. But I find many packets with length of 0 like following picture shows. Well, length 0 packets... Is tcpdump reliable or I have missed something?
OK, those are TCP packets, and that's the TCP payload length. That can be zero, if a TCP packet is just acknowledging data sent by the other side of the connection, and not sending any data.
For example, the next to the last packet is from 121.186.151.61.dial.xw.sh.dynamic.163data.com.cn, port 80 (that's the ".http" at the end - it's not part of the domain name, it's an indication that it's from port 80) to android-1b46862a4910306b, port 53876, with 16 bytes of data. The last packet is android-1b46862a4910306b sending an ACK to 121.186.151.61.dial.xw.sh.dynamic.163data.com, probably acknowledging the previous 16 bytes.
The other zero-length packets in your sample output are TCP FIN packets, which don't have to have data in them (the host sending it is just saying "I don't have any more data to send you, and never will have any more data to send you on this connection - I'm done"), and TCP RST packets, which are just forcibly shutting down the connection and also don't have to have data in them.

Intermittent ping timeouts on GCE instances

These past 3 days, it seems I have network issues on my Google cloud engine instances. I investigate every single part of my architecture, and once it reaches my instances, everything responds lightning fast.
But still, from time to time, requests are stuck for 2 minutes.
I tried executing a long-running 'ping' to one of my instance. Here is the result:
64 bytes from 107.178.xxx.xxx: icmp_seq=252 ttl=45 time=65.890 ms
64 bytes from 107.178.xxx.xxx: icmp_seq=253 ttl=45 time=83.041 ms
Request timeout for icmp_seq 254
Request timeout for icmp_seq 255
Request timeout for icmp_seq 256
64 bytes from 107.178.xxx.xxx: icmp_seq=257 ttl=45 time=65.925 ms
Request timeout for icmp_seq 258
64 bytes from 107.178.xxx.xxx: icmp_seq=259 ttl=45 time=63.801 ms
64 bytes from 107.178.xxx.xxx: icmp_seq=260 ttl=45 time=65.046 ms
Request timeout for icmp_seq 261
Request timeout for icmp_seq 262
Request timeout for icmp_seq 263
Request timeout for icmp_seq 264
Request timeout for icmp_seq 265
64 bytes from 107.178.xxx.xxx: icmp_seq=266 ttl=45 time=75.441 ms
Request timeout for icmp_seq 267
64 bytes from 107.178.xxx.xxx: icmp_seq=268 ttl=45 time=67.201 ms
Request timeout for icmp_seq 269
Request timeout for icmp_seq 270
Request timeout for icmp_seq 271
Request timeout for icmp_seq 272
Request timeout for icmp_seq 273
Request timeout for icmp_seq 274
64 bytes from 107.178.xxx.xxx: icmp_seq=275 ttl=45 time=70.824 ms
Request timeout for icmp_seq 276
64 bytes from 107.178.xxx.xxx: icmp_seq=277 ttl=45 time=81.096 ms
Request timeout for icmp_seq 278
Request timeout for icmp_seq 279
Request timeout for icmp_seq 280
Request timeout for icmp_seq 281
64 bytes from 107.178.xxx.xxx: icmp_seq=282 ttl=45 time=61.271 ms
That does not look good to me.
Is there any way to contact Google when you have a problem with your instances? I just learned that by default I have a "bronze" support which actually means 0 support as I cannot contact anybody. I apparently need to pay $150/month to get someone answering my questions!!
I am quite surprise to pay for something and not having anybody on the other side if the service is not working properly. Am I missing something? Or should I just wait and pray?

ping with packet size larger than 25152 failing?

When I am trying to ping with packet size > 25152 I am getting 100% packet loss. can anyone please help me out on why is it happening ???
ping -c 1 -s 25153 time.nist.gov
--- ntp.glb.nist.gov ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
ping -c 1 -s 25152 time.nist.gov
PING ntp.glb.nist.gov (64.236.96.53) 25152(25180) bytes of data.
25160 bytes from dtc-nist01.ntp.aol.com (64.236.96.53): icmp_req=1 ttl=45 time=76.8 ms
--- ntp.glb.nist.gov ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 76.887/76.887/76.887/0.000 ms
As very quick google shows you are exceeding amount of fragments (data) that fits into one packet. In order to support that you would have to change configuration on your machine (and possibly the remote) to utilize it.
No, it’s not because of hardware, it’s because of IP restriction or it could be because the data choking happening in the router that you were pinging. It will consider large packets as data packets and drops it. If you try small packets, it never shows you any drop because the device will prioratized the input as voice or video.

Ubuntu 10.10 - Memory Issue with MySQL

All of a sudden my Database Server is running around 98% Memory Allocation (I have a 16GB box running only a MySQL Instance).
Here is what is displayed when I do a free -m:
total used free shared buffers cached
Mem: 15498 14565 932 0 76 8081
-/+ buffers/cache: 6408 9089
Swap: 31743 0 31743
I've already rebooted the machine - It's running on a very high availability server. MySQL claims that it's running 562 queries per second.
Total ø per hour ø per minute ø per second
22 M 2.03 M 33.77 k 562.90
Is this normal?
There is nothing wrong with that memory stats. You still have about 9 GB free and no swap is used.