General :: Ping To Show The Requests 'time Out' Instead Of Omitting The Output?
Apr 12, 2011How can I make the Linux ping to show the requests 'time out' instead of omitting the output?
Just like the Windows version of ping.
How can I make the Linux ping to show the requests 'time out' instead of omitting the output?
Just like the Windows version of ping.
I am using:
user@unknown:~$ sudo command -option > log
to save the results of "command" to the file "log", but I'd like to also get the result on the terminal, is this possible?
I am using ubuntu 10.04 lts.
Let's say I am pinging a host, and want to output to a file each reply and its timestamp of when this started.
I know that it can be done with a loop and a shell script. Something like this
DO
echo "$(date)" >> results.txt ###includes the time and outputs results to txt###
ping -c 4 HOST >> results.txt ###a total of 4 pings at a rate of 1 per second###
REPEAT UNTIL USER PRESSES CTRL-C
Now, my first issue is that I need to be able to see results real-time as well.
Is there a way one can print to BOTH a screen and output? If one uses the ">>" command, it is essentially sending everything to the file. Running another ping command in parallel is not an option.
ubuntu 10.10 with broadcom wireless adapter when i make ping on google i got: time=2000 ms i tested on another computer i got 350 what the problem?
View 2 Replies View RelatedI forgot a lot of my command line. I am doing cat file | grep "error" and i would like it to show everything to the right of G:/ including G:/ if possible. I figure its an awk command but i dont know what. I tried awk '{print $8+}' but + does not work like i hoped and guessed.
View 2 Replies View RelatedIs there a way of altering the time between password requests. For example after I login there seems to be a certain amount of time before the screen blanks out and a new request for the user password is asked. I would like to increase the time substantially.
View 1 Replies View RelatedI try to ping with php : exec("ping -n 1 $ip",$output[],$retval); it works fine in window. but in linux i got this error : ping: icmp open socket: Operation not permitted are there any ways to solve this ?
View 5 Replies View RelatedLet's say I have a command
ls -Bgclt /somwhere/in/the/past
How do I limit the output to show me only first 2 files? (except for having only 2 files in that directory)
Back in April I set up a Ubuntu DHCP server and a multiple VLAN network [URL] to migrate our various servers, workstations, etc off the 192.168.1.1 /24 network that everything was on because we where running out of address space. I built out the new network and everything worked great except our AD server would never get an IP address from the DHCP server (static reservation) and even if I set the IP statically on the AD server it couldn't ping the gateway and noone could log in. After several attempts to resolve this, including bringing in outside help, we where never able to figure out what the problem was.
Now 6 months later I have time to revisit the issue without effecting the live network. I used Acronis and imaged the AD server last Friday, cloned it on to another box with the same hardware, and put it up on the new network that's been sitting unused for the last 6 months. Today when I statically set the IP on the AD server (which is what I want) it connects and I can ping it's gateway 192.168.1.1 and all the way across vlans to a test sales agent workstation at 192.168.8.xxx on vlan 800 but only if I statically assign the agents station an IP address. When I try to get an IP address via DHCP it fails as destination unreachable. Nothing has changed in the last 6 months on the DHCP server but now it for some reason can't ping its default gateway 192.168.1.1. All of the config files are the same as they where left from the post linked above aside from the vlan id's used where changed from 1's to 100's (i.e. vlan 3 is now vlan 300) /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
auto vlan100
iface vlan100 inet static
[code]....
why it can't reach the gateway, when I do a tcpdump I can see the DHCP requests come in on eth0 but the server never responds and I'm pretty sure its because it isn't "seeing" them since it thinks there isn't a network connection but I don't know how to trouble shoot to find out where the problem lies.
Back in April I set up a Ubuntu DHCP server and a multiple VLAN network [URL] to migrate our various servers, workstations, etc off the 192.168.1.1 /24 network that everything was on because we where running out of address space. I built out the new network and everything worked great except our AD server would never get an IP address from the DHCP server (static reservation) and even if I set the IP statically on the AD server it couldn't ping the gateway and noone could log in. After several attempts to resolve this, including bringing in outside help, we where never able to figure out what the problem was.
Now 6 months later I have time to revisit the issue without effecting the live network. I used Acronis and imaged the AD server last Friday, cloned it on to another box with the same hardware, and put it up on the new network that's been sitting unused for the last 6 months. Today when I statically set the IP on the AD server (which is what I want) it connects and I can ping it's gateway 192.168.1.1 and all the way across vlans to a test sales agent workstation at 192.168.8.xxx on vlan 800 but only if I statically assign the agents station an IP address.
When I try to get an IP address via DHCP it fails as destination unreachable. Nothing has changed in the last 6 months on the DHCP server but now it for some reason can't ping its default gateway 192.168.1.1. All of the config files are the same as they where left from the post linked above aside from the vlan id's used where changed from 1's to 100's (i.e. vlan 3 is now vlan 300) /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
auto vlan100
[code]....
why it can't reach the gateway, when I do a tcpdump I can see the DHCP requests come in on eth0 but the server never responds and I'm pretty sure its because it isn't "seeing" them since it thinks there isn't a network connection but I don't know how to trouble shoot to find out where the problem lies.
i have 10 vi files . these files contain some system related information. i need to combine the output of all these files into a single file. the final file should contain contents of all these 10 files and the output should be in a tabular format.
is there any command in vi that i can use to create a table ?
Is it possible to show the output of a command in xfce4-panel? Like you would do with Conky.The Xfce battery monitor consistently uses a bit of my CPU so I wish to run "acpi" (and work out a clever way to just show the percentage) every 5 or 10 minutes in the panel.
View 5 Replies View RelatedI run a small home server (Debian 4), which acts as my gateway to the internet (ie, firewall) and runs a web server, dhcp, dns, and acts as a file server to the rest of the machines on my home network. Now I know it's never a smart idea to have all those services running on the same machine that is acting as a firewall, but I don't fancy running multiple servers just for home use, as it's mainly allowing me to learn system administration.
I noticed a few days ago that my internet had become unbearably slow, to the point where I could sometimes not load web pages. I spent a while searching through log files on my gateway, to try and find out what was eating up all of my bandwidth. When I came to apache's access.log file, I was confronted with this:
Code:
204.45.41.82 - - [17/Oct/2010:06:25:10 +0100] "GET http://vewice6.nightmail.ru/marriott-grand-cayma.html HTTP/1.1" 200 36921 "-" "Mozilla/4.0 (compatible; M$
204.45.41.82 - - [17/Oct/2010:06:25:11 +0100] "GET http://malaysiapodcaster.blogspot.com/2006/05/blog-post_11.html HTTP/1.1" 200 58681 "-" "Mozilla/4.0 (com$
[code]........
Multiple requests to my server, for totally random websites. I didn't even know it was possible to make those types of queries to a webserver. The only thing that is on the web server is a browser based torrent client. I have only shown a small snippet of the log file, but there are around 90k lines to different web addresses, from many different IPs. What I want to know, is what is happening? :S Why is someone querying MY web server, for web sites totally unrelated to it? And most of all, how can I stop it. My initial was to try and use iptables to block multiple requests from the same ip within a certain time frame, which I think would work as the server shouldn't really get many queries from external networks.
On my server I provide OCR file conversion service but the problem is when a user uploads a file and it's being converted then if you open another tab and try to load the site it won't respond until that conversion is completed. In other words until the PHP script finishes execution apace doesn't serve any other request to the same browser.
Here is my apache configuration:
Code:
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
[code]....
You can check what I mean if you try to upload and convert a file and while the file is converting try opening the site in another tab.
I've managed to confirm that I can reach my home network via ssh from a remote location through my SMC Barricade when it is directly connected to the desktop machine but when the second router is put back into the chain ssh requests time out. The second router is a Linksys WRT 54GL running the Tomato firmware. The chain looks like this: ISP's router (bridged) --> Barricade -->WRT54GL-->desktop
The Barricade has port 22 forwarded to the Linksys' WAN address and it in turn forwards to the desktop address. It appears that it is a setting on the Linksys firmware that is preventing the remote connection. I've looked through the various settings many times but cannot see anything that would cause the problem.
It takes me a while to log in the splash screen just sits there for ages before i get to the desktop. Never used to be this slow and I'm not sure why. Firstly, I'm running Ubuntu 11.04, standard DE. I do have conky starting up in a script but it has the & at the end of the line so I didn't think this would cause it (or is there some special case for log in time on how & is treated?). However as a test I will comment out the line in the script and see if it is the cause.
However just for general knowledge and in case that isn't the problem, how does one go seeing what is happening during the time from when one log's in and the desktop is displayed? Is there some kind of log that shows the date/time that can be enabled or is there a debug mode that can be enabled somehow via special keys or maybe from grub?
I have two systems running on linux. system one is running with RHEL 5.4/X86_64 hardware, system two is running with RHEL 5.3/i686 hardware. One filesystem is shared from system two and mounted as NFS on system one. Now when i do a copy from local filesystem to the NFS share from system one,it shows as follows
Quote:
-rw-r--r-- 1 xkinved rbak1 30 Mar 3 2011 king
But if i do copy with -p option then it shows right time stamp. Both machines are running with slight(minutes) different in time. Does this could be cause for this problem? The problem is happening while i do FTP from some other machines too.
I want to use history command to show the time stamp, user id, ip address, command logged
View 1 Replies View RelatedI have a Lenny Raid-5 setup, and I use rsnapshot to occasionally backup the raid to an old external hard drive that I otherwise leave unplugged. That external went bad, so I figured I should setup its replacement with encryption and keep it off site when not in use.
While googling and coming across LUKS, I can across this post this post that mentioned the drive should be be filled with random data before setting it up for encryption, and had the following as a potential sufficiently-good option over the time-intensive dd /dev/random route:
badblocks -c 10240 -s -w -t random -v /dev/sdx
I was unfamiliar with badblocks, and came across this post after a google session which noted the time duration of scan is an important factor as well as the result.
I sshed into the NAS, and was about to run badblocks first in read mode, then in write mode, but then I considered the time consideration. I was going to use something similar to the following: nohup badblocksstuff &
My Question: Is there a way I can append to the resulting nohup.out a time to complete value?
I have this script in the past for csh: Code: ./a.out |& tee prints.txt which will redirect all printfs in the C program to the prints.txt file and at the same time show them in the console. How do you do this in bash? I have seen this, [URL] but it does not work for my bash and sh shells. It says:
Code: -bash: syntax error near unexpected token `&' and
Code: -sh: syntax error: unexpected "&"
I want to get the time from power on system to showing user login view in Linux, how to do? Can it work only with shell?
View 2 Replies View RelatedTerminal with real time dmesg output I want to use tty12 for system messages. Is there a way to mirror all kernel messages to there?
View 2 Replies View RelatedI am using an virtual machine. where I need to ping from one machine to another. earlier I was able to ping. But after going to google.com once, I cannot ping back to this machine.
But if I gave ping -I eth1 <IP> then I can ping.
I cannot install any package, so tell me solution which includes not installing any package.
How do i write ping output to txt file?
View 3 Replies View Relatedlogging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system
oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in
Even ping google's ip address doesn't work. unknown host error using backtrack4 able to browse net with these settings.
My network settings:
What's the problem with these settings...
I have a 120GB HDD with a 22GB partition for Ubuntu and the rest for Windows XP. Windows finally died on me so I attempted a fresh install on its partition. However, the install threw a ton of errors so I used a LiveCD to re-install Grub and I booted into Ubuntu. I open up the disk utility to re-format the Windows partition so I can re-try re-installing Windows, but immediately I notice that the partitions are not right. If you add up all the partitions, they are about, say, 18 million terabytes over my HDD's 120GB capacity. Ahhh! What do I do?
I don't think anything is terribly altered, since I can still boot into Ubuntu, but I am completely confused and slightly worried that I might kill any chances to save my HDD I can't post a screenshot due to my post count, so the image loses some of its efficacy in making it small enough for an attachment. Here is the output of fdisk -l: Code: omitting empty partition (5)
[Code]...
I have a dedicated host on my lan to monitor other hosts/services using Nagios. I'm in the process of migrating to Zabbix on that host to perform the same purpose. Both Nagios and Zabbix monitor icmp ping latency (Nagios uses ping, Zabbix uses fping) and over time the latency to other hosts grows until threshold alarms are triggered. In one week, the average latency grows from sub-millisecond to over 100 milliseconds, and continues to grow until the Nagios host is rebooted. I have verified the latency numbers using ping/fping from the command line on the Nagios host.
The problem is that pings from the monitored hosts to the Nagios host show normal latency at the time the Nagios host is showing high latency from itself to the monitored hosts. The Nagios host and monitored hosts are all connected to the same Dell 24 port gigabit switch. I already posted this question on the Zabbix forums with a graph of the latency but there were no answers. [URL] why the icmp ping latency is growing over time and how I can fix it short of rebooting the host on a schedule.
[Code]...
time a.out
106.130u 0.000s 1:46.28 99.8% 0+0k 0+0io 83pf+0w
As per my understanding of the man page:
the first value is the time since the code execution started and ended,
the second values is the time spent in usermode
the third one being in kernel mode
Is the 99.8% indicating time spent in kernel mode?
Also, what does this indicate?
0+0k 0+0io 83pf+0w .
The program definitely takes more than a minute to execute - then why is the first value so small?
Is there any tools in linux same as "http-ping. This tool shows for any request :
1-The HTTP return code (and its brief textual description)
2-The number of bytes returned by the server (excluding headers)
3-The time taken to complete the request (i.e. round-trip time)