Friday, September 17, 2010

PowerShell Script to Create Visio Diagram of Your Aggregates, Volumes, and LUNS!

Want to Visio your Netapp Filer for Aggregates, Volumes, and LUNS!. I found a great article on it explaining the whole process .

Netapp LinK

Blog Link

Thursday, September 16, 2010

Migrating Printers In windows

Migrating Printers In windows
A friend ask me how he can migrate a number's of printers from one SAP server to other .

Here is the tool provided by Microsoft to do so Link

Wednesday, September 8, 2010

Zenoss Grouping Alerts

Zenoss misses this feature of group alerts , i wanted a alert email showing me all the devices having issue when i start my work so based on the priority wise i can start working on there resolution .
Below is the script which full fill my wish and i add it to cron or you can place it in the apache web folder and use it by commenting the mail paramter with print $message . You can add more parameters to it to narrow device type like add eventtype<>-1 if you donot want to see alerts which are acknowledged ( currently don't have a zenoss system access but will correct it if its wrong .


Download the script from this Link

Check Snapshot on VMware

Check Snapshot on VMware

To find the snapshot on the VMware ESX host use the below script . I found this on Nagios Exchange :


Add the following to your ESX server in the /etc/snmp/snmpd.conf and restart the snmpd deamon
exec .1.3.6.1.4.1.6876.99999.2 snapshots /etc/snmp/snapshots.sh


snapshot.sh should contains these lines.
#!/bin/sh
/usr/bin/find /vmfs/volumes/ -name '*delta*.vmdk' -printf %f' '%s'\n'

make sure it's executable by using the following command
chmod a+x /etc/snmp/snapshots.sh

Add a datastore in zenoss of snmp type and call this from there :

snmpwalk -v 2c -c $community $device .1.3.6.1.4.1.6876.99999.2.101 |\
grep vmdk | awk {' print $4,$5 '} |\
sed 's/ /_size:/g' | sed 's/\"//g'`

Thursday, September 2, 2010

Common Sense - Not so Common

We all believe in this quote but how many of us can differentiate Knowledge with Common Sense. Not Many of us...My post today elaborates on how we improve our Common Sense.
Many of us feel that our technical skill is not a part of our common sense, for us common sense is analytical, logical and aptitude based...this is a myth. Common sense can be anything, be it technical or behavioral.
Then how does Technical ability amount to be a part of Common Sense? An individuals understanding of how a thing works and putting it into practice is ability. Eg.: driving a bike, coding, PC Management. Not all people are experts at it but if you see some people do it and you do it the same way, you are able to do it.
From repeated practice of an ability amidst different conditions, situations and variable resources we become skilled. Eg.: Coding different Reports, Troubleshooting PC issues etc., and when you become skilled, you don't know different things, you just know different ways of doing things.
There is a science or a logic or an area of study behind every skill, this is not independent. Knowledge is dependent on various other disciplines. for a human mind, this knowledge can be mapped to a cloud in the sky or a water droplet on a floor.Interconnecting these little water droplets will give you Knowledge. Eg.: Understanding Electronics will enhance Computer Hardware Troubleshooting. This is Knowledge.
Knowledge cannot be static, it is dynamic and it needs to be put into practice. We do it through correlating our skill with other disciplines. Correlation takes your skill to next level. this next level is called competence. At this level, you are able to understand the problem based on the symptoms or error messages and you maintain a mental checklist of things you should be checking. Eg.: You approach a mechanic and say that your bike does not start, he has a invisible checklist. He checks the Petrol first, cleans spark plug, checks the spark, cleans the air filter, checks the electricity circuit to the engine and so on. He has a predetermined method of approaching the problem. This is Competence.
Now by virtue of putting Competence to practice in your day to day life, it gets ingrained into your thought process. Every time you see something, you know if it is running good or if there is some problem with the whole set up. This is Common Sense.
Here is a detailed example in the Software Engineering Lingo for our readers

Coding - Ability
Application Development - Skill
Application Troubleshooting - Knowledge
Performance Tuning - Competence
Planning an application development Document - Common Sense

One last line, you don't forget riding a bicycle if you don't ride one for 10 years, you don't forget the numbers and alphabets even if you don't use them regularly. The reason is that they are ingrained in your common sense.

Thursday, July 15, 2010

I/O alignment in VMWare ESX

In Many cases, VMDK partitions can become misaligned, leading to performance degradation.So before deploying your virtual machine check these recommendation for Netapp

VMDK partitions need to be aligned at both the VMFS and guest OS levels. For example, you can align the partitions at the VMFS level by selecting the vmware LUN type when creating your LUNs. By doing so, the partitions are aligned to sector 128 or sector 0, depending on whether you use VirtualCenter or vmkfstools to create the VMFS. Regardless, the partitions will be aligned as both are multiples of 4KB, thereby fulfilling the WAFL read/write requirements.

However, because of the 63-sector offset implemented by the Windows and Linux operating systems, the partitions will still not be aligned at the guest OS level. Therefore, you must manually align the .vmdks at the guest OS level for VMFS and NFS datastores.

Cause of this problem

Partial writes occur when using VMFS filesystem or NFS based VMDKs on ESX.

This issue is not unique to NetApp storage. Any storage vendor or host platform may exhibit this problem. You can determine if partial writes are occurring by looking at the wp.partial_write setting in perfstat. wp.partial_write is a block counter of misaligned I/O. In Data ONTAP 7.2.1 and subsequent 7G versions, read/write_align_histo.XX and read/write_partial_blocks.XX are also available in the stats stop -I perfstat_lun section of a Perfstat

Aligning your partitions to a 4K boundary in both the VMDK and the LUN is a recommended bast practice (see TR3428 for this and other ESX on NetApp Best Practices).

RDMs are not affected by partial writes as long as the LUN type is set to the RDM OS type.

IF you need more details and fixing this issue using mbralign
NETAPP Knowledge Base

NETAPP Knowledge Base

Friday, July 2, 2010

Performance Tunning Your Application Server

Instruction to performance tune OS for JBOSS/Tomcat/WebSphere/Oracle AS

First, you need to set the kernel parameter for shared memory to be at least as big as you need for the amount of memory you want to set aside for the JVM to use as large page memory. Personally, I like to just set it to the maximum amount of memory in the server, so I can play with different heap sizes without having to adjust this every time. You set this by putting the following entry into /etc/sysctl.conf:

Set the kernel Parameter for Shared memory in /etc/sysctl.conf to maximum amount of memory in the system so u don’t have to worry about the heap sizes adjustment .


kernel.shmmax = n for 4 GB server use 4294967296

where n is the number of bytes.

Set a virtual memory kernel parameter of how many large memory pages you want


vm.nr_hugepages = n

where n is the number of pages, based on the page size listed in /proc/meminfo for
Hugepagesize: 2048 kB

So, I wanted to set this to 3GB. I set the parameter to 1536, which is (1024*1024*1024*3)/(1024*1024*2). Which is 3GB divided by 2MB, since 2048 KB is 2MB.

Set another virtual memory parameter, to give permission for your process to access the shared memory segment. In /etc/group, created a new group, called hugetablespace let suppose guid is 1501

Put that group id in /etc/sysctl.conf as follows:
vm.hugetlb_shm_group = 1501

This GUID should be attached to the same user as that with which JBOSS is running .

/etc/security/limits.conf as follows:
jboss soft memlock n
jboss hard memlock n

where n is equal to the number of huge pages, set in vm.nr_hugepages, times the page size from /proc/meminfo, , 1536*2048 = 3145728. This concludes the OS setup, and now we can actually configure the JVM.

The JVM parameter for the Sun JVM is -XX:+UseLargePages use the same large pages /proc/meminfo