Error Message
[root@blackbox locks]# hpacucli
HP Array Configuration Utility CLI 8.28-13.0
Detecting Controllers...
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.
[root@blackbox locks]#
[root@blackbox ~]# ps -aef | grep acu
root 8714 8363 0 14:09 pts/0 00:00:00 grep acu
[root@blackbox ~]#
[root@blackbox ~]# ps -aef | grep hp
root 8762 8363 0 14:09 pts/0 00:00:00 grep hp
[root@blackbox ~]#
I was not able to find any other instance of the program on the process table.
Solution
1. Try to remove the lock file
[root@blackbox bbaby]# rm -f /opt/compaq/cpqacuxe/bld/locks/CPQACU_MUTEX
[root@blackbox bbaby]#
In my case this was not resolving problem. I was getting the same error message even after removing lock.
2. Do an strace and find what is blocking
[root@blackbox bbaby]# strace -f /opt/compaq/hpacucli/bld/hpacucli
execve("/opt/compaq/hpacucli/bld/hpacucli", ["/opt/compaq/hpacucli/bld/hpacucl"], [/* 19 vars */]) = 0
brk(0)
---snipped---
[pid 9629] times({tms_utime=4294967301, tms_stime=30064771073, tms_cutime=731361531114068436, tms_cstime=601725772861025720}) = 970423195
[pid 9629] time(NULL) = 1286376261
[pid 9629] time(NULL) = 1286376261
[pid 9629] stat64("/opt/compaq/cpqacuxe/bld/locks/CPQACU_MUTEX", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 9629] semget(0x1000e, 1, IPC_CREAT|0) = 7798791
[pid 9629] semop(7798791, 0x861f7c4, 2) = -1 EAGAIN (Resource temporarily unavailable)
[pid 9629] geteuid32() = 0
[pid 9629] rt_sigaction(SIGHUP, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGINT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGQUIT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGSEGV, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGABRT, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGFPE, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGPIPE, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGALRM, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGTERM, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR1, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR2, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {SIG_DFL, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_INTERRUPT|SA_NODEFER|0x1e302d0, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] rt_sigaction(SIGUSR2, {0x1000000008094054, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, (nil)}, {0x1000000008094054, ~[HUP INT QUIT ILL TRAP ABRT TERM URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN RT_1 RT_2 RT_3 RT_5 RT_6 RT_8 RT_11 RT_12 RT_15 RT_16 RT_17 RT_18 RT_20 RT_22 RT_23], SA_RESTORER|SA_STACK|SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND|SA_SIGINFO|0x3943418, 0xf7f46d4c00000000}, 8) = 0
[pid 9629] write(1, "Detecting Controllers...\n", 25Detecting Controllers...
) = 25
[pid 9629] write(1, "\n", 1
) = 1
[pid 9629] write(1, "Error: Another instance of ACU i"..., 160Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
) = 160
[pid 9629] write(1, " exit.\n", 13 exit.
) = 13
[pid 9629] write(1, "\n", 1
) = 1
[pid 9629] fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
[pid 9629] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0xff942f40) = 0xfffffffff7cc8000
[pid 9629] read(0,
Process 9621 resumed
Process 9629 detached
[root@blackbox bbaby]#
In this case need to delete the semaphore *7798791*
3. Delete the blocking semaphore
{terminal}
[root@blackbox bbaby]# /usr/bin/ipcrm -s 7798791
[root@blackbox bbaby]#
{terminal}
4. Verify whether it still exits or not
[root@blackbox bbaby]# /usr/bin/ipcs -a
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0052e2c1 1081344 postgres 600 11083776 2
------ Semaphore Arrays --------
key semid owner perms nsems
0x0052e2c1 7569408 postgres 600 17
0x0052e2c2 7602177 postgres 600 17
0x0052e2c3 7634946 postgres 600 17
0x0052e2c4 7667715 postgres 600 17
0x0052e2c5 7700484 postgres 600 17
0x0052e2c6 7733253 postgres 600 17
0x0052e2c7 7766022 postgres 600 17
0x0001000e 7864327 root 0 1
0xffffffff 7831560 root 0 1
------ Message Queues --------
key msqid owner perms used-bytes messages
[root@blackbox bbaby]#
Check the hpacucli status
[root@blackbox bbaby]# hpacucli
HP Array Configuration Utility CLI 8.28-13.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.
=> exit
[root@blackbox bbaby]#
hpacucli Error - Another instance of ACU is already running
Wednesday, October 6, 2010 Posted by admin at 8:50 AM | Labels: hpacucli, linuxPerl time manipulation
Friday, April 16, 2010 Posted by admin at 7:09 PM | Labels: linux, perl, time
Its always a challenge for any system guy to maintain application/system performance metrics for analysis and capacity planning. Harvesting the data and plotting requires lot of time related calculations. Since I am a part time programmer, cannot blabber more on perl or python's data extraction/manipulation capabilities.
Today I came across couple of modules which made my life easy while manipulating time related data using a Perl script.
i. Date::Manip
This is a smart module which can be helpful in converting the time and date. RPM package of this module is available from RedHat, CentOS repos.
[bbaby@basilvm ~]$ rpm -qa | grep -i manip
perl-DateManip-5.44-1.2.1
[bbaby@basilvm ~]$
Example :
## Get current time
$current_time = localtime;
$time_diff = DateCalc($time_value, $current_time);
## Time difference in minutes (%s for seconds)
Big chunk of Date::Manip examples are available here
ii. Time::HiRes
High resolution alarm, sleep, gettimeofday, interval timers (Examples available here )
I am sure that many people will not get into the situation were I was in today. The problem was simple but the fix was not under my control or reach. Had to find a work around to meet the project deadline.
Scenario:
I had to do OS installation of bunch of brand new servers on a new VLAN. All servers were connected under a A10 load balancer which was not supporting ip-helper (ie; I was unable to contact the DHCP servers from the network to do a PXE boot for OS installation). On contacting A10 Load balancer team, they confirmed that their current version is not supporting ip-helper. As the servers were on remote location, I cannot do a CD based installation and even if I get a hands and eyes support, its going to take long. My goal was to install RHEL 5.4 from remote corporate satellite server.
Solution:
1. I had DRAC (Dell Remote Access Consoles) on all these servers. I have installed a base OS image by mounting an operating iso image through DRAC (virtual disk). Then assigned an IP address, subnetmask, gateway on the the newly installed dummy server.
2. Installed dhcp server rpm "dhcp-3.0.5-21.el5.x86_64.rpm" on the box. It provides dhcrelay service which can be configured as a proxy to route dhcp traffic from local network to remote DHCP server.
Then start the dhcrelay by below command: (yes you are good to go)
/usr/sbin/dhcrelay -i eth0 ip-remote-dhcp-server
(man dhcrelay will show you full options of this command)
3. The above setting can be made permanent by adding the interface and DHCP server IP on /etc/sysconfig/dhcrelay
INTERFACES="eth0"
DHCPSERVERS="ip-of-remote-dhcp-server"
4. Start the service using
/etc/init.d/dhcrelay start
5. Make sure that the relay service is running on the host by a ps command
ps ax | grep dhcrelay
6. Rebooted the servers need to imaged from DRAC. Press F12 to get into the PXE boot mode. Server got IP address by proxying through the DHCP relay server.
How it works:
- When the server to be installed boot up it sends a DHCP request as broadcast on the network
11:48:55.809189 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx (oui Unknown), length: 300
- DHCP relay server running on the same network accept this broadcast
- DHCP relay server requests DHCP server on remote network for an IP address
11:48:55.809286 relay-server-IP
- DHCP relay server did a small trick while requesting the IP by putting mac address as the MAC address of the server to be installed.
11:48:55.809286 relay-servr-IP
xx:xx:xx:xx:xx:xx - MAC of server to be installed
- Rest will be like a normal DHCP request and new server will get IP lease from DHCP server.

I was planning a trip to Virginia beach on this long weekend. As I am traveling alone (nothing unusual.. am a lonely wanderer), music is best way to keep myself up. I had bunch of music files on my lappy, copied from Abhyant's music collection. Grrrrrr... all of these were in .wav and .aiff format. I was looking for a tool to do the conversion. Lovely tool LAME here to help me.
bbaby@luttappi:~/Songs-Abhyant/CD2$ for i in *.aiff; do j=`echo $i | sed -e 's/\.aiff/.mp3/'`; lame -b 128 -B 256 --vbr-new $i /home/bbaby/ToCD/cd2/$j;done;
I got the files in new folder. Ready to go :)

