Sponsored Content
Top Forums Shell Programming and Scripting Get the only ip (nothing else) of my linux machine? Post 302433562 by pludi on Wednesday 30th of June 2010 03:13:49 AM
Old 06-30-2010
If you have DNS and dig:
Code:
dig +short $(hostname -f)

Or, a bit longer:
Code:
ip addr show <interface> | sed -ne '/inet/s/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to synchronize all the linux machine?

Hi, I have three Linux machine have three different times. Can I synchronize them using one process? I have root access. Thanks! (1 Reply)
Discussion started by: whatisthis
1 Replies

2. Shell Programming and Scripting

how to execute C code in linux machine

Hi. I have a C code i want to run that code in linux machine. i tried with CC command. but CC command not in my bin dir. how to run that script. regards rajan (3 Replies)
Discussion started by: rajan_ka1
3 Replies

3. UNIX Desktop Questions & Answers

more than one linux on same machine?????

can i install more than one linux on a same machine......... i.e fedora and Kubuntu on asame machine..... will it affect a performance?????? (2 Replies)
Discussion started by: arunchaudhary19
2 Replies

4. Shell Programming and Scripting

SSH into a linux machine from a windows machine

I basically want to login into different linux machines( on the same network) from a windows machine. I know i can use ssh <machine name>. But i want to automate this process. I dont want to enter the username and password. Is there any way to do it. Can i make some sort of a batch script for it. (4 Replies)
Discussion started by: lassimanji
4 Replies

5. UNIX for Dummies Questions & Answers

Linux machine performance issue.

One of our database server is suddenly became very slow and i have no clue what to do .Please help. I m sharing the performance inforamtion regarding cpu,harddisk,ram . ########CPU Information######## Machine Uptime Information: uptime 10:25:06 up 16:50, 1 user, load average: 5.84, 5.65,... (10 Replies)
Discussion started by: pinga123
10 Replies

6. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

7. Red Hat

How to LINUX machine as a router.

Hi guys, could you help me to configure my Linux machine to behave as router? Scenario: Machine OS: CentOS 6.2 NIC: eth0: configured with a static IP by the ISP. eth1: not configured yet Virtual Machine: CentOS 5.7 NIC : eth0 : not configured yet eth1 : not configured yet... (8 Replies)
Discussion started by: saqlain.bashir
8 Replies

8. Red Hat

how to install Openssh in linux machine

Hi genious i'm New to Linux .. help me Very Urgent how to install Openssh in linux machine step by step .... plz (3 Replies)
Discussion started by: coolboys
3 Replies

9. Linux

Dhcp in use or not for Linux machine

Hi All. Can anyone let me know the smartest and fullprrof method of checkking whther any given linux machine is using DHCP or not? # ps -ef | grep dhcp gives output like below : root 3251 3128 0 11:02 pts/0 00:00:00 grep dhcp so i dont think its full proof method , please... (3 Replies)
Discussion started by: omkar.jadhav
3 Replies

10. UNIX for Advanced & Expert Users

How do we check the Linux machine OS?

I have IBM Z-Linux machine as well as RedHat Linux. Where do I see that the particular machine is z-Linux? below output from zlinux. $ uname -a Linux xxxxxxxHostname 2.6.18-406.el5 #1 SMP Fri May 1 10:42:26 EDT 2015 s390x s390x s390x GNU/Linux below output from redhat. $ uname -a... (3 Replies)
Discussion started by: govindts
3 Replies
Smokeping_probes_DNS(3) 					     SmokePing						   Smokeping_probes_DNS(3)

NAME
Smokeping::probes::DNS - Name Service Probe for SmokePing SYNOPSIS
*** Probes *** +DNS binary = /usr/bin/dig # mandatory forks = 5 offset = 50% step = 300 timeout = 15 # The following variables can be overridden in each target section lookup = www.example.org pings = 5 server = ns1.someisp.net # [...] *** Targets *** probe = DNS # if this should be the default probe # [...] + mytarget # probe = DNS # if the default probe is something else host = my.host lookup = www.example.org pings = 5 server = ns1.someisp.net DESCRIPTION
Integrates dig as a probe into smokeping. The variable binary must point to your copy of the dig program. If it is not installed on your system yet, you should install bind-utils >= 9.0.0. The Probe asks the given host n-times for it's name. Where n is the amount specified in the config File. VARIABLES
Supported probe-specific variables: binary The location of your dig binary. Example value: /usr/bin/dig This setting is mandatory. forks Run this many concurrent processes at maximum Example value: 5 Default value: 5 offset If you run many probes concurrently you may want to prevent them from hitting your network all at the same time. Using the probe- specific offset parameter you can change the point in time when each probe will be run. Offset is specified in % of total interval, or alternatively as 'random', and the offset from the 'General' section is used if nothing is specified here. Note that this does NOT influence the rrds itself, it is just a matter of when data acqusition is initiated. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 50% step Duration of the base interval that this probe should use, if different from the one specified in the 'Database' section. Note that the step in the RRD files is fixed when they are originally generated, and if you change the step parameter afterwards, you'll have to delete the old RRD files or somehow convert them. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 300 timeout How long a single 'ping' takes at maximum Example value: 15 Default value: 5 Supported target-specific variables: lookup Name of the host to look up in the dns. Example value: www.example.org pings How many pings should be sent to each target, if different from the global value specified in the Database section. Note that the number of pings in the RRD files is fixed when they are originally generated, and if you change this parameter afterwards, you'll have to delete the old RRD files or somehow convert them. Example value: 5 server Name of the dns server to use. Example value: ns1.someisp.net AUTHORS
Igor Petrovski <pigor@myrealbox.com>, Carl Elkins <carl@celkins.org.uk>, Andre Stolze <stolze@uni-muenster.de>, Niko Tyni <ntyni@iki.fi>, Chris Poetzel<cpoetzel@anl.gov> 2.6.8 2013-03-17 Smokeping_probes_DNS(3)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy