What to do when hpacucli is locked but there is no process for it

# hpacucli
HP
Array Configuration Utility CLI 7.50.18.0
Detecting Controllers…
Error:
Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU
CLI.
# ps -ef | grep -i
acu
root 26127 11377 0 15:12 pts/3 00:00:00 grep -i
acu
go to /opt/compaq/cpqacuxe/bld/locks and remove all the files in that directory, then run hpacucli
Thanks to Justin Lim
83/433

Call progress for dahdi calls in asterisk-java

I wanted to generate a call from a script, and deliver a voice message, through a DAHDI channel, to a pots line.
This class does it, it tells you in the end if the line was busy, if it was never answered or if the call succeeded.
This is, if you trust dahdi callprogress, which is really broken… this example works better for SIP calls.
import org.asteriskjava.live.AsteriskChannel;
import org.asteriskjava.live.DefaultAsteriskServer;
import org.asteriskjava.live.LiveException;
import org.asteriskjava.live.ManagerCommunicationExcept ion;
import org.asteriskjava.live.OriginateCallback;
import org.asteriskjava.manager.action. OriginateAction;
import org.asteriskjava.util.Log;
import org.asteriskjava.util.LogFactory;
public class AsteriskCall implements OriginateCallback {
private final Log logger = LogFactory.getLog(getClass());
private DefaultAsteriskServer asteriskServer = null;
private String strChannelStatus = “NoStatusYet”;
private String number=””;
private String message=””;
public AsteriskCall() {
this.asteriskServer = new DefaultAsteriskServer(“somewhere.org”,”admin”,”mypass”);
}
public OriginateAction setupOriginate(String number,String message) {
OriginateAction originateAction = new OriginateAction();
originateAction. setChannel(“DAHDI/1/”+number);
originateAction. setApplication(“Playback”);
originateAction. setData(message) ;
originateAction. setActionId(number);
originateAction. setAsync(Boolean.TRUE);
originateAction. setTimeout(new Integer(30000));
return originateAction;
}
public void originate() {
OriginateAction originateAction = this.setupOriginate(number,message);
// System.out.println(“————— Calling: “+originateAction.getChannel()+”, Sending:
“+originateAction.getData());
try {
this.asteriskServer.originateAsync(originateAction, this);
}
catch (ManagerCommunicationException e) {
logger.error(“ManagerCommunicationException”);
}
15/433
Boolean out=false;
String previousStatus=””;
while(!out) {
if
(this.strChannelStatus.equals(“Busy”)||this.strChannelStatus.equals(“Success”)||this.strChannelStatus.equals(“No
Answer”)||this.strChannelStatus. equals(“Failed”) ) {
out=true;
}
try {
String currentStatus=this.strChannelStatus;
if (!currentStatus.equals(previousStatus)){
logger.info(“Current Channel State: “+currentStatus) ;
previousStatus=currentStatus;
}
Thread.sleep(1000);
}
catch (InterruptedException e) {
logger.info(“Interrupted.”);
}
}
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
logger.info(“Final Verdict: “+this.strChannelStatus);
}
@Override
public void onBusy(AsteriskChannel channel) {
this.strChannelStatus = “Busy”;
}
@Override
public void onDialing(AsteriskChannel channel) {
this.strChannelStatus = “Dialing”;
}
@Override
public void onFailure(LiveException cause) {
this.strChannelStatus = “Failed”;
}
@Override
public void onNoAnswer(AsteriskChannel channel) {
this.strChannelStatus = “No Answer”;
}
@Override
public void onSuccess(AsteriskChannel channel) {
this.strChannelStatus = “Success”;
}
public void setNumber(String n){
16/433
number=n;
}
public void setMessage(String m){
message=m;
}
public static void main(String[] args) throws Exception {
if (args.length<2){
System.out.println(“Usage: Call <number> <message>”);
System.exit(1);
}
AsteriskCall call = new AsteriskCall();
call.setNumber(args[0]);
call.setMessage(args[1]);
call.originate() ;
}
}
17/433

Vmware tools won’t compile on suse 9.2