Yum was throwing errors saying inaccessible repo. I tried recreating the repository using 'createrepo'. But it didn't help.
[root@myhost repodata]# yum update
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Update Process
Setting up repositories
file://var/ftp/pub/rhel5/i386_32/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/ftp/pub/rhel5/i386_32/Server/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: Server
[root@myhost repodata]#
The fix was simple. Done a
"yum clean all"
Everything started working..hurray..!!

Quick LVM setup on a Debian/Ubunutu box
****************************************
puttalu:~# apt-get install lvm2 dmsetup
puttalu:~# fdisk -l
Disk /dev/sda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 12 96358+ 83 Linux
/dev/sda2 13 498 3903795 82 Linux swap / Solaris
/dev/sda3 499 1471 7815622+ 83 Linux
/dev/sda4 1472 9730 66340417+ 5 Extended
/dev/sda5 1472 9730 66340386 8e Linux LVM
puttalu:~#
puttalu:~# pvcreate /dev/sda5
Physical volume "/dev/sda5" successfully created
puttalu:~#
puttalu:~# vgcreate vg0 /dev/sda5
Volume group "vg0" successfully created
puttalu:~# pvdisplay /dev/sda5
--- Physical volume ---
PV Name /dev/sda5
VG Name vg0
PV Size 63.27 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 16196
Free PE 16196
Allocated PE 0
PV UUID xwuXvV-1DYA-SuhM-87c9-QRju-PuRa-tlPf30
puttalu:~#
puttalu:~# lvcreate -L20G -nusrlv vg0
Logical volume "usrlv" created
puttalu:~#
puttalu:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg0/usrlv
VG Name vg0
LV UUID FJu6pi-qOzW-1Pwf-Fz6u-PtUb-FWb4-w23LM7
LV Write Access read/write
LV Status available
# open 0
LV Size 20.00 GB
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:0
puttalu:~# mkdir /usr/back
puttalu:~# mount -t ext3 /dev/vg0/usrlv /usr/back
puttalu:~#
puttalu:~# lvcreate -L40G -nvarlv vg0
Logical volume "varlv" created
puttalu:~#
puttalu:~# mkfs.ext3 /dev/vg0/varlv
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5242880 inodes, 10485760 blocks
524288 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
320 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
puttalu:~# mkdir /var/image
puttalu:~# mount -t ext3 /dev/vg0/varlv /var/image
puttalu:~#
puttalu:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg0/usrlv
VG Name vg0
LV UUID FJu6pi-qOzW-1Pwf-Fz6u-PtUb-FWb4-w23LM7
LV Write Access read/write
LV Status available
# open 1
LV Size 20.00 GB
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:0
--- Logical volume ---
LV Name /dev/vg0/varlv
VG Name vg0
LV UUID 0V2BDl-Sra5-GFgI-6zGN-Uy7u-pzAs-7ZDfVC
LV Write Access read/write
LV Status available
# open 1
LV Size 40.00 GB
Current LE 10240
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:1
puttalu:~# df -h /var/image
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-varlv
40G 177M 38G 1% /var/image
/dev/mapper/vg0-usrlv
20G 173M 19G 1% /usr/back
puttalu:~#

