LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2015, 05:27 AM   #1
jglenton
LQ Newbie
 
Registered: Apr 2010
Posts: 9

Rep: Reputation: 1
RHEL 7: no output from ip commands


Hi,

Apologies if this is in the wrong forum, wasn't sure which was most appropriate...

I've built a Redhat 7 VM from an ISO and I've carried out various configuration on it and for some reason when I now run ip commands (for examnple 'ip addr show') I no longer get any output on screen.

Example...
[root@rhel-7-xx2 ~]# ip addr show
[root@rhel-7-xx2 ~]#

Version I'm using is:
Red Hat Enterprise Linux Server release 7.0 (Maipo)

I built another server and had the same problem and managed to fix it by yum updating all packages so it looks like a package needs to be updated but not sure which one.

If I pipe the output to a text file I can see the output okay in the file.

I have a ticket open with Redhat but it's taking a while to troubleshoot with them so thought I'd see if anyone else had seen this in the meantime...

Thanks
James
 
Old 05-27-2015, 05:33 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,797

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
if I understood well:
ip addr show will return nothing, but
ip addr show > textfile will put the result in that file.

In that case your shell is misconfigured.
 
Old 05-27-2015, 05:41 AM   #3
jglenton
LQ Newbie
 
Registered: Apr 2010
Posts: 9

Original Poster
Rep: Reputation: 1
Strange thing is I've not gone in and edited the shell. This is how .bash_profile looks at the moment...


[root@rhel-7-xx2 ~]# cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
[root@rhel-7-xx2 ~]#
 
Old 05-27-2015, 05:54 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,797

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
you did not answer me (did I understand that situation well?)
what is in ~/.bashrc and /etc/profile?
 
Old 05-27-2015, 06:21 AM   #5
jglenton
LQ Newbie
 
Registered: Apr 2010
Posts: 9

Original Poster
Rep: Reputation: 1
Ah sorry, here you go...


[root@rhel-7-xx2 ~]# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi



[root@rhel-7-xx2 ~]# cat /etc/profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}


if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workaround
EUID=`id -u`
UID=`id -ru`
fi
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
fi

HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done

unset i
unset -f pathmunge
[root@rhel-7-xx2 ~]#
 
Old 05-27-2015, 11:25 AM   #6
jglenton
LQ Newbie
 
Registered: Apr 2010
Posts: 9

Original Poster
Rep: Reputation: 1
Looks like this may be related to the HP software we use to connect to our servers (Opsware) as I can SSH directly onto the server via putty and can see the output okay.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
paste output of two commands forumbaba Linux - Newbie 4 11-10-2012 02:47 PM
Commands RHEL 5.2, 5.3, 5.4, 5.5 jorran Red Hat 5 01-19-2012 03:46 AM
commands for output? jtek74 Linux - Newbie 13 08-29-2008 01:00 PM
how to use one commands output vkmgeek Linux - Newbie 3 09-15-2007 12:04 PM
Using commands to output to files, how is this done? nro Linux - Newbie 3 11-11-2003 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration