Skip to content

LINUX on WMware – network configuration

This post shows how to configure a LINUX host built from a VMware template. In this case the WWPN aka the MAC address is duplicated on each and every guest built from the template ….. This should not be allowed as it is against the whole idea of uniqueness of network adapters within the TCP/IP world.

One of the side effects of this “issue” is the presence of eth1 interface instead of eth0 in the guest inventory. What needs to be done is described next.

After the guest is powered you need to make a note of what WMware “thinks” is the MAC address of your guest. Highlight you guest, select the Summary tab, next in the Commands pane select the option labeled Edit Settings and finally select the Network Adapter and on the right side the screen in front of your eyes there is the Mac Address entry containing the value WMware manager assigned to the guest. Copy/Paste it, memorize it, write it down on a paper. Open a console session and log-in to the guest.

Remove the following file /etc/udev/rules.d/70-persistent-net.rules

Make sure that in the /etc/sysconfig/network-scripts directory exists only one ifcfg-* file and that this file is called ifcfg-eth0. Now, edit this file by replacing the value to the right of HWADDR= with the MAC address you obtained a two or three sentences above. Is the guest ip address, netmask, gateway and so forth are correct? If the answer is YES, restart the network service – either reboot or execute the service network restart

This should be it.

Shop Amazon – Valentine’s Day Event

Posted in Linux, LINUX.

Tagged with , , .

comparing hosts performance

It is possible that in the past, this used to be a pure magic. Today, everybody can do it. What am I talking about? Contrary to the heading above this text, I am not talking about the citrus fruits but about comparing machines using their rPerf ratings (which are based on their processor architecture).

“The question: we have a guest in one of our p6 595’s and in another in one of our p770. How do they compare?”

To answer this question, we have to find the CPU frequency of both machines. How? The command prtconf is one of the possibilities. Next, we have to establish how many processors each of these two partitions have. Finally, we need to know the total number of active processors in machine one and machine two which when combined with their frequency allows us to extract/interpolate the appropriate rPerf (unit of AIX performance) value. This information can be obtain from two IBM documents which you can view/download following this link:

Here is the short extract showing for a given processor frequency pairs representing rPerf value associated with the number of processors (shown in parenthesis).

p595 and p770 rPerf details

For example, a p595 with 16@5GHz CPUs is assigned a rPerf number equal to 164.67.

Our entire p7 has 32@4.2GHz CPUs, its rPerf value is calculated as follows:


Its partition that we want to compare against a partition in p595 has 4 CPUs; its rPerf value equals:


The p595 with its 40@5GHz CPUs has rPerfs value of 368.82. Its partition with 10 CPUs has:



Assuming that my calculations are OK it looks that the old iron still has some muscle.:-)

A few days later:

If you are not mathematically incliened, follow this link to a script that does all these calculations for you. Download it and execute it on the appropriate machine – thanks Ku!

Posted in Real life AIX.

Tagged with , , , .

to the users of this blog

Unfortunately, there are some whose intentions are not noble and as the result I need to tighten security of this site.
Today, I had to delete all “wp-users” (subscribers) of this blog.

Posted in Real life AIX.

aix host memory and its usage

Today, Annwoy came to my cube with this little treasure – for you if you wonder how is your host memory used; if someone asks for what amount of the computational or non-computational memory is there? ……

#memory calculator

um=`svmon -G | head -2|tail -1| awk {'print $3'}`
um=`expr $um / 256`
cm=`svmon -G | head -2|tail -1| awk {'print $6'}`
cm=`expr $cm / 256`
ncm=`expr $um - $cm`
tm=`lsattr -El sys0 -a realmem | awk {'print $2'}`
tm=`expr $tm / 1000`
fm=`expr $tm - $um`
echo "\n\n-----------------------";
echo "System : (`hostname`)";
echo "-----------------------\n\n";

echo "\n----------------------";
echo "Memory Information\n\n";
echo "total memory = $tm MB"
echo "free memory = $fm MB"
echo "used memory = $um MB"
echo "computational memory = $cm MB"
echo "non computational memory = $ncm MB"
echo "\n\n-----------------------\n";

This is a sample output:

System : (
Memory Information

total memory = 67108 MB
free memory = 1622 MB
used memory = 65486 MB
computational memory = 17264 MB
non computational memory = 48222 MB

As I found out from Ramon, what takes a few lines of code can be accomplished with one command too – there is always more then one way to skin the AIX feline. 🙂

>svmon -G -O unit=MB
Unit: MB
      size   inuse     free     pin     virtual  available   mmode
memory  57344.00  56289.60 1054.40  9235.80  22733.89 32762.27 Ded
pg space    4096.00        68.3

               work        pers        clnt       other
pin         7560.64           0        11.0     1664.19
in use     22733.89           0    33555.71

Posted in Real life AIX.

Tagged with , , .

Disk I/O tuning advice for AIX 6.1

Another nice document from Dan Braden  AIX 6.1 Disk I/O tuning presentation

Posted in Real life AIX.

Tagged with , , .

How to make RedHat files immutable?

Today, I found that LINUX file/directory object may be immutable! LINUX like any self respecting UNIX has the chmod, chown commands but in addition it has the chattr, which can make a file immutable (+i) to any change. It can “permanently” fix file/directory access time so it stays the same regardless of how many times the file is accessed +A. I really like the last one! If the s attribute is set on a file its blocks will be written with zeros on deletion making its data recovery impossible – security minded among us make a note!

[root@wmdql1 ~]# touch removeme
[root@wmdql1 ~]# ls -l removeme
-rw-r--r-- 1 root root 0 Jan 15 12:40 removeme

[root@wmdql1 ~]# lsattr removeme
-------------e- removeme

[root@wmdql1 ~]# chattr +i /root/removeme
[root@wmdql1 ~]# lsattr removeme
----i--------e- removeme

[root@wmdql1 ~]# chattr +A /root/removeme
[root@wmdql1 ~]# lsattr removeme
----i--A-----e- removeme

[root@wmdql1 ~]# chattr +s /root/removeme
[root@wmdql1 ~]# lsattr removeme
s---i--A-----e- removeme

[root@wmdql1 ~]# chattr -s /root/removeme
[root@wmdql1 ~]# lsattr removeme
----i--A-----e- removeme

[root@wmdql1 ~]# chattr -A /root/removeme
[root@wmdql1 ~]# lsattr removeme
----i--------e- removeme

[root@wmdql1 ~]# chattr -i /root/removeme
[root@wmdql1 ~]# lsattr removeme
-------------e- removeme

[root@wmdql1 ~]# ls -l removeme
-rw-r--r-- 1 root root 0 Jan 15 12:40 removeme
[root@wmdql1 ~]#

If you keep editing a file and your “staff” keeps on disappearing ….. remember this post and execute the lsattr command against your file. Who knows, maybe the file has been set to be “immutable” to changes which is the reason behind this post! 🙂

Posted in Linux, LINUX, Real life AIX.

Tagged with , , , , .

Allowing “others” to manage users without sudo

For the longest time, to delegate this part of AIX administrator job often called for the sudo command and an appropriate entry in the /etc/sudoers file.
Even know, most of us will turn and use sudo but why? There is at least one more way. Use what comes with AIX, user RBAC, use roles. AIX has many pre-defined roles appropriate for delegating management of different aspects of AIX to users freeing the root aka you to do something else.

This post, shows (without going into details) how to user roles to give the “user management authority” to somebody else who has a valid login to AIX host. As always one can use smitty or a command line entries to accomplish this task.

Execute smitty chuser and enter the correct user_name name. On the next screen find the entry labeled Roles and using the F4/F7 combination add the SecPolicy and AccountAdmin policies. When you are done your screen should look like:

ROLES                            [SecPolicy,AccountAdmin]

Do you see the comma character separating the policies above?

The equivalent command line directive:

# chuser roles='SecPolicy,AccountAdmin' user_name

You probably do not need to include the quotes in the previous entry. Finally, let’s activate these roles the next time the user_name logs-in:

# chuser default_roles=ALL user_name

Posted in Real life AIX.

Tagged with , , .

VMWare, RedHat and TSM backups

If you use all of the above and you discover that all your backups are always the FULL ones than the rest of this post is for you.

Posted in LINUX, Real life AIX.

re-zoning AIX guest’s FC adapters

There was a freshly built AIX host which was fully virtualized – its SCSI, FC and LAN adapters were all virtual provided by two VIO servers. It was the time to add (zone) some LUNs to this machine and SAN administrator was given its FC adapters WWPNs. In a few minutes, the response came back and it read these “three adapters out of four are on the same fabric!” AIX administrator said “oops” and scratched his head. SAN administrator added – “C0507603A41C005C is on the wrong side, it should be with 5E“.

This post follows the steps taken to attach FC adapters to corrects SAN fabrics. Open the next page if this “news” are worthy of your time.

Posted in AIX, Real life AIX, VIO.

Tagged with , , , , , , , .

LINUX kernels and their removal

Today, I had to execute a security scan against some of mine Red Hat hosts and surprisingly (at least to me) the results were not what I have expected ……. Not to mentioned that the side effect was my AD account being “LOCKED OUT ON THIS DOMAIN CONTROLLER” preventing me from log-in to over one hundred of hosts. Looking at the report documenting the offenses, I recognize that it is not that “my” hosts are at fault but it is the “scanner” fault, of course! 🙂

Apparently, McAfee “looks” not just for the running but all LINUX kernels present on a host. So even if I did yum -y upgrade and immediately followed it with another scanner run the process will flag this host as a “failure” because of the presence of the older kernels. It comes back to me now. Years ago, when I worked with the Interactive UNIX (the origin of SUN and AIX) I had to deal with multiple kernels – once or twice I had to remove some to gain back storage capacity on a host.

You may already know the question of today but if you don’t do not worry too much – here it comes: “how to list the kernels and how to remove them from a RedHat machine?”

To list kernels on a RedHat host, execute:

# rpm -qa kernel

To list your current kernel (the short version):

# uname -r

To list your current kernel (the long version):

# uname -mrs
Linux 2.6.32-279.19.1.el6.x86_64 x86_64

The last two entries tell us that the running 2.6.32-279.19.1.el6.x86_64 kernel (active) is the most up to date one. So to remove the other (non active) kernels, I have to execute these two steps:

# rpm -e kernel-2.6.32-279.11.1.el6.x86_64
# rpm -e kernel-2.6.32-279.14.1.el6.x86_64

To verify that there is just one kernel left – the one I wanted to keep:

# # rpm -qa kernel

Is there a way to switch kernels on a live RedHat hosts so when it boots next time it uses a different kernel? I know that a kernel selection can be made at boot time. Do you know about any other way? If so please let us all know too, thanks!

I feel, this post would not be complete without this message:

To install kernel packages manually, use "rpm -ivh [package]". Do not use "rpm -Uvh" as that will remove the running kernel binaries from your system. You may use "rpm -e" to remove old kernels after determining that the new kernel functions properly on your system.

Posted in Linux, Real life AIX.

Tagged with , .

Copyright © 2016 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.