PAE kernel installation on Ubuntu machine
$ sudo apt-get update
$ sudo sudo apt-get install linux-headers-server linux-image-server linux-server
$ sudo reboot
$ free -m
From Wiki:
http://en.wikipedia.org/wiki/Physical_Address_Extension
In computing, Physical Address Extension (PAE) refers to a feature of x86 and x86-64[1] of physical memory to be used in 32-bitoperating system support. PAE is provided by Intel Pentium ProCPUs (including all later Pentium-series processors except the 400 MHz bus versions of the Pentium M), as well as by some compatible processors such as the Athlon and later models from AMD. processors that allows more than 4 Gigabytes systems, given appropriate and above
Adding Disk on Xen Guest:
To resize the disk space of a xen DomU that is using Logical Volume Manager(LVM) is very easy. Below is step by step on how to do the resizing process.
1. Create a new image with the size that you require. Just give any meaningful name to the image. In this case I will use the name extended.img
# dd if=/dev/zero of=extended.img bs=1 count=1 seek=20G conv=notrunc
2. Add the new image to the configuration file of your DomU. In this example, the name of the domU is xen0
# vi /etc/xen/xen0
Add these line to it disk = [ 'tap:aio:/path/to/xen/xen0.img,xvda,w','file:/path/to/xen/extended.img,xvdb,w' ]
Save
3. Start your domU
# xm create xen0
4. Access your domU
# xm console xen0
5. Once inside, check whether the new image is detected
# fdisk -lu
6. After confirm that your new hard disk image is detected, it is time we have to work on the lvm
Create new physical volume (PV) using the new hard disk image
# pvcreate -v /dev/xvdb
Check that you have successfully added the PV
# pvdisplay
Extend your existing volume group (VG) to include the new PV
# vgextend -v VolGroup00 /dev/xvdb
Check that you have successfully add the PV into the VG
# vgdisplay
Extend your logical volume (LV)
# lvextend -L +20G -v /dev/VolGroup00/LogVol00
Check that the extension has been added
# lvdisplay
If all the steps are successfully done, you have to resize the / partition
# resize2fs /dev/mapper/VolGroup00-LogVol00
7. You are done. Check your new hard disk space :)
# df -lh