You basically get “/bin/sh: scripts/basic/fixdep: No such file or directory”
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config9/vmmon-only’
make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.5-7.314′
Makefile:465: .config: No such file or directory
CC [M] /tmp/vmware-config9/vmmon-only/linux/driver.o
/bin/sh: scripts/basic/fixdep: No such file or directory
make[2]: kraftek.html POSTS rescue rescued.html rescued.txt x y z [/tmp/vmware-config9/vmmon-only/linux/driver.o] Error 1
make[1]: kraftek.html POSTS rescue rescued.html rescued.txt x y z [module/tmp/vmware-config9/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.5-7.314′
make: kraftek.html POSTS rescue rescued.html rescued.txt x y z [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config9/vmmon-only’
Unable to build the vmmon module.
If you don’t have a .config file in your kernel source you can:
# make cloneconfig
Then it might complain that
“scripts/modpost: No such file or directory”
So you just copy it according to the kernel you’re running:
89/433
# uname -a
Linux imdalapp300b 2.6.5-7.314-smp #1 SMP Mon Sep 15 16:43:00 UTC 2008 i686 athlon i386 GNU/Linux
# cp /usr/src/linux-2.6.5-7.314-obj/i 386/smp/scripts/modpost /usr/src/linux-2.6.5-7.314
Now you can run again “vmware-config-tools.pl”
90/433

multipathing in oracle enterprise linux 5

# cp /usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.annotated /etc/multipath.conf
# chkconfig –add multipathd
# chkconfig multipathd on
# reboot
For each lun assigned to you a device under /device/mapper will apear, do a fdisk to each one:
# fdisk /dev/mapper/360060e80047656000000765600000e43
# fdisk /dev/mapper/360060e80047656000000765600000e44
# fdisk /dev/mapper/360060e80047656000000765600000e45
# fdisk /dev/mapper/360060e80047656000000765600000e46
# fdisk /dev/mapper/360060e80047656000000765600000e47
# fdisk /dev/mapper/360060e80047656000000765600000e48
# fdisk /dev/mapper/360060e80047656000000765600000e49
In each case do a “p” and then a “w” to overwrite the volume label, you will have to restart the server.
# reboot
Once back, open the lvm assistant:
# /usr/bin/system-config-lvm
once there initialize each block device found at:
# ls /dev/dm*
after that you can create a volume group and volumes 🙂
188/433

Setting the max number of file descriptors open limit

To check kernel set open files limit
% cat /proc/sys/fs/file-max
8192
To increase kernel set to 65535 (as root)
# echo “65535” > /proc/sys/fs/file-max
If you want this new value to survive across reboots add it to /etc/sysctl.conf
fs.file-max = 65535
You can load these values live from the sysctl.conf file.
# sysctl -p /etc/sysctl.conf
The previous settings will only be for root, we need to adjust some files for all
the users to have them inherited.
To increase this to 65535 for all users (as root)
add two lines to /etc/security/limits.conf
kraftek.html POSTS rescue rescued.html rescued.txt x y z soft nofile 65535
kraftek.html POSTS rescue rescued.html rescued.txt x y z hard nofile 65535
Now add the next entry to /etc/pam.d/login
session required /lib/security/pam_limits.so
Relogin as your non-root user and check the new file open limit with:
$ ulimit -n
154/433

Reconfigure RILO address, and password

If your HP rilo,rib,ilo card (i don’t get these names) is not accessible, and the server is booted up to linux, you can
configure its address using “hponcfg”
theserver:~ # hponcfg -f rdpm.xml
Firmware Revision = 1.91 Device type = iLO Driver name = cpqci
Script succeeded
Where rdpm.xml has contents:
<RIBCL VERSION=”2.0″>
<LOGIN USER_LOGIN=”currentuser” PASSWORD=”currentpassword”>
<USER_INFO MODE=”write”>
<MOD_USER USER_LOGIN=”Administrator”>
<PASSWORD value=”apassword” />
</MOD_USER>
</USER_INFO>
<RIB_INFO MODE=”write”>
<MOD_NETWORK_SETTINGS>
<ENABLE_NIC value=”Yes” />
<REG_DDNS_SERVER value=”No” />
<PING_GATEWAY value=”No” />
<DHCP_DOMAIN_NAME value=”Yes” />
<SPEED_AUTOSELECT value=”No” />
<NIC_SPEED value=”100″ />
<FULL_DUPLEX value=”Yes” />
<DHCP_ENABLE value=”No” />
<IP_ADDRESS value=”172.168.120.106″ />
<SUBNET_MASK value=”255.255.255.0″ />
<DNS_NAME value=”theserver-ilo” />
<DOMAIN_NAME value=”rilos.com” />
<REG_WINS_SERVER value=”No” />
</MOD_NETWORK_SETTINGS>
</RIB_INFO>
</LOGIN>
</RIBCL>
124/433

Sar -ruq

Still on the performance+sysstat topic, I found useful to use “sar -ruq” to obtain memory, cpu and runqueue stats in one
command
root@kraftek:~# sar -ruq 3 10000
Linux 2.6.21.5-smp (kraftek) 02/15/2008
06:51:28 PM CPU %user %nice %system %iowait %steal %idle
06:51:31 PM all 97.01 0.00 2.99 0.00 0.00 0.00
06:51:28 PM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused
kbswpcad
06:51:31 PM 32528 866560 96.38 42564 178940 0 0 0.00 0
06:51:28 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
06:51:31 PM 1 256 1.85 2.01 1.37
06:51:31 PM CPU %user %nice %system %iowait %steal %idle
06:51:34 PM all 96.67 0.00 3.33 0.00 0.00 0.00
06:51:31 PM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused
kbswpcad
06:51:34 PM 32156 866932 96.42 42624 178940 0 0 0.00 0
06:51:31 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
06:51:34 PM 1 256 1.85 2.01 1.37
Nmon
To add to our previous performance post, we can equip our linux server with nmon, from IBM.
I’m not an IBM fan, this is free, but closed source!!!, despite this, it looks good, get it at:
http://www-941.haw.ibm.com/collaboration/wiki/display/WikiPtype/nmon
131/433