Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, February 7, 2010

How to test the throughput/performance of your network using Netperf - Part 1

In this multi-part series, I will explain how to use GNU tools and Linux to have a free network throughput test setup. In Part 1 of the series we will use only one NIC to create single unicast TCP/UDP stream to saturate the linkspeed.
First of all what I used to have this test setup (you can adapt it to your needs)


HW :

- 2 HP Blade on same enclosure chassis with 10Gig HP Flex NICs. (servers)
- HP VC Flex 10 (the network device)

Software :- Centos 5.4 x64
- I only installed core GNU packages + development libraries. No unnecessary service/software loaded. Even I took XWindow(Gnome/KDE) out of the package and run the system in rulevel 3.
- Disable Firewall/SELinux
- netperf rpm (
ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.gz)

I made the first run of the test using single Vnet (counterpart of VLANs in HP Virtual Connect). You can also use the same tools to create a setup that utilize Shared Uplink Sets (trunk links on VC). In order to set this up create a Vnet for your load VLAN(Vnet_LOAD). Create the profiles for the blades and assign one FlexNIC with 100Mb to management VNet and the other one to VNet_LOAD (10Gb)


Netperf is based on client server model. After installing the software on both blades you execute different processes on different nodes. netserver as the name states is the server part of the test suite. You can also use the

[root@SERVER ~]# netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC

while netperf is the tool that executes the test and gives output.

[root@CLIENT ~]# netperf -H SERVER -l 15
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to SERVER (*******) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec
 87380  16384  16384    15.00    9387.92

The default test is TCP_STREAM you can also define other tests like UDP Request Response to fully saturate Full Duplex Link :

[root@CLIENT ~]# netperf -t UDP_RR -H SERVER -l 15
UDP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to SERVER (*********) port 0 AF_INET
Local /Remote
Socket Size   Request  Resp.   Elapsed  Trans.
Send   Recv   Size     Size    Time     Rate
bytes  Bytes  bytes    bytes   secs.    per sec
129024 129024 1        1       15.00    21045.72

Also you can fetch the CPU utilization info while doing the test using -c (local) and -C(remote) parameters

[root@CLIENT ~]# netperf -t UDP_RR -H SERVER -l 15 -c -C
UDP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to SERVER (*******) port 0 AF_INET
Local /Remote
Socket Size   Request Resp.  Elapsed Trans.   CPU    CPU    S.dem   S.dem
Send   Recv   Size    Size   Time    Rate     local  remote local   remote
bytes  bytes  bytes   bytes  secs.   per sec  % S    % S    us/Tr   us/Tr
129024 129024 1       1      15.00   20964.03   2.06   2.03   15.759  15.481

For detailed documentation and command line options you can check :

http://www.netperf.org/netperf/training/Netperf.html#0.2.2Z141Z1.SUJSTF.8R2DBD.J

On the next parts of the series I will focus on different types of throughput/load tests like multi flow & multi IP throughput testing using netperf & some Linux tweaking and IP multicast testing using MGEN.

Monday, December 14, 2009

Redhat Virtual Experience 2009

Redhat Virtual Experience 2009 online convention is available for replay :


http://www-2.virtualevents365.com/rhexp/

Tuesday, December 1, 2009

How to see the path of a process that's listening on specific port

From time to time you can have multiple instances of Apache installed on your server. As ps aux only shows the entire path, if you started the process using full path convention; you need to check /proc presudo file system to gather path information for the process. I generally use the below one liner to fetch this info :

[root@VM1 bin]# ls -altr /proc/`netstat -natp | grep 80 |  awk '{print $7}' | awk -F/ '{print $1}'`/exe
lrwxrwxrwx 1 root root 0 Nov 30 13:03 /proc/25316/exe -> /apache_test/bin/httpd

It uses netstat to gather process ID for specific port (also lsof can be used) then checks the /proc/$PROCESS_ID/exe soft link to see where the process resides. 



Saturday, November 21, 2009

How to increase the Logging Level of NFSD

NFS Server logging is by default very good, but in case you need more logging for deeper inspection you can use :
echo 32767 > /proc/sys/sunrpc/nfsd_debug 
echo 32767 > /proc/sys/sunrpc/rpc_debug 
And for the client side use :
echo 32767 > /proc/sys/sunrpc/nfs_debug
In order to return back to old debugging level use :
echo 0 > /proc/sys/sunrpc/nfsd_debug
echo 0 > /proc/sys/sunrpc/rpc_debug
echo 0 > /proc/sys/sunrpc/nfs_debug 

Sunday, November 15, 2009

How to Rescan SCSI Bus in Linux

I have a RHEL5 lab on my laptop, that's hosted on Vmware 7. For my RHCE prep I usually add/remove disks while the VM is up and running (hot swap). In order to make Redhat recognize the new disk you need to trigger the rescan of the SCSI bus :
echo “- - -” > /sys/class/scsi_host/hostX/scan
instead of hostX use the HBA ID. It's host0 in my case. Immediately after you can see the new disk on "fdisk -l"


NOTE : This works on 2.6 kernel only.

Sunday, August 30, 2009

Tip of the Day : Vmware - Linux Virtual Consoles Keystroke from Vmware

As you know in linux the keystroke from GUI for virtual consoles is CTRL+ALT+Fx. As CTRL+ALT is the keystroke for releasing the mouse from Vm session, these functionalities conflicts. In order to achieve CTRL+ALT+Fx in Vmware :
1. Press CTRL+ALT+Space
2. Only Release Space leaving Ctrl+Alt pressed
3. Press the Function (Fx) key

Friday, August 28, 2009

Linux Baby Rocker :)

There is no limit for Linux's usability...

http://www.youtube.com/watch?v=bYcF_xX2DE8

Source code of the shell script:
#!/bin/sh
while  [i= 1]
do
        eject
        eject t
done

Sunday, August 23, 2009

Tip of the Day : SSHD - How to connect a server using SSH and without entering login credentials

From time to time you will need to connect your servers remotely and execute commands there using scheduled jobs. As the nature of these scheduled jobs/scripts, they have no capability of user interaction like entering user/pass information. (I'm talking about simple shell scripts, you can also use Perl's use Net::SSH::Perl for entering user/pass info) For these scenarios we have the below trick of generating RSA/DSA key pairs and putting it into the authorized_keys file:
[root@server-a ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):   --- leave empty
Enter same passphrase again:   --- leave empty

Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:
35:ee:f1:53:f6:d7:85:4b:65:c3:68:f0:b6:59:f5:50 root@server-a

[root@server-a ~]# scp .ssh/id_dsa.pub server-b:/root/.ssh/id_dsa_lr.pub

[root@server-b ~]# cd /root/.ssh/
[root@server-b ~]# cat id_dsa_lr.pub >> authorized_keys
[root@servera ~]# ssh server-b

Last login: Mon Sep  3 12:29:09 2007 from X.X.X.X

[root@server-b ~]#
This example gives server-a the ability of connecting server-b via SSH and without entering any user/pass information.
NOTE : You can also use this trick to connect your Windows boxes using Cygwin SSHD. I will give details on Cygwin on a future article.

Friday, August 21, 2009

Tip of the day : Linux - Output a specific line

head -150 file_name.txt | tail -1
Shows the 150th line inside the file

Thursday, August 20, 2009

Tip of the day : Linux - How to keep commands running in the background after logging out

Yes I know this is the 2nd tip of the day but this one is simple. Today a colleague of mine come to me with this scenario :
I'm starting a ping on console. Then I'm exiting console, and would like to return my ping session. How can I do this ?
Normally in order to send a command to background and redirect STDOUT & STDERR to a logfile we use :
ping localhost >> /var/log/neco.test 2>&1 &
[2] 27783
Even if you send a process to the background when you logout/exit from a shell session Linux shell sends a HUP signal and kills that process. So we need to detach this process from shell. At this point the command nohup helps us. nohup detach the process from shell and attach to initd which is the mother process of all :) So we modify our command as below to reach our target :
nohup ping localhost >> /var/log/neco.test 2>&1 &
[1] 27786
After this command we can exit the shell and check the status of the STDOUT from the log file :
tail -f /var/log/neco.test
64 bytes from necoPC (127.0.0.1): icmp_seq=105 ttl=64 time=0.023 ms
64 bytes from necoPC (127.0.0.1): icmp_seq=106 ttl=64 time=0.022 ms
64 bytes from necoPC (127.0.0.1): icmp_seq=107 ttl=64 time=0.019 ms
In order to kill the process we need to use kill command with process id.

Wednesday, August 19, 2009

Oracle 10g AS Webcache Installation on RHEL4

After writing my post on RHCE, I remembered a document I wrote long time ago wrt Oracle 10g AS Webcache on RHEL4. I thought it can be useful so I’m sharing it on my blog.

INSTALLATION OF LINUX OS

Full OS + SW version overview

Webcache OS : Red Hat Enterprise 4
Webcache SW : Oracle Application Server Web Cache 10g Release 2
systat-5[1].0.5-11.rhel4.i386.rpm : Depending on what packages you have installed on the OS, this utility may not be installed on your system.

HW REQUIREMENTS

· VGA screen, keyboard, mouse
· Any PC which has following specs :
- Supported by RHEL 4
- at least 2 GIG of RAM
- at least 36 GIG HDISK
- at least 3 GIG-E COPPER ETHERNET INTERFACES or 2 GIGE COPPER ETHERNET + 1 10/100 MBIT ETHERNET IFS

The hardware used for the document is HP DL360 G5 with :

Intel(R) Xeon(R) CPU 5140 Quad Core @ 2.33GHz
2 Gig RAM
72*2 RAID 0+1 HDD
HP NC364T PCI Express Quad Port Gigabit


Install of Linux OS

1. Boot your computer with Red Hat Installation CD 1 / DVD.

RedHat Install Screen

NOTE : For Text installation of Red Hat. If you only have a keyboard without a mouse, type linux text + ENTER.

Then follow the items in graphical installation (the sequence of graphical and text install is the same)

Graphical installation of Red Hat.

- Press ENTER to begin graphical installation of Red Hat.

- Press Skip to skip media test.

- Click Next

- Select English for Installation Language and click Next

- Select U.S. English(or the appropriate language) for system keyboard and click Next

- Select Manually partition with Disk Druid and click Next

Disk partition sizes

The webcache which are installed on Hp DL360G5 with 2GB RAM and 72*2 (RAID 1+0) disks.

Device

Mount Point

Type

Size (MB)

/dev/cciss/c0d0p1

/boot

ext3

102

/dev/cciss/c0d0p2

/opt

ext3

11719

/dev/cciss/c0d0p3

/

ext3

5373

/dev/cciss/c0d0p5

/u01

ext3

3891

/dev/cciss/c0d0p6


swap

4095

/dev/cciss/c0d0p7

/usr

ext3

4095

/dev/cciss/c0d0p8

/var

ext3

3891

/dev/cciss/c0d0p9

/u02

ext3

8087

/dev/cciss/c0d0p10

/tmp

ext3

8189

/dev/cciss/c0d0p11

/home

ext3

8189

/dev/cciss/c0d0p12

/home2

ext3

rest
(12339)


- Click Next to complete manual partitioning.

- Leave the boot loader settings as defaults, and click Next.

Boot Loader

- Configure Ethernet interfaces

If you have multiple interfaces on your machine it will be best to enable them all by clicking the checkboxes of the required interfaces. Also give an appropriate hostname for the machine. The Quad Ethernet Card is not detected by the system at the initial setup we will install it later after the setup completes. Click Next

- Disable Firewall and SELinux

Disable Firewall and SELinux and click Next. These features are not required by our application. Click Proceed when you have a firewall warning.

Firewall Settings

- System language is default English

Leave the system language to default English(USA) and click Next

Language

- Time zone

Select correct timezone depending your location.

I selected Europe/Brussels for time zone and click Next

Timezone

- Enter root password and NEXT

- Customize software packages to be installed

Click Customize software packages to be installed and click Next

Please make sure that the following packages are installed :

gcc-3.4.3-22.1
gcc-c++-3.4.3-22.1
openmotif21-2.1.30-11.RHEL4.4
setarch-1.6-1
pdksh-5.2.14-30
sysstat-5.0.5-1
gnome-libs-1:1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
compat-libstdc++-296-2.96-132.7.2
compat-db-4.1.25-9
control-center-2.8.0-12
glibc-common-2.3.4-2.9
binutils-2.15.92.0.2-13
make-1:3.80-5
xscreensaver-4.18-5.rhel4.2

NOTE 1 : You can disable unnecessary packages like Web Server, Windows File Server, Printing Support etc.

NOTE 2 : gcc is required during intallation of ORACLE AS. So, even if you go for production install, then Development tools MUST ALSO be installed .

- Begin installation.

Click Next and Continue to begin installation.

- Reboot after installation completes

After installation completes click Reboot

- Appearance of welcome screen

After the reboot welcome screen will appear. Click Next.

- Accept license agreement

Accept license agreement and click Next.

- Configure correct date and time

Configure correct date and time, click Next.

- Display settings

Configure your display settings and click Next.

- Product registration (is not needed)

There is no need to register the product so

Next screen click Tell me why I need to register.. and click Next.

Next screen click I can not complete registration.. and click Next.

- Creation of system user (not needed)

Don’t create a system user click Next and then Continue.

- Complete post install tasks.

Click Next in the following two screens to complete post install tasks.

- Log on to the system

By using your credentials log on to the system.

- Post RHEL4 install tasks

- Installing HP NC364T PCI Express Quad Port Gigabit

1. First download the Quad Card Driver from

http://h18023.www1.hp.com/support/files/networking/us/download/27412.html

2. Install the source RPM package.

# rpm -ivh e1000-<version>.src.rpm

3. Build the binary RPM for the e1000 driver.

# cd /usr/src/redhat
# rpmbuild -bb SPECS/e1000.spec

4. Check for the existence of a current version of the e1000 package as follows

# rpm -q e1000

If an old version of the package exists, the RPM package should be removed.

# rpm -e e1000

Verify that the old e1000 package has been removed as follows:

# rpm -q e1000

5. Install the new RPM package. This installs the e1000 driver and man page.

Do NOT use the U (Upgrade) flag in the RPM command below - previous e1000 drivers must be removed as described in step 4 above before installing this version.

# rpm -ivh RPMS/<arch>/e1000-<version>.<arch>.rpm

The e1000.o module is installed in the following directory:

/lib/modules/<kernel_version>/kernel/drivers/net

On 2.6 kernels a e1000.ko module will be installed instead of e1000.o

6. Configure your network setting and address using the below config files :

/etc/sysconfig/network-scripts/ifcfg-eth*
/etc/sysconfig/network

8. You can now reboot your server. Upon reboot the network should start with the e1000 driver loaded and the correct network configuration.

To verify that the e1000 driver is loaded use the following command.

# lsmod

If e1000 is listed then the e1000 driver is loaded. You can also verify that the correct e1000 driver is loaded through any of the following methods. Note that version of the driver loaded should be same as that of the package version.;

Look for driver load messages in the system log.

#dmesg | grep Intel

You should see messages of the following type,

Intel(R) PRO/1000 Network Driver - version x.x.x

- Create /usr/system directory and add it to PATH variable.

In this directory we will add additional tools (as root user) which might be very handy.

mkdir /usr/system

then edit /etc/profile and add following line after the line containing :

after pathmunge /usr/X11R6/bin

add following 2 lines :

#needed for /usr/system
pathmunge /usr/system after

This will make sure that the /usr/system dir is in your path and that commands put in there will always be executed. Exit the session and relogin the session to make the changes effective. Check with echo $PATH to verify if /usr/system is in your path variable.

- Disable some useless processes with chkconfig

chkconfig --level 2345 cups off
chkconfig --level 2345 sendmail off

INSTALL ORACLE 10GR2 WEBCACHE

Preinstall Tasks for Oracle10gR2 Webcache

- Change the kernel security parameters

Add the following lines to the /etc/sysctl.conf file:

kernel.msgmnb=65535
kernel.msgmni=2878
kernel.msgmax = 8192
kernel.shmmax=4294967295
fs.file-max=206173
kernel.sem = 256 32000 100 142
kernel.shmmni=4096
net.ipv4.ip_local_port_range = 20000 65000

Then run :

/sbin/sysctl –p

Add the following lines to the /etc/security/limits.conf file:

* soft nproc 16384
* hard nproc 16384
* soft nofile 65536
* hard nofile 65536

Create new groups and oracle user (as root)

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba oracle

passwd oracle

Create the directories in which the Oracle software will be installed:

mkdir -p /u01/app/oracle/product/10gr2
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02

Setup ORACLE environment

As oracle user edit the /home/oracle/.bash_profile file and after the line :

“# User specific environment and startup programs “ add following entries :

ORACLE_BASE=/u02
ORACLE_HOME=/u01/oracle/product/10gr2
ORACLE_SID=test
ORACLE_TERM=xterm
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export ORACLE_TERM

# Set shell search paths
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH
unset USERNAME

Make sure that export PATH and unset USERNAME commands are created as above.

NOTE : We are doing these steps as oracle user

- Transfer and install systat-5[1].0.5-11.rhel4.i386.rpm

Oracle requires sysstat packages to install completely. Check first if it is installed by running the sar (sar is one of the apps installed by sysstat) command.

If the OS cannot find then it has to be reinstalled.

Download systat-5[1].0.5-11.rhel4.i386.rpm and transfer it to the root directory of the WC server.

as root run :

gzip –d sysstat-[1].0.5-11.rhel4.i386.rpm.gz

followed by

rpm –ivh sysstat-5[1].0.5-11.rhel4.i386.rpm

note it is possible that rpm will not detect the [] characters in the rpm filename. In that case first rename sysstat-5[1].0.5-11.rhel4.i386.rpm to sysstat.rpm

mv sysstat-5[1].0.5-11.rhel4.i386.rpm to sysstat.rpm

and then run

rpm –ivh sysstat.rpm

Run sar to check if sysstat installed correctly. if you get the error :

cannot find directory /var/log/sa/sa29 then reboot the machine.

- Transfer oracle SW in /u01/app/oracle/SW directory

Transfer as_linux_x86_webcache_101202.cpio file into /u01/app/oracle/SW and run :

cpio -idmv < as_linux_x86_webcache_101202.cpio

NOTE 1 : You can transfer the cpio file as root user, then move it into ./SW dir and then do

chmod 777 as_linux_x86_webcache_101202.cpio
chown oracle:oinstall as_linux_x86_webcache_101202.cpio

NOTE 2 : Do NOT forget the < between –idmv and as_linux….cpio !

NOTE 3 :
After decompressing using cpio you can remove the original as_linux_x86_webcache_101202.cpio file in order to save some diskspace

Running RunInstaller

As oracle user open a terminal and then run :

/u01/app/oracle/SW/Disk1/runInstaller

following screen will popup :

Oracle Installer

- Specify Inventory directory and credentials.

IMPORTANT : Change the default /u02/oraInventory to : /u01/app/oracle

IMPORTANT : Make sure that the Operating System group name is oinstall AND NOT dba

Then click NEXT.

Oracle Path

- Run /u01/app/oracle/orainstRoot.sh

Important : A popup window will appear telling you need to run /u01/app/oracle/orainstRoot.sh as root before pushing CONTINUE. So open a terminal and su – to root and execute that script.

Oracle Popup

As root (so in a different terminal), run /u01/app/oracle/orainstRoot.sh before proceeding with the install.

[root@wc oraInventory]# /u02/oraInventory/orainstRoot.sh

Creating the Oracle inventory pointer file (/etc/oraInst.loc)

Changing groupname of /u02/oraInventory to oinstall.

NOTE : If you get the message to run u02/oraInventory/orainstRoot.sh then this means that at the beginning or oracle you aceepted the default values which is not recommended. In that case restart the install of oracle using the correct install directory

Click continue after running run /u01/app/oracle/orainstRoot.sh

Specify file locations

Leave the Source path as /u01/app/oracle/SW/Disk1/stage/products.xml

Leave destination name as oracleas1

Change Destination path to : /u01/oracle/product/10gr2

NOTE : This is the same as ORACLE_HOME. (do : set | grep ORACLE as oracle user in a separate terminal to check)



Oracle Location



- Specify Web Cache Admin Password (at least one char should be numeric)



Oracle Password

- Product-specific prerequisite checks

The installer will now execute some checks.

IMPORTANT NOTE : in case you get a warning in the prerequisite checks

If you did not install sysstat-5-XX before as mentioned in the manual above then you will get a warning.

Depending on your installed packages during LINUX RHEL 4 OS, it might be that sysstat-5- is not installed.This means that the checks will result in following error :

“Checking recommended operating system packages” with status = WARNING.

Further examination of the window tells us that sysstat-5-0.5.-1 is not installed.

- Begin Oracle Universal Cache Top 10.1.2.1.0 installation

Click Install to begin installation.

- After the installation execute /u01/oracle/product/10gr2/root.sh as root

So open new terminal window and as root then run

/u01/oracle/product/10gr2/root.sh

accept the default /usr/local/bin path

Running Oracle10 root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/product/10gr2

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Adding entry to /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.


Now product-specific root actions will be performed.


After execution of the root.sh script, click OKclip_image002

- Note the end of installation message

Click exit to finish installation

Post-install Tasks for Oracle10gR2 Webcache

- Change the default runlevel to 3

as root user, vi /etc/inittab and look for the line :

id:5:initdefault:

and modify it to

id:3:initdefault:

runlevel 3 uses less memory + reboot the machine

- Create some aliases (optional):

As root in /etc/bashrc, look for following line …

#Even for non-interactive, non-login shells

… and insert following lines.

alias xmlvid='vi /u01/oracle/product/10gr2/webcache/webcache.xml'
alias vi='vi'
alias gobin='cd /u01/oracle/product/10gr2/webcache/bin'
alias goconf='cd /u01/oracle/product/10gr2/webcache'
alias gologs='cd /u01/oracle/product/10gr2/webcache/logs'
alias gobin='cd /u01/oracle/product/10gr2/webcache/bin'
alias eventlog='tail -f /u01/oracle/product/10gr2/webcache/logs/event_log'
alias accesslog='tail -f /u01/oracle/product/10gr2/webcache/logs/access_log'
alias wcstatus='/u01/oracle/product/10gr2/webcache/bin/webcachectl status'
alias wcstart='/u01/oracle/product/10gr2/webcache/bin/webcachectl start'
alias wcstop='/u01/oracle/product/10gr2/webcache/bin/webcachectl stop'

By doing this, these aliases will be visible both for root and oracle users

- Stop the WC processes

As oracle user do wcstop.

Check with wcstatus if all 3 processes are stopped

Change privilege rights of webcached binary

In the “gobin”(see aliases) directory the privileges of wecached by default are :

#ls –al webcached :

-rwxr-x--- 1 oracle oinstall 17074 Aug 21 17:01 webcached

In order to open ports lower then 1024 (port 80) you need to change ownerschip as root as follows :
[root@wc]# chown root webcached
[root@wc]# chmod 4750 webcached

After this operation the privileges of webached MUST look as follows : (of course, date can be different)

-rwsr-x--- 1 root oinstall 3565001 Aug 21 17:01 webcached

NOT doing this will result that webcached will not have the prvileges to open port 80 ( < 1024) and will not start.

- Running webcached with Root Privilege

Webcached must run as the root privilege in the following cases:

· Privileged port numbers less than 1024 are being used for OracleAS Web Cache listening ports.
· There are more than 1,024 file descriptors being used for connections to OracleAS Web Cache.
· The current opmnctl or webcachectl user does not match the configured user in the Process Identity page (Properties > Process Identity) of OracleAS Web Cache Manager.

To run webcached with the root privilege:

1. Change the process identity of the OracleAS Web Cache processes.

To establish the process identity of a restricted user first connect to the WC from http://localhost:9400 and:

a. In the navigator frame, select Properties > Process Identity.

The Process Identity page appears in the right pane.

b. In the Process Identity page, choose Change IDs.

The Change Process Identity dialog box appears.

c. Enter the new user in the New User ID field and the group ID of the user in the New Group ID field.

d. Click Submit.

e. In the OracleAS Web Cache Manager main window, click Apply Changes.

2. Use the webcache_setuser.sh script as follows to run OracleAS Web Cache as a different user, such as root/root, and add set-user ID permission to the webcached executable:

3. webcache_setuser.sh setidentity <user_ID

4. where <user_ID> is the user you specified in the New User ID field of the Process Identity page.

For example, to run OracleAS Web Cache as root/root, enter:

webcache_setuser.sh setidentity root

5. Log out of the computer, and re-login as the user configured in the Process Identity page.

- Reboot the WC

Make sure that alls WC processes are stopped ( wcstatus or ps –ef | grep oracle) and reboot WC.

Then you will be sure that WC is started up in runlevel 3.


Configuration of WC

Start WC + connect to management port 9400

Make sure that WC processes are running

Login as root and do wcstatus. if not running then type wcstart and check again if they are running.

Now from any windows machine that has IP connectivity to the WC, open the browser and type

