Enable core dumps in RedHat.

I used the following procedures to enable core dumps in RHEL6.

# vi /etc/security/limits.conf

#* soft core 0
* soft core unlimited

# vi /etc/sysctl.conf

kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
fs.suid_dumpable = 2

Note:
%e is the filename
%g is the gid the processs was running under
%p is the pid of the process
%s is the signal that caused the dump
%t is the time the dump occurred
%u is the uid the process was running under

# vi /etc/sysconfig/init

DAEMON_COREFILE_LIMIT=’unlimited’

# sysctl -p

RHEL6 udev and VMware ESXi

I finally had to look into udev a little bit today. I had made some modifications to a RHEL6 guest I have in VMWare ESXi. My trouble started when I converted the storage from thick to thin, due to limited space. I am still not sure why would have caused an issue with network devices, but it did. I ended up with a eth1 device instead of the eth0 device I had previously. I tried removing all the interfaces via vSphere and then adding one, but this only created eth2.

To resolve the issue, I needed to modify the appropriate udev rules. The rule files are located in /etc/udev/rules.d. The file that contained the network interface information was in the 70-persistent-net.rules file.

My /etc/udev/rules.d/70-persistent-net.rules contained the following:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:9a:99:76″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:70:fa:e5″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:70:fa:e5″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:70:fa:ef”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth2″

I simply removed all eth1 and eth2 and the eth0 (vmxnet3) entries, and rebooted. This took care of the issue.

VMware ESXi convert disk.

