Red Hat - Useful Commands - Don't leave home without them!
DanielJMartin 060001XHWG Visits (2976)
Below is a list of commands that I consider useful, but don't use everyday, similar to a blog that I do for AIX but this is for Red Hat. So due to their lack of use, I tend to forget what the syntax and such is. I'm going to keep updating this as I remember other commands, so this should be a developing blog. In the details below I mentions using yum for the installs, this is done from a repository that has been created from the install DVD so you should be able to get all the extra rpms you needs. Details of how to install the repo are details in my blog HERE.
Rather useful command that can be used for testing network bandwidth, which in my case was used for testing our 10Gbit network card on a direct loop could get a decent speed. First your need to copy over the binary to install, which as you will see you need to configure yourself -
Extract the tar file into the installation directory:
# tar -zxvf iperf-2.0.5.tar.gz
# cd iperf-2.0.5
Run the configure command to set it up for your system:
In our case there where some missing filesets, details of which can be found in the config.log in the install directory. So install the additional packages:
# yum install gcc
# yum install gcc-c++
# yum install make
Then run the configure again, followed by a make:
# make install
Now that its installed, go and install the code on the other server that you need to test with. Once that is completed we can start iperf in server mode on one box:
# iperf -s
Then on the other server start the iperf in client mode to start the test (the '-P n' is the number of parallel client threads to run):
# iperf -c 10.10.0.11 -P 2
Client connecting to 10.10.0.11, TCP port 5001
TCP window size: 85.3 KByte (default)
[ 4] local 10.10.0.12 port 60000 connected with 10.10.0.11 port 5001
[ 3] local 10.10.0.12 port 59999 connected with 10.10.0.11 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 8.64 GBytes 7.42 Gbits/sec
[ 4] 0.0-10.0 sec 1.98 GBytes 1.70 Gbits/sec
[SUM] 0.0-10.0 sec 10.6 GBytes 9.11 Gbits/sec
So you can see we sent 10.6GBytes and got a bandwidth of 9.11Gbits.
Red Hat Java install
First there are a couple of binaries that will be need to ensure the the Java installanywhere script works:
# yum install libstdc++.ppc64
# yum install rpm-build
Then download the package that you need, in our case its Java7, into the install directory (/usr). Once that is complete run the *.bin file:
From this you should be able to simple follow the prompts from the install script, and as long as you have sufficient space all should install OK.
Check the installed version as follows:
Java Install Errors
If you see a error similar to this:
Error: dl failure on line 1265
Error: failed /tmp
Make sure you already have the
POWER SMT on Red Hat
How does Linux handle SMT modes, as IBM POWER7 Processors support Simultaneous Multi-Threading (SMT):
To toggle the CPUs offline/online consistently across the cores.
# ppc64_cpu --smt=x
Linux numbers all of the CPUs sequentially across the cores.
# ppc64_cpu --smt=1
Will "turn off" cpu1,cpu2, cpu3 of the four CPUs associated with each core, leaving cpu0 running. 0,1,2,3 is just the example for the first core. That repeats up through the CPUs.
# ppc64_cpu --smt=2
Insures that cpu0, cpu1 are "on", and cpu2, cpu3 are "off" for each core.
# ppc64_cpu --smt=4
Insures that all cpus are "on"
With SMT=1 mode (aka SMT off), the Linux scheduler should shift to the appropriate scheduling mode.
Mounting from AIX to Redhat
I keep forgetting these commands even though I'm mounting filesystems all the time, so here is a summary of what you need to do to get the mounts working from a AIX NFS server to a fresh Redhat 6.4 install.
So the first install error:
# mount -t nfs 172.19.80.40:/nimfs /mnt
# yum install nfs-utils-lib.ppc64
# mount -t nfs 172.19.80.40:/nimfs /mnt
# mount -t nfs 172.19.80.40:/nimfs /mnt -o nfsvers=3
# mount -t nfs 172.19.80.40:/nimfs /mnt -o nfsvers=3 -o nolock
Need to install a minimal desktop of your server environment then do the following:
# yum install gdm, gnome-panel, gnome-shell, nautilus
If you trying to get vnc working then ensure to add the following:
# yum install vnc-server twm xterm