LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Server latency

Posted 10-27-2011 at 08:26 AM by sag47

I wanted a quick and dirty way to determine server latency on my Kubuntu machine. This just parses simple output from ping and provides only the time values.

Code:
for x in drexel.edu google.com;do echo -n "[$x]: "; ping -c 1 $x | head -n 2 | tail -n 1 | awk '{split($8,arr,"=")} END{print arr[2],$9}';done
Output
Code:
[drexel.edu]: 0.576 ms
[google.com]: 6.23 ms
You can put as many servers or IPs as you want in the for loop to get a comparison....
Senior Member
Posted in Uncategorized
Views 1772 Comments 0 sag47 is offline
Old

Network usage on a single device and log diving

Posted 09-27-2011 at 02:57 PM by sag47
Updated 09-29-2011 at 08:30 AM by sag47
Tags networking

I wanted to know the received network usage on a device in kB so this one liner was produced for the desired result.
Code:
while true; do y=`ifconfig eth0 | grep RX\ bytes| sed -e 's/.*bytes\://' -e 's/\ .*//'`; sleep 1; x=`ifconfig eth0 | grep RX\ bytes| sed -e 's/.*bytes\://' -e 's/\ .*//'`; echo $(((x-y)/1024)); done
Press Ctrl+C to stop analyzing the network traffic on that device.

Here's another one liner of me looking through multiple log locations.
...
Senior Member
Posted in Uncategorized
Views 1893 Comments 0 sag47 is offline
Old

Logon to Multiple Samba Servers

Posted 06-23-2011 at 03:41 AM by barani_pd

I have three Linux Servers running Samba shares in them. All are meant for different purpose. For administrative purpose and running some utilities in these servers\shares from Windows XP system, we use "net use Drive: \\ServerName\ShareName" command to map the share as a drive. During the process for each server we are to enter username and password. Is there a way by which I use my windows username and password for the logon.

Note: The Samba username and password are similar...
LQ Newbie
Posted in Uncategorized
Views 1810 Comments 0 barani_pd is offline
Old

Two computers, one old acoustic system, no digital input: what to do?

Posted 05-09-2011 at 03:07 PM by Web31337 (In The Middle Of Nowhere [edK's blog])

The short answer could have been "utilize analog and digital inputs" but my case here is quite old system having only one input.
I didn't really look into this question until I had to, today.
Some days before, when I was experiencing troubles with sound in Steam I installed pulseaudio and during search for it noticed "network" word in description. So I thought maybe I can set it up so I will send sound from second computer to first(over gigabit home LAN), which...
Member
Views 2573 Comments 0 Web31337 is offline
Old

CIDR to Netmask conversion with Python (convert short netmask to long, dotted format)

Posted 09-03-2010 at 05:43 AM by bittner (Notes on Linux)
Updated 09-03-2010 at 10:20 AM by bittner

When you write scripts dealing with setting up or analyzing network interfaces you will eventually run into the task of converting a netmask from one format into another.

Typically, the setup of an ethernet TCP/IP network interface consists of an IP address, a netmask, and a broadcast address. Unfortunately for you as a novice, the two tools ifconfig and ip show the same (or similar) information in a different format.

Quote:
$ /sbin/ifconfig
eth0 Link
...
LQ Newbie
Posted in Uncategorized
Views 14298 Comments 0 bittner is offline

  



All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration