Tuesday, June 29, 2010
Law of attraction
http://www.forbes.com/2010/06/28/chinese-billionaire-beijing-leadership-managing-rein.html
What I Learned From A Chinese Billionaire
He taught me the basic principles he relied on to go from grinding poverty to enormous wealth.
n the last decade more new billionaires emerged in China than anywhere else in the world. There are now at least 79 Chinese billionaires. China's rich are fueling the country's 15% annual growth in luxury sales, which have reached $9 billion a year, making the country the world's second largest market for top-end products. You can wait a year for a new Ferrari in China. Porsche launched its Panamera sedan there before it did so in the U.S. Long lines often stretch outside Louis Vuitton and Hermès stores.
Who are the superrich Chinese? What are they like? How did they get so wealthy?
To find answers to those questions I've talked to a half dozen Chinese billionaires. Some of them made their money by taking Internet companies public in the U.S., others by investing in real estate or beverages. Unlike many of today's American billionaires, such as the Rockefellers or the Waltons of Wal-Mart, China's are almost all self-made. Half of the world's 14 self-made billionaire women are Chinese. They all overcame hardship and failure, and they all are highly optimistic about China's future.
One Chinese billionaire, a real estate mogul, met with me more than a dozen times over five years to share his lessons for succeeding in business. Sometimes we met at his palatial home in Beijing, sometimes at my much smaller one in Shanghai. We ate clams the size of footballs on a beach in Australia, and one time we went to McDonald's for french fries. I liked spending time with him not only because I could briefly live the life of a billionaire but also because it became obvious why he was so successful. He actually embodied the lessons he taught me. He didn't just preach them.
There was one condition to our talks and my writing about him, though. He insisted on remaining anonymous. Therefore I will call him Mr. Chen. Like many wealthy Chinese, Mr. Chen prefers to fly under the radar, because he doesn't want to accidentally get on anyone's wrong side. Lest you think his fears are exaggerated, realize that 70 of the people who have appeared on the Forbes China Rich List in the last decade have publicly gotten into trouble. China's affluent now sometimes half-jokingly call the ranking the Death List.
Mr. Chen's first lesson is to believe that anything is possible and the only thing that can stop you is yourself. He never ceased to believe that he would make something of himself. As a poor peasant child with no high government connections, he had the odds stacked again him. He had to drop out of school in his teens because his family had no money.
Yet he believed in himself and refused to give up. With no powerful family behind him, he had to take out loans at five times the normal rates of his well-connected competitors. He had to do smaller projects that no one else wanted and endure derision and slights from others. Slowly, over time, he developed a reputation for doing what he said he would, and his projects got bigger and bigger.
Now he pays for the food, medical costs and living expenses of more than 80 members of his extended family. He donates millions a year to set up schools in rural areas, and he often walks the halls of hospitals with his offspring and pays for the medical costs of uninsured patients. But before he could do any of that he spent decades in sheer perseverance, ignoring all the better-educated, wealthier people who disdained him.
The second lesson Mr. Chen taught me is that to get what you want you have to respect everyone and sometimes eat humble pie. A decade ago, when nearly everyone in China was poor, it took less than $10 million to make the China rich list. Last year you needed $120 million. The creation of wealth has been staggeringly quick. As Mr. Chen says, you could be a waiter today and the head of a food and beverage conglomerate tomorrow--so you'd better respect everyone, or your attitude may come back to haunt you. Practically everyone in China knows someone who a decade ago raised pigs and today drives a Mercedes and buys Tiffany jewelry.
Finally, Mr. Chen believes in sharing wealth. He lets business partners make more than he does, so that the next time they secure a good deal they'll think of working with him first. He sees no point in ever trying to shortchange business partners.
He is right. I have been in meetings with him with different partners with projects all over the country. I asked several of them why they worked with him rather than anyone else, and every one of them said it was because they knew he'd take a smaller piece of the total pie. But so many small pieces add up to a whole lot of pie.
Mr. Chen believes in sharing wealth also in the sense of ensuring good working conditions for rank-and-file employees and letting the most productive ones get rich. He does not believe in letting lieutenants scrape by while a CEO is paid absurd sums. And he believes that companies like Apple and Dell need to improve the conditions at the factories where they source their products.
Mr. Chen built a fortune out of dogged determination and a reputation for being assiduously honest, fair and respectful. He sees no reason why the same shouldn't work for anyone else. As he told me once, "If I can do it with as little as I had growing up, anyone can do it."
Wednesday, May 26, 2010
Steps towards Green IT
1) What are the Green initiatives that have been taken within your company?
- We shut down the desktop after office hours and during weekends, direct result is 60% reduction in electricity bill.
- Optimizing windows start up time
- We are using thin client technology for desktops machine which are critical, they are more energy efficient and also easy to mange.
- AC shut down after 8 PM and during weekends.
- Use of Virtualization technology, we consolidated the servers, any new application/machine deployment is a contender of virtualization, all the legacy machines/application also replaced with virtualization technology, It direct results in lower power consumption.
- We are using SaaS (Software as a Service) model for payroll and HR dept.
- We have migrated our solution to SaaS (Kind of hosting model).
- Migrated the application from SUN servers to Intel based architecture.
- Energy efficient CFL lighting in the office
- Use of TFT/LCD screen instead of old CRT monitors, TFT/LCD are more energy efficient
2) What are the benefits that have resulted from such green initiatives?
- Cost Saving , better ROI , it is major motivating factor
- Reduced carbon foot print , Greener Planet
- Less Hardware (using virtualization and consolidation of servers )
3) What is the road-map for furthering the green agenda, i.e., what other green initiatives is your company intending to take?
- For new IT equipment we are in process for contract with the Hardware vendor for hardware replacement and refresh after its life cycle(in our case it is Dell)
- Every new application should be deployed using Virtualization technology.
- Relocating our office servers to data center colo. It will save cost for us and bigger data centers can afford Green IT Data center. Many times is not feasible for a smaller company to afford green data center (design, build and its operation) in house.
- Dell servers with Intel high-efficiency power supplies, fans and processors to reduce our total watts per server.
- We partner with a company that refurbishes and resells our old server hardware that we can't reuse internally.
Wednesday, May 12, 2010
How to extend the virtual disk size in ESX/VM
2. Make clone of this VM -1 , call it VM-2 (for backup , in case you mess with VM-1)
3. From Vsphere client , increase the size of the VM-1 , you can also increase with a command line tool. #vmkfstools -X 40G VM-1.vmdk (-X is the switch for the size that you want the disk file to be , not the size you want to extend).
4. Power down VM-2
5. On Hardware tab add a new existing HDD and point it to the original VM-1.vmdk (the disk we resized few minutes back), mount it as second HDD.
6. Boot VM-2
7. From run menu type “diskpart”, this utility resize disk partition in windows 2k3
8. DISKPART> list volume , will show you the list volume , select your volume that you want to extend.
9. DISKPAER> extend , run this command to finally to extend the HDD size.
10. You can cross check the HDD size in HDD management snapin (mycomputer->manage->Disk Management)
11. Shut down VM-2 and remove the disk we added
12. Power on the VM-1
13. Voila you are back to business
another way of doing this
1. Power off VM
2. Add a blank larger target disk
3. Add a temp disk (formatted NTFS) to hold a ghost or acronis image
4. Boot to Ghost or Acronis CD
5. Image source disk to image on your temp disk
6. Restore temp image to your larger disk
7. dismount your source and temp disks and test a boot
8. If everything goes well then you are done, you can delete your temp and source disks.
9. if something bad happen then you can revert back to your original disk.
Friday, April 30, 2010
Catch infected machines with TCPDUMP
Friday, January 15, 2010
Squid Made Simple
Open [root@localhost root]# vi /etc/squid/squid.conf
Edit the following entries:
http_access deny all to http_access allow all
After run:
[root@localhost root]# squid -z
Start squid service by:
[root@localhost root]# service squid restart
2. Create a file with any name .... for our example say iptables.sh
# List all hosts allowed --- separate them by single space
HOSTS="x.x.x.x y.y.y.y"
for host in $HOSTS
do
iptables -I FORWARD -s $host -j ACCEPT
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -s $host -j REDIRECT --to-port 3128
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A OUTPUT -o eth1 -j ACCEPT
iptables -A INPUT -i $host -j ACCEPT
iptables -A OUTPUT -o $host -j ACCEPT
done
save this file and execute
chmod +x iptables.sh
[root@localhost root]# ./iptables.sh
[root@localhost root]# iptables-save
[root@localhost root]# iptables-save > /etc/sysconfig/iptables
3.
[root@localhost root]# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
4.
[root@localhost root]# service iptables restart
Now configure users Browser for internet.
Friday, November 13, 2009
Troubleshooting SMTP Servers
ehlo
mail from: a@b.com
rcpt to: me@mydomain.com
250 2.1.5 Ok
data
.
Subject: SMTP testing
Greetings from me
.
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ telnet localhost 25
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
That means the server is not running, which you can confirm with Netstat:
# netstat -pant|grep :25
If it returns nothing, your SMTP server is not running
Tuesday, October 27, 2009
How to kill remote session via command line
C:\Documents and Settings\datagram>qwinsta /server:10.10.10.x
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
rdp-tcp#4 datagram 1 Active rdpwd
administrator 2 Disc rdpwd
C:\Documents and Settings\datagram>rwinsta rdp-tcp#4 /server:10.10.10.x
Monday, October 26, 2009
Remotely Start/Stop windows services
1. sc \\"+MachineName+ start+ServiceName
2.
- To start a service, type:
net startservice - To stop a service, type:
net stopservice
Sunday, October 25, 2009
Error: Service 'RemoteRegistry' failed to reach status 'Stopped' on this server.
In the services manager set Remote Registry to "Disabled" then reboot.
When the workstation has restarted open the services manager and set it to "auto" or "manual" then try the install again.
Saturday, October 24, 2009
attempting to load a 64-bit application however this cpu is not compatible with 64-bit mode
1. Check your server BIOS settings and enable Virtualization.
****** YOU HAVE TO SHUT DOWN YOUR SERVER AND PLUG OUT THE POWER CORD FOR AT LEAST 2 MINUTES TO MAKE THIS SETTING EFFECTIVE.
- Choose the virtual machine in VMware Infrastructure Client.
- Click Edit Settings > Options > Advanced.
- Deselect Paravirtualization.
Tuesday, October 20, 2009
IP/Port Blocking
(Machine 10.10.10.xx). and rest all should be blocked.
Ans.
Via IPTABLES
iptables -A INPUT -s 10.10.10.0/24 -p tcp --destination-port 80 -j
ACCEPT
iptables -A INPUT -p tcp --destination-port 80 -j DROP
Via Hosts
in hosts.allow
80: 10.10.10.0/24
in hosts.deny
80: ALL
Wednesday, October 14, 2009
Count Disk Space
To show the size of all sub directories of a specific directorydu -sh /home/*du /path/to/dir --max-depth=1 | sort -nr
To show all the 1 level sub directories sizedu -shdf -h /path/to/dir
du -sh *To show the size of specific directorydu -sh /home
Wednesday, September 23, 2009
sudo: sorry, you must have a tty to run sudo
2. comment out # Defaults requiretty
3. it is always better that you block this for a particular user e.g
4.Defaults:backupuser !requiretty
here is the man page for quick reference
http://www.linuxmanpages.com/man5/sudoers.5.php#lbAM
Monday, August 17, 2009
How to use "noatime" option in linux ext3 filesystem for better performance of I/O
- Edit the file '/etc/fstab'
- Add the option 'noatime', separated with a comma, to the fourth field of every disk based filesystem entry
- Save the file and reboot (or remount all the filesystems corresponding to the modified entries (using the command: mount -o remount
))
Most Linux desktop and server is hurt by a noticeable IO performance slowdown due
to the constant atime updates, while there's just two or three real users of it:
tmpwatch [which can be configured to use ctime so it's not a big issue]
and some backup tools.
and mail-notify.
Example
proc /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/md0 /boot ext3 defaults 0 0
/dev/md1 none swap sw 0 0
/dev/md2 / ext3 defaults,noatime 0 0
Also in addition to this
if you put your swap partition at the beginning of the drive it will give some improvement.
The beginning of the drive is physically located on the outer portion of the cylinder, and the read/write head can cover
much more ground per revolution.
You can check that with /sbin/hdparm -t /dev/sda1 or sda2 etc etc command.
Tuesday, August 11, 2009
DoS-denial attacks
Add these lines to the end of /etc/rc.d/rc.local
######## shut some DoS stuff down
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
# increase the SYN backlog queue
echo 2048 > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo 0 > /proc/sys/net/ipv4/tcp_sack
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 64000 > /proc/sys/fs/file-max
ulimit -n 64000
# increase the local port range
echo 1024 65535 > /proc/sys/net/ipv4/ip_local_port_range
# stop source routing
for i in /proc/sys/net/ipv4/conf/*/accept_source_route
do
echo 0 > $i
done
# enable reverse-path filtering
for i in /proc/sys/net/ipv4/conf/*/rp_filter
do
echo 1 > $i
done
##### End
VISUDO
#useradd -g users admin
#passwd admin
2. #visudo
here insert the below line in the end.
admin ALL=(ALL) NOPASSWD: ALL
with NOPASSWD it will not prompt for admin users password
Now if you want to give permissions to just few services instead of full privilege
1. #visudo
2. admin ALL=(root) NOPASSWD: /etc/init.d/postgresql
Save and Exit as :wq
now
# sudo /etc/init.d/postgresql start
will start the postgresql service without asking your password.
Now if you want to prohibit a users for accessing few services say shell, su,passwd or visudo
admin ALL = ALL, !SHELLS, !SU, !PASSWD, !VISUDO
Monday, August 3, 2009
Folder Access outside document root in apache
Give permission to that folder with the Apache user and group and under httpd.conf file add the below lines.
“Directories need to be executable by the Apache user, so that Apache can get listings of the files in the directory, and display the documents located in that directory”
Alias /web /home/web
Directory "/home/web">
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
AllowOverride None
Allow from all
Order allow,deny
/Directory>
Thursday, June 11, 2009
restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
(1) rm /etc/sysconfig/networking/profiles/default/resolv.conf
(2) restorcon /etc/resolv.conf
(3) ln -s /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf
Actually this is a bug in policycoreutils package and now have been Fixed in policycoreutils-2.0.57-16
https://bugzilla.redhat.com/show_bug.cgi?id=483371
Wednesday, June 10, 2009
How to Start Fedora Directory Server Manually
1.[root@vfds fedora-ds]# slapd-vfds/start-slapd
2./start-admin
3./startconsole
give userName and Password here....
Tuesday, June 9, 2009
How to Install VMware-Tools on CentOS 5.3
2.Click on VM
3.Select "Install VMware Tools"
4.This will mount the VMware tools to the CD-ROM automatically
5. run "rpm -ivh VMwareTools-6.x.x-xxxx.i386.rpm"
6. Run this script "vmware-config-tools.pl"
7.reboot the machine
Tuesday, June 2, 2009
VMWARE PART -2 : VIRTAUL NETWORKING
• Virtual Switches
• Virtual Switches and VLANS
• NETWORKING Tools
How virtual machines communicate with rest of the appliance in network.
Why we need virtual networking
==> Each device requires a NIC, this NIC allow a device to communicate with rest of the devices in the network. With the introduction of virtualization in Vmware we have one big host which is physical device and several machines running on that physical host . And in a traditional sense you would need a NIC card for every virtual machine to allow connectivity to rest of the network , and it does not make sense to make 20-30 nic cards for virtual machines and this is where the concept of virtual switch comes into play.
A virtual switch mimics a physical switch except it is a software based and it will have ports in it and these ports can be added or deleted. You can have upto 1016 ports on a virtual switch.
The idea here is to connect one or more physical nic cards to this virtual switch, the virtual switch is server by one or more physical nic cards.
So we connect the VM machines nic with the virtual switch ports and virtual switch gives the connectivity to the outside world via physical NIC.
In the above scenario both vm are connected with the virtual switch and VS is not connected with any physical NIC. So they can talk to each other only and this is perfect for testing only.
Next Scenario
One virtual switch with one physical nic.
As we gave physical connectivity so you can do traffic shaping.
Another scenario
Advantage is redundancy as you have multiple nic card.
One more scenario
NETWORK CONNECTIONS:
There are 3 types of port configuration that can we done on a virtual switch
• Service console
• Vmkernel : vmotion,iscsi, nfs/nas
• Virtual machines
On the same virtual switch you can have one or more port types ,
You can have virtual switch that supports port for the service console and also for vm for example or each virtual switch can have its own port types so all the ports on this virtual switch will only support virtual machines or service console or vmkernel.
Rolling Failover
No:= in the event that a physical nic card goes down and another nic card takes over its place continues production, after the failed nic card comes back online if this setting is sets to NO then the failed nic card that just came online will tackle the existing nic card will take its place and return to the servicing production.
If it is set to
YES: then the failed nic card remains offline even after it recovers from the failure that it experience and it will not take over the currently active nic card until the event another failure happens.
Network Failover Detection:-
Link state only--> if the failure is from switch end then the esx server will not able to know that
Becon Probing--> it will notify the esx that link from switch is down
NETWORKING TOOLS
• Service network restart ---when you want to change the ip address of service console
• Ifconfig --
• Findnic -- able to map the way esx server labels the vm nic to the actual physical nic.
• Mii-tool -- used to configure or modify nic settings from command line stand point from vm
Monday, April 20, 2009
Virtualization – Where, When, Why - Part 1
- Make efficient use of hardware
- Consolidation of servers
- Consolidation of desktops
Testing /QA and Development Environment
- Network isolation
- Snapshots
- Fast OS/Application Deployment
Disaster Recovery
- Hardware independence
IT Administration
- Make life easier of a system administrator
- Faster OS deployment
- Faster Server Replacement
- Less hardware maintenance
Tuesday, April 14, 2009
Monitoring and system information under Linux
strace -c ls >/dev/null Summarise/profile system calls made by command
lsof -p $$ List paths that process id has open
lsof ~ List processes that have specified path open
tcpdump not port 22
watch -n.1 'cat /proc/interrupts' Watch changeable data continuously
free –m Show amount of (remaining) RAM (-m displays in MB)
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
List processes by mem usage
ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'
List processes by % cpu usage
ps -e -o pid,args –forest List processes in a hierarchy
uname –a
badblocks -s /dev/sda
hdparm -tT /dev/sda Do a read speed test on disk sda
hdparm -i /dev/sda Show info about disk sda
smartctl -A /dev/sda | grep Power_On_Hours How long has this disk (system) been powered on in total
mount | column –t List mounted filesystems on the system (and align output)
lsusb –tv Show USB info
grep "model name" /proc/cpuinfo Show CPU(s) info
grep MemTotal /proc/meminfo Show RAM total seen by the system
Checking Disk Space in Linux
• du -s * | sort -k1,1rn | head [ Show top disk users in current dir. ]
• df –h [Show free space on mounted filesystems ]
• df –i [Show free inodes on mounted filesystems ]
• fdisk –l [Show disks partitions sizes and types (run as root)]
• rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n [List all packages by installed size ]