Tag Archives: linux

It’s bold strategy, Cotton. Let see if it pays off

A month ago, I took the RHCE exam, fairly confident I will pass after spending hours studying and practicing.

It did not happen. I was not even able to complete the exam on time. I was hoping when I came home that I somehow squeaked though, but then came the exam notification::

Passing score for the exam: 210
Your score: 206

Result: NO PASS

For the next few hours, I was pretty depressed. I actually studied for the test far more extensively than the last time I took the RHCE, so it was a big blow to my confidence. At one point, I thought about not continuing on the RHCA path.

Then I decided to re-group and give it another go.

After signing up for the exam again (which, I will add, came at considerable cost, as Red Hat do not offer free re-takes), I took another look at the exam objectives and realize that in order to pass the exam, I need to complete all objectives in 3 1/2 hours (or 210 minutes). So I consolidated the list of objects as follows:

  • Configure a caching-only name server
  • Configure a system to forward all email to a central mail server
  • SSH Key Configuration with ACL
  • Synchronize time using other NTP peers
  • Apache – Configure a virtual host – with acl
  • Apache – Configure private directories
  • Apache – Configure group-managed content
  • Apache – Deploy a basic CGI application
  • Apache – Configure TLS security
  • Produce and deliver reports on system utilization (processor, memory, disk, and network)
  • Configure a system to authenticate using Kerberos
  • NFS – Provide network shares to specific clients
  • NFS – Provide network shares suitable for group collaboration (multi-user)
  • NFS – Use Kerberos to control access to NFS network shares
  • Samba – Provide network shares to specific clients
  • Samba – Provide network shares suitable for group collaboration
  • Use firewalld and associated mechanisms such as rich rules, zones and custom rules, to implement packet filtering and configure network address translation (NAT)
  • Route IP traffic and create static routes
  • Use /proc/sys and sysctl to modify and set kernel runtime parameters
  • Configure IPv6 addresses and perform basic IPv6 troubleshooting
  • Use network teaming or bonding to configure aggregated network links between two Red Hat Enterprise Linux systems
  • Install and configure MariaDB
  • Use shell scripting to automate system maintainance tasks
  • Configure a system as either an iSCSI target or initiator that persistently mounts an iSCSI target

Then I put them spreadsheet and start logging the time it takes me to complete each task over the course the week. The results were not pretty – it took about 162 minutes complete most of them.

(Actually, some of the tasks (in particularly, Apache), took far longer than I expected and some others I gave up after 10-15 minutes).

The important thing, though, is after that practice run, I know where my area sof weaknesses were. So I review the material again on my way to work and back, did some quick practice sessions and then went through the tasks again.

As the result, the following week was a different story I was able to cut my time down by almost 40 minutes – down to 128 minutes.

Again, I look at areas where I was weak at, practice and review. By the Sunday before the exam, I was able to cut my time to under 2 hours. Then I did some final review on some parts on Sunday and Monday.

As the result, when I re-took the exam Tuesday afternoon, I was able to breeze through all the items, and complete all of them with an hour to spare. At that point, I was able to spend the remaining time validating the setup, and going back and correcting things that I missed.

Later on that evening, I received the results:

 

Passing score for the exam: 210
Your score: 271

Result: PASS

Boom, baby.

Hold your nose and close your eyes

Aggregating interfaces can be a pain, but it doesn’t have to be. With Red Hat 7 and above, you can team your interfaces with very little effort. Frankly, it is pretty awesome.

There is one catch, though. You will have to learn to use Network Manager. Specifically, nmcli.

Much can be say about whether  Network Manager is necessary or not on the server, but after working with nmcli, I could at least see how useful it is when comes to persistently set teaming configurations. I mean, the setup goes something like this:

Create a team configuration file, using one of the example in the documentation directory

cd /usr/share/doc/teamd-1.17/example_configs/
cp activebackup_ethtool_1.conf tmp.json
cat tmp.json

Then create the master, using the above configuration:

nmcli con add type team con-name team0 ifname team0 config tmp.json

Then add the slaves:

nmcli con add type team-slave con-name ens8 ifname ens8 master team0
nmcli con add type team-slave con-name ens9 ifname ens9 master team0

Re-start the interfaces and you are done!

It does smell a bit, but after fighting with Network Manager for the last decade, maybe it is time to at least give it a chance.

Link

sys-log:

Sometimes when dealing with application problems you run into a point where logs and environmental data just don’t seem to provide you with the exact issue.

For this reason there are many times where a developer may ask you to create a core file for their application. Core files contain a lot of…

Sys::Log: kill: Creating a core dump

bash: Field Separator Variable

sys-log:

By default when using a for loop in bash the field separator is set to a space.

Example:

[bcane@bcane ~]$ for x in list:like:this; do echo $x; done
list:like:this

One of the cool things about bash is that you can change this by setting a simple variable $IFS

[bcane@bcane ~]$ IFS=”:”
[bcane@bcane ~]$ for x in list:like:this; do echo $x; done
list like this

The exit code from a batch job is a standard Unix termination status, the same sort of number you get in a shell script from checking the “$?” variable after executing a command.

Typically, exit code 0 (zero) means successful completion. Codes 1-127 are typically generated by your job itself calling exit() with a non-zero value to terminate itself and indicate an error. In BaBar we don’t make very much use of this. The most common such value you might see is 64, which is the value used by Framework to say that its event loop is being stopped before all the requested data have been read, typically because time ran out. In recent BaBar releases you might also see 125, which we use as a code for a generic “severe error”; the job log should contain a message stating what the error was.

Exit codes in the range 129-255 represent jobs terminated by Unix “signals”. Each type of signal has a number, and what’s reported as the job exit code is the signal number plus 128. Signals can arise from within the process itself (as for SEGV, see below) or be sent to the process by some external agent (such as the batch control system, or your using the “bkill” command).

By way of example, then, exit code 64 means that the job deliberately terminated its execution by calling “exit(64)”, exit code 137 means that the job received a signal 9, and exit code 140 represents signal 12.

(via arisawa)