Svi postovi sa bloga: miljan.org

One of the main rules when working on production servers is to keep trace of your actions. That is, so called, “cover your ass” policy. :) As most of my colleagues in IBM are using Windows on their workstations (strange isn’t it?!) they are using putty which provides logging options for their SSH sessions. But I am using Linux and OpenSSH client does not provide this luxury so I had to create this short script to save my SSH logs. It will start SSH client with all the parameters you pass over the command line but at the same time it will also start script command and log everything in right log file. Very neat. :)

#!/bin/sh
 
USER=$(whoami)
LOG_FOLDER=”/log/ssh/${USER}”
DATE=$(date +’%Y-%m-%d_%H:%M’)
 
case “$1″ in
    ’hostA’)
        HOST=”admin@hostA.example.com”
        ;;
    ’hostB’)
        HOST=”admin@hostB.example.com”
        ;;
    *)
        HOST=$1
        ;;
esac
 
LOG_FILE=${LOG_FOLDER}/${HOST}_${DATE}.log
 
[ ! -d ${LOG_FOLDER} ] && mkdir -p ${LOG_FOLDER}
 
script -c “ssh $*” ${LOG_FILE}

One of the main rules when working on production servers is to keep trace of your actions. That is, so called, “cover your ass” policy. :) As most of my colleagues in IBM are using Windows on their workstations (strange isn’t it?!) they are using putty which provides logging options for their SSH sessions. But I am using Linux and OpenSSH client does not provide this luxury so I had to create this short script to save my SSH logs. It will start SSH client with all the parameters you pass over the command line but at the same time it will also start script command and log everything in right log file. Very neat. :)

#!/bin/sh
 
USER=$(whoami)
LOG_FOLDER=/log/ssh/${USER}
DATE=$(date +’%Y-%m-%d_%H:%M’)
 
case “$1″ in
    ’hostA’)
        HOST=”admin@hostA.example.com”
        ;;
    ’hostB’)
        HOST=”admin@hostB.example.com”
        ;;
    *)
        HOST=$1
        ;;
esac
 
LOG_FILE=${LOG_FOLDER}/${HOST}_${DATE}.log
 
[ ! -d ${LOG_FOLDER} ] && mkdir -p ${LOG_FOLDER}
 
shift
 
script -c “ssh ${HOST} $*” ${LOG_FILE}

It’s been a while since I posted my last music recommendation so I think it is time for a refreshment. Something light for these hot summer days. :)

Debeli Precjednik - Ready to Fight

Enjoy. :)

It’s been a while since I posted my last music recommendation so I think it is time for a refreshment. Something light for these hot summer days. :)

Debeli Precjednik - Ready to Fight

Enjoy. :)

Linux kernel developers announced that they have successfully ported Logical Domain technology from Solaris kernel. Even more, it is already in the kernel! Good job guys! Another big step for the Linux virtualization community.

Speaking about Solaris, Sun opened source of it’s cluster suite. Can we expect some improvements in Linux cluster software?

Linux kernel developers announced that they have successfully ported Logical Domain technology from Solaris kernel. Even more, it is already in the kernel! Good job guys! Another big step for the Linux virtualization community.

Speaking about Solaris, Sun opened source of it’s cluster suite. Can we expect some improvements in Linux cluster software?

HP-UX is well known for the ease of patch and product manipulation. These operations are done via software called Software Distributor (SD). Situations where SD fails are very rare but they can be very strange.

One of those weird situations happened to me last week. I downloaded patch bundle from HP site and tried to create a depot. Very simple action - untar the bundle, run the create_depot_hp-ux_11 script and the script and SD will do all the necessary things. But, here comes the weird part - checksum error for all patches in the bundle.

# create_depot_hp-ux_11
DEPOT: /var/depot
BUNDLE: BUNDLE
TITLE: Patch Bundle
UNSHAR: y
PSF: depot.psf
Expanding patch shar files…
x - PHCO_23651.text
x - PHCO_23651.depot [compressed]
ERROR: wc results of PHCO_23651.depot are 7082 23582 522240 should be 7082 18520 522240
x - PHKL_18543.text
x - PHKL_18543.depot [compressed]
ERROR: wc results of PHKL_18543.depot are 146386 592281 20377600 should be 146386 524212 20377600

I checked the checksum of the bundle itself and it seemed perfectly fine. What a puzzle, a?

Here is the story. HP-UX was supposed to be compatible with UNIX95 specification, but the problem is that, for some reason, this compatibility breaks SD. This compatibility is enforced by environment variable called UNIX95. So if you ever notice problem like this, check first if this variable is active on your server and if that is the case just simply unset it and your SD will be fully functional again.

# set|grep UNIX95
UNIX95=yes
# unset UNIX95
# create_depot_hp-ux_11
DEPOT: /var/depot
BUNDLE: BUNDLE
TITLE: Patch Bundle
UNSHAR: y
PSF: depot.psf
Expanding patch shar files…
x - PHCO_23651.text
x - PHCO_23651.depot [compressed]
x - PHKL_18543.text
x - PHKL_18543.depot [compressed]

Happy patching! :)

Like I previously announced, IBM AIX 6 Beta will be openly available for free download and testing. This time has come and you can start downloading it right now from this page. More info here.

AIX 6 should bring a lot of new stuff especially when it comes to virtualization and high-availability issues. Some new features are ported directly from fault-tolerant systems which should provide even more stable and reliable systems. There will be no official support for Beta testing, but you can ask for help on one of the IBM forums.

Openness of IBM is a pretty new thing. This change in IBM policy is probably influenced by SUN’s opening of Solaris to the community. But even though some changes started, IBM is still far away from OpenSource and from opening code of it’s product to the OpenSource community. And that is a pity because I would really like to see the same usability features on some other UNIX operating systems. Sadly, even Linux is far behind AIX when it comes to usability.

Like I previously announced, IBM AIX 6 Beta will be openly available for free download and testing. This time has come and you can start downloading it right now from this page. More info here.

AIX 6 should bring a lot of new stuff especially when it comes to virtualization and high-availability issues. Some new features are ported directly from fault-tolerant systems which should provide even more stable and reliable systems. There will be no official support for Beta testing, but you can ask for help on one of the IBM forums.

Openness of IBM is a pretty new thing. This change in IBM policy is probably influenced by SUN’s opening of Solaris to the community. But even though some changes started, IBM is still far away from OpenSource and from opening code of it’s product to the OpenSource community. And that is a pity because I would really like to see the same usability features on some other UNIX operating systems. Sadly, even Linux is far behind AIX when it comes to usability.

Yesterday Buenos Aires received first snowfall in 89 years! As I don’t watch TV or any other form of news, I would probably never hear about this if Tatiana didn’t surprise me this morning with information about the snow. The news is even more surprising since Marica and I were visiting her two years ago at approximately same time of the year and the weather was everything but cold. We wore shorts and t-shirts all the time, even in the evening, and we used to sunbath under the Obelisco.

This seems to be one of the coldest winters in South America in a long, long time. Global worming works in strange ways, indeed. While you think about it enjoy in the pictures of beautiful Buenos Aires covered in snow.

Buenos Aires in Snow

Buenos Aires in Snow

Photos are courtesy of Jeff.

blogodak blog

Blogodak?

Blogodak je vaš pogled na domaću blogosferu. Prijavite se i napravite sopstvenu listu blogova koje pratite.

O projektu

Podrška

MyCity.co.yu

DevProTalk