Tuesday, 15 June 2010

Extending the logical volume


# fdisk -l
# pvcreate /dev/sdb
# vgextend VolGroup00 /dev/sdb
# lvextend -L27GB /dev/VolGroup00/LogVol00
# resize2fs /dev/VolGroup00/LogVol00

Friday, 11 June 2010

How to find memory leaks?

As long as your program is small and single threaded its easy to debug the memory leaks and corruptions, but when the programs grows bigger and bigger...we now have a problem of finding missing memory allocations and stack corruptions. There are tools to find these and one of them is valgrind which I found it to be easy to use and efficient.


valgrind --trace-children=yes --leak-check=full --log-file=/tmp/log

Thursday, 8 October 2009

Installing OpenSSH for Windows Server - How to get it working

n order to get host based authentication with OpenSSH to work under Windows server it is necessary to run the server with privilege separation instead of as the system account.

  • Either download and install OpenSSH for Windows,
  • I'm assuming you installed the package in C:\Program Files\OpenSSH
  • Create an empty folder in C:\Program Files\OpenSSH\var\empty which will be the OpenSSH server user's home directory.
  • Create the server users account:
    net user sshd password /add /fullname:"sshd daemon" /homedir:"C:\Program Files\OpenSSH\var\empty"
  • Add the server users account (sshd) to the Administrators group.
  • net localgroup Administrators sshd /add
  • C:\Program Files\OpenSSH\bin>mkpasswd -l -u sshd >> ..\etc\passwd
  • Finally start/restart the sshd daemon
  • C:\Program Files\OpenSSH\bin>net stop opensshd
  • C:\Program Files\OpenSSH\bin>net start opensshd

Wednesday, 1 July 2009

How to disable and re-enable hibernation on a computer that is running Windows Vista

To make hibernation available, follow these steps:

  • Click Start, and then type cmd in the Start Search box.
  • In the search results list, right-click Command Prompt, and then click Run as Administrator.
  • When you are prompted by User Account Control, click Continue.
  • At the command prompt, type powercfg.exe /hibernate on, and then press ENTER.
  • Type exit, and then press ENTER to close the Command Prompt window.
  • Easy step - [windows button + R] and in the prompt enter the above command.

To disable hibernate options follow the above steps except the command should be "powercfg.exe /hibernate off"