http://WCIP:9400

at the right-top of the window screen, select “LOG on to OracleAS Web Cache Manager”

NOTE : The default listening port of the WC for management has been changed from 4000 to 9400.

Optimizing your WEBCache

http://download-west.oracle.com/docs/cd/B14099_19/core.1012/b14001/optwebc.htm#CIHJFBDI


Troubleshooting your WEBcache

http://download-uk.oracle.com/docs/cd/B14099_02/caching.1012/b14046/trouble.htm

Tuesday, August 18, 2009

RHCE – Day 1

Before starting this series, I want to tell you a boring story about myself. The story begins at 2000 when I was a high school student making web design/programming to earn my pocket money:) These days I recognised a web page called Brainbench which makes online exams for certification. I passed their exam to get ceritified for HTML 4.0

From that point on, I really understood the necessity of certification because the preparation process gives you much more then the paper you earn at the end. After that, my next step was MCSE 2000. I remember that I was studying the exam on my Intel Pentium 133 running Win2k like a turtle. The preparation phase was funny but in the end as an high school student I didn’t have enough money to pay for the exam fees, so unfortunately I didn’t have a chance to be MCSE at that age :(

And then comes the collage years. This time I have a new target : Networking and Cisco Certifications. And now I have enough money coming from the scholarships ;-) After 3 years of self paced and computer based preparation and with the help of Boson Netsim and Dynamips I passed all the exams (In total 5) that are necessary for CCNA & CCNP + 1 for CCIP (QoS Exam)

After graduating from school I applied a job in a big telco vendor. They were so suprised to see a new graduate with CCNA, CCNP.  As there were a lot of paper certified people around, they want to verify this. After a very long technical interview they got convinced and hired me. 

Certification has great importance in my life. I found certification as a great tool to advance expertise about technical areas. Currently I have IWA HTML 4.0, CCNA, CCNP, CCIP, MCTS Windows Server 2008 Active Directory: Configuration, MCTS Windows Server 2008 Network Infrastructure: Configuration, MCTS Windows Server Virtualization Hyper-V and MCITP : Windows 2008 Server Admin. All of these certification tacks helped me build knowledge on varios technologies in a very proper way. But will I stop ? Of course not :) Next step is RHCE (RedHat Certified Engineer)

Why RHCE ?

- As a network and system admin the middleware I was working on is mostly UNIX based (Redhat, Solaris, Secureplatform etc..) I have enough hands on and expertise but I don’t have a real proof.
- My interview with Google reminded me the importance of Linux again.
- RHCE is lab based not one of these paper certifications.
- One of the most recognised certification by the industry.

Enough pep talk let’s begin. First the preparation materials :

1. RHEL 5 Unleashed by Tommy Fox
2. RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302), Fifth Edition byMichael Jang 
3. Slides from RH033, RH133, RH253 Classes

and the tools :

1. VmWare Workstation/Server for my laptop prep.
2. Vmware ESXi for the lab. (maybe also Hyper-V with RH Integration tools)

and of course RHEL5 iso from RHN and a new wallpaper for motivation :D

http://spinix.deviantart.com/art/LINUX-CCCP-84492543

Installation Methods

CD/DVD-ROM :
Classical method for installing
Hard Disk : Requires an HD partition(xt2/3,vfat) accessible by the installer.
Network Install : NFS, FTP or HTTP based using PXE/Boot.iso
Kickstart : Unattended method of installation

NOTE : Boot.iso file can be located under RHELInstall CD1 / DVD ./images folder. 

In order to choose for an installation method use “linux askmethod” at the boot prompt

  image

image 

image 

image 

Install Phases :

- Select Language
- Select Keyboard Layout
- Installation number. (This allows us to use additional components like virtualization)
- Partition layout and RAID

IMPORTANT NOTE : If /boot or /boot/efi is a RAID. It must be RAID1.

- GRUB (Boot loader) config
- Network Config
- Packages to be installed

After Install those 2 files are created :

1. /root/install.log   --   Install Log File
2. /root/anaconda-ks.cfg   --   Sample Kickstart File based on the parameters used during the installation. I will examine this file in a future session.

Yes I know this was a less technical more personal session but next days  I will enrich the content and add more notes about my preparation track. Hope to see you in the next part of the RHCE series.