I found myself needing to change some disks in my VMs from thick (pre-allocating all the defined storage) to thin (dynamically resizing storage up to the maximum size configured. I found myself running out of disk space after creating a few snapshots.

First, to clarify a bit of confusion, I ran into. When I first attempted this, I logged into my ESXi host machine, and navigated to the VM directory I wanted to modify. Logically, I chose the largest vmdk file thinking that is one I want to change. Well, it turns out this isn’t the vmdk file you want to run vmkfstools against. To determine the file name, I brought up the vSphere Client and right mouse clicked on the VM, and chose Edit Settings. Then, I clicked on the hard disk I wanted to modify. From here, I was able to identify the filename I needed (under “Disk File”). Knowing this, I simply needed to run vmkfstools.

vmkfstools -i inputfilename outputfilename -d thin

Once completed, you replace the thick file with the thin file. The simplest way, to me, seems to be to remove or rename the thick file, and edit the vmx configuration file to use the new thin vmdk output file created when the vmkfstools was run. Then, I removed the server from the vSphere client by right mouse clicking on the VM and selecting “Remove from Inventory.” Then, I added the VM back into the invetory by clicking on ESXi host, right mouse clicking on the datastore where the VM is stored, and browsing to the VM directory. From here, I chose the updated vmx file to add the VM to the inventory.

There are several other options to the vmkfstools command including other disk formats including converting back to a thick disk format.

Note: When you look at the files via an ssh client, it does not look like you have changed anything with regards to space. To verify that it has worked, look at the hard disk for the VM. It should indicate that the type is Thin.

Automatically posting to tumblr.

Finally got around to getting my posts automatically posting to Tumblr.  It works just the way I want it to.  Still haven’t gotten to it for Facebook or at least something that works the way I want it to.

IOS 4.2.1 with 03.10.01 jailbreak from MacOS.

I used the following procedures to jailbreak my iPhone 4.2.1 with 03.10.01 baseband.

First some prep work. Backup your phone. From iTunes, right mouse click your phone and choose Backup.

Then, you need greenpois0n from greenpois0n.com. I used version rc5.2.

Next, you need to get you phone into DFU mode. Below, I have outlined the steps that have consistently worked for me.

How to get your iPhone into DFU mode:

With device powered on and unlocked:
Hold the Power and Home buttons.
When the screen goes black, count to 2.
Then, release the Power button, and hold the Home button for 10 – 15 seconds.
You know you are in DFU mode, if the screen stays black.

Now, you need to launch greenpois0n from the Terminal application. Below is the command line I used:

sudo Desktop/JailBreak/GreenPois0n/greenpois0n-osx_rc5_2/greenpois0n.app/Contents/MacOS/greenpois0n

In my case, the Loader application did not install Cydia. I needed to use redsn0w_mac_0.9.7b6 along with 4.2.1 download from Apple. The only option I chose was to install Cydia.

After the restart, my phone was jailbroken and I had a Cydia icon installed.

RHEL6 pam_fprintd error.

I found the following in a /var/log/secure log on a RHEL6 minimal installation:

PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: cannot open shared object file: No such file or directory

This is the PAM module to support finger print readers. In this installation, I do not need that functionality. To disable using the PAM module, I used the following command:

authconfig –disablefingerprint –update

Command line Citrix

I found myself in the situation where I needed access Citrix user connection information, but the Management Console was not displaying the users. I was in a bit of a bind, and needed to figure out how determine who was logged into what Citrix server in the farm. This led me to the command line.

auditlog – This will display an audit report of all the user logins and logouts. Basically, this queries the Windows event log. There is not /SERVER qualifier, so it looks like this only applies to the server you are logged in to.

There are a number options to the query command. Below are a couple, I have found most useful. All the query commands accept a /SERVER:servername qualifier to view other servers as well.

query farm – This will display all the current servers in the farm.

query process – This will display all the processes for a given user. You can use * to display all the processes on a server.

query user – To display user information.

quser – Displays all the currently connected users on the server. You need to use the /SERVER:servername qualifier to view servers other than the one you are currently logged in to. A simple script can be used to display the users on all the servers.

qwinsta – Display similar information as quser, but not a detailed. For you need to use the /SERVER:servername qualifier as well.

shadow – You use this command to shadow a user. You need to determine the user ID number using one of the query command above.

Updated my theme.

Tonight I finally got around to Readhanging the site a little. I have gone with a new theme to take advantage of some of the updates. Also, I finally got my twitter link on the site. Next, Facebook and Tumblr.

MacOS display network interface configuration (command line)

To display the network interface information for a particular network interface in Snow Leopard (not sure about other versions) use the following:

ipconfig getpacket interface

For example,
# ipconfig getpacket en0
op = BOOTREPLY
htype = 1
flags = 0
hlen = 6
hops = 0
xid = 446704316
secs = 0
ciaddr = 172.18.32.24
yiaddr = 172.18.32.24
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = 0:1e:c2:f:1b:45
sname = dhcp.domain.com
file =
options:
Options count is 8
dhcp_message_type (uint8): ACK 0x5
server_identifier (ip): 172.18.10.45
lease_time (uint32): 0x15180
subnet_mask (ip): 255.255.0.0
router (ip_mult): {172.18.10.1}
domain_name_server (ip_mult): {172.18.10.65, 172.18.10.66}
domain_name (string): domain.local
end (none):

This gives you much more information than a standard ifconfig command. The command above will display all the current options for the interface. You can narrow this down with the getoption parameter.

Tru64 turn off/on CPUs.

Yes, I know it’s old and retired and nobody cares, but I still have to support a couple Alphas running Tru64 and I always seem to forget this.

To display the status of the CPUs, use the psrinfo command. This will tell you which CPUs are online or offline.

# psrinfo
0 on-line since 01/27/2011 09:35:36
1 on-line since 01/27/2011 09:35:36
2 on-line since 01/27/2011 09:35:36
3 on-line since 01/27/2011 09:35:36
4 on-line since 01/27/2011 09:35:36
5 on-line since 01/27/2011 09:35:36
8 on-line since 01/27/2011 09:35:36
9 on-line since 01/27/2011 09:35:36
12 on-line since 01/27/2011 09:35:36
13 off-line since 01/27/2011 09:53:52

To put a CPU offline or online use the psradm command.

Offline:
# psradm -f CPU NUMBER

For example, when I turn off CPU 13 listed above, I used the following:
# psradm -f 13

Online:
# psradm -n CPU NUMBER

Return top

INFORMATION