General :: Average Number Of Hosts That Respond To Pings During A Traceroute?
Feb 27, 2010
I am a new learner. I need a simple scripts that compute the average ping time for hosts, and the average number of hosts that respond to pings during a traceroute. I have finished the ping part but I confused how to start the traceroute part
Code:
#!/bin/bash
#!/bin/sh
txt=$*
count=0;
for host in $txt; do
echo $host
echo $( ping -c 3 $host | grep avg | sed 's@.*=@ rrt ave =@' | sed -r 's@ = [^/]+/([^/]+).*@= 1 ms@')
done;
View 1 Replies
ADVERTISEMENT
Jan 20, 2011
I have a Slackware 13.0 server that is not replying to icmp pings. However, I have double checked that /proc/sys/net/ipv4/icmp_echo_ignore_all is set to 0. The weird thing is I can run nc -v slackware 22 from any computer on my lan and the banner comes up just fine. The nic is on the same netmask and broadcast as all the other computers on my lan. I can log into it as well, it just doesn't respond to pings. I can even ping other computers and get replies just fine when pinging from inside the Slackware server.
I have even added an iptables INPUT rule for -p icmp -j ACCEPT. Although I've never had to do this. I ran tcpdump -vv icmp and I can see ping requests coming into the computer, however slackware simply doesn't respond. What could be causing this? A corrupt arp cache? It's been happening for more than a few hours so I wouldn't think so. How can I view the arp cache table? How do I clear it?
View 5 Replies
View Related
Jul 20, 2010
I have a big file full of records like this
1, 2, 4, 5, 6
1, 3, 5, 6, 3
1, 4, 5, 6, 6
2, 4, 5, 5, 5
2, 3, 4, 5, 2
anyway i need to take the average of all rows with the same 1st number(key). i.e.
1, 3, 4.66, 5.66, 5
2, 3.5, 4.5, 5, 3.5
I know this is something awk/sed would be great for, i just dont have enough experience with them to accomplish it, Also, what about averaging those columns together? so, after I output this to a file, id like to get another like:
1, 4.58
1, 4.125
The number of colums to add might not always be 4 either. EDIT: this might be easier to do in gnuplot, so I mainly just need an answer to the first part.
View 3 Replies
View Related
Feb 15, 2011
I want to give access to a student to a server in order to make repeated trials of traceroute to different hosts. We have realized that it is preferable to use the -T option, as it sends TCP packets that are less commonly blocked by firewalls. However, this option is only available to superusers, and I don't want to grant the student such privileges.
View 2 Replies
View Related
Apr 29, 2010
I have a file which has several entries with
# comment 1
1245
# comment 2
5667
# comment 3
456456
how can I read the file, sum the numbers ( "avoid" the #lines) and then get the average of the numbers?
I do awk '{s+=$0} END {print s}' /tmp/file.txt. and this give me the sum correctly, but how can I get also the average ?
View 4 Replies
View Related
Aug 16, 2010
I have just installed a testing net install of squeeze on my laptop and I'm having a few problems with my wired connection.
When i try to ping google.co.uk there is a large delay between each result even through the actual ping takes ~30ms. It takes about 5 seconds or more between each ping.
If i use ping -n it works fine. Does anyone know why this is happening?
View 3 Replies
View Related
Oct 11, 2010
I recently setup a new Linux server running Fedora 10. For some reason all ping response times are rounded to the nearest 10ms. For example, running the simple command "ping yahoo.com" give the following sample results:
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=12 ttl=57 time=60.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=13 ttl=56 time=50.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=14 ttl=56 time=40.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=15 ttl=56 time=50.0 ms
I could post a larger result set but its all the same... every response is rounded to a multiple of 10ms. This wouldn't be a big deal except that the server is running Nagios for monitoring so accurate stats are important. The Nagios check_ping and check_icmp commands are also returning rounded off results. How can I get ping to simply respond with the actual response times rather than a rounded off number?
View 1 Replies
View Related
Dec 17, 2010
naman@naman-laptop:~$ traceroute google.co.in
google.co.in: Name or service not known
Cannot handle "host" cmdline arg `google.co.in' on position 1 (argc 1)
Then I tracked the IP address of google.com on [URL] and tried
naman@naman-laptop:~$ traceroute 74.125.77.99
traceroute to 74.125.77.99 (74.125.77.99), 30 hops max, 40 byte packets
connect: Network is unreachable
I have to use my college proxy server to connect to the Internet. When I traceroute to a host within the LAN there is no problem. What should I do to be able to traceroute to a host outside my local network?
View 2 Replies
View Related
Jan 31, 2010
Is there some traceroute-like tool that shows ports as well as IP addresses? This is more for seeing how NAT works (on my home network) than for a practical need.
View 5 Replies
View Related
Jun 15, 2009
I read the man pages of batch and it says that commands or scripts scheduled using the batch command will only execute when the load average goes below 0.8. As a newbie I hardy understand what it means. Does it mean that the system resources are busy?Ans since I want to see the o/p of the commands I have set using batch, is there any way i can bring the sys load average below 0.8?
View 3 Replies
View Related
May 2, 2011
I'm trying to use ssh-keyscan to get some known_host file population going on, but I have a ton of hosts I want to scan, all with multiple aliases in /etc/hosts. Is there a way to use my current /etc/hosts file to do an ssh-keyscan instead of making a special list of hosts that (from what I've read) ssh-keyscan needs?
View 2 Replies
View Related
Aug 17, 2011
Well, as many proxy applications, GNOME Network Proxy Preferences only allow to ignore hosts. What I want to do is exactly the opposite. I only want to use the proxy for few sites. Is it possible to define only the allowed hosts in any way?
PS: I know FoxyProxy add-on for Firefox does this, but 1)I don't use Firefox and 2)I want the proxy settings system wide not only for browser.
View 9 Replies
View Related
May 19, 2010
How to get the load average for each CPU core in multi core(eg:duel core machine) processor environment. I tried using,
Code:
1. cat /proc/loadavg
2. uptime
3. top
But all of those commands gives the load average for whole system but not particular CPU core. Are there a way to take the load average for CPU core(Or any mechanism that can be done programmatic manner).
View 6 Replies
View Related
Feb 11, 2010
How to reduce the load average? I have two linux machines.. now my problem is that both the machines having same configuration and same processes are running in those two machines... But in one machine the load average is more than 3 and in other it is 0.5(when i am using top command).For this load average one machine(where load average is more) is slow when i am running application on it..
View 5 Replies
View Related
Aug 10, 2011
I wrote a script to extract and get the the name of *.gz in a foler . Since running that script every 10 minutes, load average on my server increases more than 10.I checked with 'top' and it showed many D process.
View 2 Replies
View Related
Mar 25, 2011
I've these 2 UNIX timestamps values taken from the java method System.currentTimeMillis(). These 2 timestamps correspond to the start time and the end time of 2 process that ran. Here are the values:
Code:
starttime ---------------- endtime
1301005328042 ----------- 1301005352079
[code]...
View 2 Replies
View Related
Feb 10, 2010
I have High load on my server and my investigation shows nothing (so i believe that my investigations is wrong ), the load average in this moment is 10.13, 9.47, 8.24. , mentioning the below.
- The disk utilization (all the disks) is near 0, as the result of the IOSTAT
- There is no blocked processes (as a result of VMSTAT).
- I have two processors (dual core) , the maximum load average should be something around 4.
- The server always have above 8 load average in all times interval.
btw , my OS is RHEL AS release 4 (Nahant Update 7)Kernel :Linux 2.6.9-78.ELhugemem #1 SMP i686 i686 i386 GNU/Linux
View 8 Replies
View Related
Jan 20, 2011
Anyone know what means the values of Load Average?
load average: 0.00, 0.00, 0.04
load average: 17.50, 13.44, 12.70
Sometime is low and many times is high.
View 1 Replies
View Related
Jan 26, 2011
Probably an easy (which means stoopid) question...I am trying to reroute a website using my hosts file so that it matches my servers certificate file for testing without effect dns and the live site.When I went to edit my /etc/hosts file it is non-existent. I have, I am assuming in it's place, hosts.allow and hosts.deny. Can anyone explain why I do not have a hosts file?
View 1 Replies
View Related
May 21, 2011
Why does unix ps -l whows one number in column "PRI" but in same time ps -o pri shows another number? cpu and nice are zero for those processes
View 1 Replies
View Related
Oct 27, 2009
We have a server that is running RHEL4 that occasionally spikes in load average above 10 and we have no idea what is causing it. We would like to know if there are any free tools or a script that when the load average hits a certain point it will trigger the system to start logging the processes to see what is happening. Usually by the time we get logged into the system the load average is on its way down. If someone has a better idea please let me know.
View 4 Replies
View Related
Feb 20, 2011
when i am using traceroute command, it is giving the erro as follow: traceroute [URL]: Temporary failure in name resolution Cannot handle "host" cmdline arg [URL] on position 1 (argc 1)
View 2 Replies
View Related
Apr 23, 2010
I am new to shell script and to this form as well, I did try to search for a similar post like mine here, but could not find one.
Here is what I'm trying to do:
I am trying to grep server logs to find a specific string and then capture the time stamp and the value of that grep string in them. The log file prints out messages on per sec basis.
My script is able to grep the server logs for the entire period of my load runs and then outputted it to a .csv file too.
Unfortunately this .csv file is too large to extract it on my PC and to generate graphs as it exceeds the excel limit. I need some help on how to read this .csv file in a shell script and then take an average on per min basis before I can export it out on my desktop and generate graphs for analysis. example of the out in my .csv file:
View 1 Replies
View Related
Jul 19, 2011
Say if i have a domain and i changed the registrar from nameserver1 to nameserver2.For example, if a client side cache isn't cleared, and if the client requests DNS query, would it be possible for the old nameserver1 to respond to the query? would nameserver1 never respond to DNS request?
View 1 Replies
View Related
May 26, 2010
For reasons I won't get into, I need to copy directories so long as the average system load is low. Can someone help me write a BASH script that will copy the contents of a directory, but check to make sure the average system load is below X before copying each file, and if not, wait Y seconds and try again?
View 3 Replies
View Related
Oct 17, 2010
How i know who is pinging me or trying?
View 1 Replies
View Related
Jan 4, 2010
Joined the Linux community last week with a clean install of Ubuntu 9.10 and the Edubuntu overlay onto my wiped Dell Inspiron 8000 with 512MB RAM (max allowed) and nVidia GEForce2 GO video card. <<lspci: 00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 82815 815 Chipset AGP Bridge (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801BAM ISA Bridge (LPC) (rev 02)
[code]....
View 3 Replies
View Related
Jan 17, 2011
[Code]....
What I want: multiple virtual hosts with ssl and only 1 ip address: In my example: server = 192.168.227.129
[Code]....
View 9 Replies
View Related
Aug 12, 2011
how I run a traceroute on 11.04?
View 7 Replies
View Related
Feb 3, 2016
I'm unable to get the "Uncomplicated Firewall" (UFW) to deny incoming pings. I've set it to deny incoming. Yet when I ping it, it responds.I'm using Debian 8.2 jessie KDE fresh/clean install with all updates.Below is the terminal output from a simple test (I've added an extra line feed between the commands for clarity):On a Debian 8.2 computer -- I install UFW, enable it, check its status (deny incoming), and get the Ethernet address:
Code: Select allroot@Computer:/home/user# apt-get install ufw
.... (long output -- no errors or warnings)
root@Computer:/home/user# ufw enable
Firewall is active and enabled on system startup
[code]...
The Debian computer with UFW active is responding to the pings, when it should be ignoring them.Rebooting the Debian computer doesn't fix the problem.This setup is very simple. I'm using all UFW defaults.This is a new Debian 8.2 install (clean) with all updates.
View 3 Replies
View Related