Sed Tips


Note: This sed tips are more focused on how sed can be used along with Cisco NXOS to format the output. Some syntax may be slightly different from the linux one, but concepts remain the same

    1. Simple Find and replace : How to use sed to replace multiple spaces in an output with a single space
      show ip arp | sed ‘s: \+: :g’
      Note: 
      The sed command will look for zero or more(+) spaces and replace it with a single space

      N6K-SPINE3# show ip arp | head lines 11
      
      Flags: * - Adjacencies learnt on non-active FHRP router
             + - Adjacencies synced via CFSoE
             # - Adjacencies Throttled for Glean
             D - Static Adjacencies attached to down interface
      
      IP ARP Table for context default
      Total number of entries: 7631
      Address         Age       MAC Address     Interface
      37.40.51.101    00:18:33  5801.0500.0028  Vlan3740
      37.40.51.102    00:18:33  5801.0500.0050  Vlan3740
      % cli: command canceled
      N6K-SPINE3# show ip arp | head lines 11 | sed 's: \+: :g'
      
      Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean
       D - Static Adjacencies attached to down interface
      
      IP ARP Table for context default
      Total number of entries: 7631
      Address Age MAC Address Interface
      37.40.51.101 00:18:41 5801.0500.0028 Vlan3740
      37.40.51.102 00:18:40 5801.0500.0050 Vlan3740
      % cli: command canceled
      N6K-SPINE3#
      
    2. Advanced Find and Replace: How to remove duplicate spaces in an output as well as replace space between two words(alpha numeric) with a hyphen(-).
      Note: This is really useful when we are using cut command to select columns with a delimiter as space. Some outputs will have column members having values with space and we need to replace those spaces with hyphen else the cut logic will get screwed up

      N6K-SPINE3# show platform afm info copp-tbls 
      COPP table                                   
      ----------                                   
      * mgmt/ipv6-mgmt - http,snmp,ntp,telnet,ssh,ftp
      ** excp/ipv6-excp - mtu failure, martian address, punt, l3 header errors, icmp errors
      
      Policer-Num  Name                  CIR       Burst     Passed-Bytes  Dropped-Bytes
      ----------------------------------------------------------------------------------
      0            default               64000     6250      41239419        0             
      1            stp                   2500000   4687      12456664        0             
      2            lacp                  128000    4687      171548112       0             
      3            fc control            3750000   65535     0               0             
      4            fc errors             125000    65535     0               0             
      5            fc data               125000    65535     0               0             
      6            lldp                  256000    4687      428894355       0             
      7            sat control           62500000  65535     0               0             
      8            sat data              250000    16000     0               0             
      9            udld                  256000    4687      170310698       0             
      10           igmp/ipv6-mld         128000    63        1998396656      200172        
      11           fip                   128000    4687      0               0             
      13           dhcp/ipv6-dhcp        128000    4687      9555449676      1213208586    
      14           L3 data hi            2500000   4096      0               0             
      15           L3 data low           1250000   512       0               0             
      16           L3 front panel rdt    250000    2048      0               0
      17           isis                  128000    4687      6499005632      0
      18           cdp                   128000    4687      186341581       0
      19           dot1x                 125000    65535     0               0
      20           pim/ipv6-pim          128000    4687      4997316070      0
      21           mgmt/ipv6-mgmt*       1500000   4687      0               0
      23           arp/ipv6-nd           128000    3515      1373801198      0
      24           rip                   1200000   4687      0               0
      25           ospf/ipv6-ospf        1200000   4687      115913712       0
      26           eigrp/ipv6-eigrp      1200000   4687      0               0
      27           hsrp vrrp/ipv6-hsrp   128000    250       119511901630    0
      29           bgp/ipv6-bpg          1200000   4687      0               0
      30           mcast first hop       1200000   4687      0               0
      31           ping                  8000      3515      0               0
      33           mcast rpf fail        64000     3125      0               0
      35           ucast fib miss        8000      15        122942          2313730
      36           glean                 128000    4687      27752854        51827500
      37           msdp                  1200000   4687      0               0
      38           excption ttl          8000      3125      0               0
      39           exception same intf   8000      3125      0               0
      40           exception ip frag     8000      3125      0               0
      41           excp/ipv6-excp**      8000      4687      1734386         0
      42           bfd                   1200000   4687      5277193652      0
      43           mcast last hop        64000     3125      0               0
      44           wccp                  132500    4687      0               0
      45           onep dpss             78125     3125      0               0
      46           ecp                   800000    3125      0               0
      47           vxlan                 128000    4687      0               0
      48           nvgre                 125000    65535     0               0
      49           L3 isis               128000    4687      0               0
      50           CFSoE Rel             62500000  65535     0               0
      ----------------------------------------------------------------------------------
      
      
      N6K-SPINE3#
      

      Note: In the above output below fields in the 2nd column has spaces in between the entry like “sat control”, “sat data”, “L3 data hi”, “L3 data low”, “L3 front panel rdt”, “hsrp vrrp/ipv6-hsrp”, “mcast rpf fail”, “ucast fib miss”, “excption ttl”, “exception same intf”, “exception ip frag”, “mcast last hop”, “L3 isis”, “CFSoE Rel”

      Problem: A use case where we need to print only first three columns. For the aforementioned fields with SPACE we are unable to see the CIR 
      N6K-SPINE3# show platform afm info copp-tbls | sed 's: \+: :g' | cut -d " " -f 1-3
      COPP table                                                                        
      ----------                                                                        
      * mgmt/ipv6-mgmt -                                                                
      ** excp/ipv6-excp -                                                               
      
      Policer-Num Name CIR
      ----------------------------------------------------------------------------------
      0 default 64000                                                                   
      1 stp 2500000                                                                     
      2 lacp 128000                                                                     
      3 fc control                                                                      
      4 fc errors                                                                       
      5 fc data                                                                         
      6 lldp 256000                                                                     
      7 sat control                                                                     
      8 sat data                                                                        
      9 udld 256000                                                                     
      10 igmp/ipv6-mld 128000                                                           
      11 fip 128000                                                                     
      13 dhcp/ipv6-dhcp 128000                                                          
      14 L3 data                                                                        
      15 L3 data                                                                        
      16 L3 front
      17 isis 128000
      18 cdp 128000
      19 dot1x 125000
      20 pim/ipv6-pim 128000
      21 mgmt/ipv6-mgmt* 1500000
      23 arp/ipv6-nd 128000
      24 rip 1200000
      25 ospf/ipv6-ospf 1200000
      26 eigrp/ipv6-eigrp 1200000
      27 hsrp vrrp/ipv6-hsrp
      29 bgp/ipv6-bpg 1200000
      30 mcast first
      31 ping 8000
      33 mcast rpf
      35 ucast fib
      36 glean 128000
      37 msdp 1200000
      38 excption ttl
      39 exception same
      40 exception ip
      41 excp/ipv6-excp** 8000
      42 bfd 1200000
      43 mcast last
      44 wccp 132500
      45 onep dpss
      46 ecp 800000
      47 vxlan 128000
      48 nvgre 125000
      49 L3 isis
      50 CFSoE Rel
      ----------------------------------------------------------------------------------
      
      
      N6K-SPINE3#
      

      Sed command to the Rescue

      N6K-SPINE3# show platform afm info copp-tbls | sed 's: \+: :g' | sed 's:\([A-Z,a-z][0-9]*\) \([A-Z,a-z][0-9]*\):\1\-\2:g' | cut -d " " -f 1-3
      COPP-table                                                                                                                                   
      ----------                                                                                                                                   
      * mgmt/ipv6-mgmt -                                                                                                                           
      ** excp/ipv6-excp -                                                                                                                          
      
      Policer-Num-Name-CIR-Burst-Passed-Bytes-Dropped-Bytes
      ----------------------------------------------------------------------------------
      0 default 64000                                                                   
      1 stp 2500000                                                                     
      2 lacp 128000                                                                     
      3 fc-control 3750000                                                              
      4 fc-errors 125000                                                                
      5 fc-data 125000                                                                  
      6 lldp 256000                                                                     
      7 sat-control 62500000                                                            
      8 sat-data 250000                                                                 
      9 udld 256000                                                                     
      10 igmp/ipv6-mld 128000                                                           
      11 fip 128000                                                                     
      13 dhcp/ipv6-dhcp 128000                                                          
      14 L3-data-hi 2500000                                                             
      15 L3-data-low 1250000                                                            
      16 L3-front-panel-rdt 250000
      17 isis 128000
      18 cdp 128000
      19 dot1x 125000
      20 pim/ipv6-pim 128000
      21 mgmt/ipv6-mgmt* 1500000
      23 arp/ipv6-nd 128000
      24 rip 1200000
      25 ospf/ipv6-ospf 1200000
      26 eigrp/ipv6-eigrp 1200000
      27 hsrp-vrrp/ipv6-hsrp 128000
      29 bgp/ipv6-bpg 1200000
      30 mcast-first-hop 1200000
      31 ping 8000
      33 mcast-rpf-fail 64000
      35 ucast-fib-miss 8000
      36 glean 128000
      37 msdp 1200000
      38 excption-ttl 8000
      39 exception-same-intf 8000
      40 exception-ip frag
      41 excp/ipv6-excp** 8000
      42 bfd 1200000
      43 mcast-last-hop 64000
      44 wccp 132500
      45 onep-dpss 78125
      46 ecp 800000
      47 vxlan 128000
      48 nvgre 125000
      49 L3-isis 128000
      50 CFSoE-Rel 62500000
      ----------------------------------------------------------------------------------
      
      
      N6K-SPINE3#
      
      
Categories: Linux

PC Based Traffic generators


Unicast/Multicast

  1. iperf: CLI mode only. Works on all platforms.
  2. jperf : GUI equivalent of iperf.
  3. Ostinato –> Ixia like interface and hence can create any type of packet easily.

Multicast

  1. mcast.exe -> Windows only
  2. uftp -> Windows/MAC/Linux
  3. vlc –> Works on all platforms

 

Panasonic KX-TGE273S Link2Cell Review

September 20, 2016 Leave a comment

I have been owning the Panasonic KX-TGE273S Link2Cell for more than a year now and always wanted to put a review of it. This is a smaller review which focuses on its advantages and disadvantages. So here it goes.

Why do I/You need it: If you are staying in a place where the cell phone reception is quite bad then this is a device which you should own as you can keep the cellphone at a place where the range is good and then enable bluetooth on phone and start pairing it with the panasonic base unit. Once paired you can use the panasonic handsets for calling or receiving from your cellphone. Other advantages are

Advantages

  • Convenience: You can connect up to two cell phones via bluetooth and 1 landphone to the base unit.[Keep the cell phone where there is a good signal reception and turn on the bluetooth and cell will get paired with the base unit). So you will have a single cordless phone using which you can call/receive calls from all the three phones at home. When an incoming call comes all the handsets ring and you can attend the call from any of the units.
  • Less Radiation: Since we are now talking over the headset, we dont need to worry about the cellphone radiation as the handsets talk to the base station using the bluetooth technology. Also cellphones gets heated up fast while using for long hours and using this helps in avoiding the heat on the ears as well.
  • Allows simultaneous use of all linked cell phones: This model supports maximum of two cellphones to be paired and when you are attending a call from a handset on CELL1 at the same time you can recieve/call from another handset using CELL2.
  • Intercom: It can be used like a intercom to call from one room to another by keeping handsets in different rooms/floors. This is very useful if you stay in a duplex/two storied appts.
  • Ring as a cell mode feature makes it easy to identify on which cell the call is coming. Ring as a cell feature means, the ringtone of the paired cell phone will be used as the ringtone for the cordless phone.So this way we can differentiate on which cell the call is incoming.
  • Cellphone Address book syncing: Cellphones address book can be imported to the base unit over bluetooth. For this feature, the cellphone needs to support bluetooth PBAP(phonebook access profile) which is common in the current generation smart phones. Even most Nokia feature phones with Bluetooth HSP (hands free profile) supports the same.This helps in searching for names from the handset itself and allows directly calling from the handset.
  • Talking Caller ID: If the incoming caller’s number is saved in the address book of base unit, then while getting a call, handset will announce the name along with the ring tone which is a useful feature. If the name is not there in the address book, then it will call out the number. This can be disabled if you dont want this feature.
  • Inbuilt clock and Alarm: Clock and Alarm features are there on the handset and can be configured independently on each handset.
  • Battery: It uses regular “AA” rechargeable battery and hence its easy to replace one if it goes bad. This was the main reason why I bought this instead of a Vtec (Vtec uses proprietary battery)
  • Build Quality: Build quality is superb as my handsets had fallen down multiple times and still no major issues. One handset suffered a broken display, but still its functional though its difficult to read from it. But overall the quality is superb considering the price which I paid.

Disadvantages

  • Can’t reject the call from the handset: When you get a call on one of the linked cell phones and there is no option from the handset to reject the call. The only way to reject the call is to go and find the cell phone on which the call is coming and reject it from there. In handset you only get the option to silence the handset.This is one of the biggest disadvantages as if you are in the middle of a meeting and then all the handsets around the house will start ringing the moment you get a call and if you want to disconnect the call, only way is to find the cellphone and reject the call from there. Silencing the handset silences only one which we are holding and the remaining handsets and baseunit will still be ringing.
  • Country Code problem: If your address book in the cellphone contains a country code with (+ sign like +1 or +91) then while trying to call from the address book it will not work as it doesn’t understand + sign. This is a big problem as most of my contacts have a country code prefixed for them, so I had to manually remove the  country code (in my case +91.
  • No battery for base unit: It would be great if the base unit came with a battery as in a country like india where power cuts are common, the moment base unit power goes, bluetooth connection between cellphone also goes. To workaround either keep a fully charged handset on the base unit so that the base unit gets the power from the handset. But in my case I connected the base unit to an UPS so that it will always remain up.
  • Power adaptor for base unit and handset: This cannot be a disadvantage as, but it would be great if panasonic could provide a power adaptor which supports 110V and 230V so that it can be used across the globe. Since I bought this from US, it came with a 110V power adaptor. I used a step down transformer adaptor to make it work in India. This product is not yet available in India.

Other things which I couldn’t rate

  • Call Quality: Call quality is Ok . But I think it can be bettered as at times it sounds little muddy.
  • Range (between handset and baseunit): Since I live in a 2 bedroom apartment of 1416sqft, I cannot comment on the range as in my house every room I get a good coverage for the handsets. Base unit is placed in the living room and the handsets are in each bed room.
  • Battery backup: Battery backup is not much of concern and hence I haven’t reviewed the same. But with moderate usage it gives more than a day back up.
  • VoiceMail : It supports storing of voice mails and automatic answering. But I haven’t tested it.

Where to buy

Currently this product is not on sale in India. So you have to get it from US. Following is the amazon link for the same.
Panasonic KX-TGE273S Link2Cell Bluetooth Enabled Phone with Answering Machine & 3 Cordless Handsets

 

This slideshow requires JavaScript.

 

 

Categories: Gadgets

Automating starting of Ixia IxNetwork NGPF DHCP clients

August 8, 2016 4 comments

Courtesy: The baseline script which is mentioned here is provided by Anush Varada of ixia customer support team and a big thanks to him for the same.

Problem: In my system testbed which is using IxNetwork NGPF interfaces,I wanted an automated way of starting all device-groups especially the ones using dhcpv4/dhcpv6 clients one by one. Starting all device blocks doesnt work most of the time and hence I wanted to start one by one.

Resoultion: Run the below python code in your IxNetwork Machine, which will automate the starting of the device blocks.
Note:This script can be easily converted to Tcl as the ixnetwork API’s are mostly same.

Environment setup:

Note: This script assumes that you already have a IxNetwork configuration with a DHCPv4 server running.

  1. IxNetwork TCL server: Instead of opening the Ixnetwork config directly, open it from the IxNetwork TCL server. IxNetwork TCL server is also same as IxNetwork GUI, but it will start a TCL server as well.
  2. Python ENV setup: Add “C:\Program Files (x86)\Ixia\Python\x.x.x” to your PATH variable in windows, where x.x.x is your python version (Refer http://www.computerhope.com/issues/ch000549.htm  for setting up path variable)
  3. Command prompt: Type “cmd” in Run prompt and there type python to  make sure its working fine.
from pprint import pprint
import os
import sys
import time
from datetime import datetime
ixNetPath = r'C:\Program Files (x86)\Ixia\IxNetwork\7.30-GA\API\Python'
sys.path.append(ixNetPath)
from IxNetwork import IxNet
ixNet = IxNet()
starttime=str(datetime.now())
ixNet.connect('10.78.24.105', '-port', 8009, '-version', '7.30')
root = ixNet.getRoot()
#Retrieves all topologies in the config
topologies = ixNet.getList(root, 'topology')
#Iterating over each topology
device_count = 0
for each_topology in topologies:
	#Retrieving topology name so that DHCP server name can be excluded
	topology_name = ixNet.getAttribute(each_topology, '-name')
	print "Executing for topology %s." %topology_name
	#Execute the below code except for DHCP server topology
	if topology_name != 'N56-55-FEX103-104-EVPC':
		print topology_name
		#Retreiving the device groups in each topology
		device_groups = ixNet.getList(each_topology, 'deviceGroup')
		#Iterating over each device group in the topology
		for each_devicegroup in device_groups:
			devicegroup_name = ixNet.getAttribute(each_devicegroup, '-name')
			print "Executing for devicegroup %s." %devicegroup_name
			#Retrieving the handle for dhcpv4_client and dhcpv6_client
			#this is required to start dhcpv6 client first before starting dhcpv4 client
			dhcpv4_client = ixNet.getList(each_devicegroup + ('/ethernet:1'),'dhcpv4client')
			dhcpv6_client = ixNet.getList(each_devicegroup + ('/ethernet:1'),'dhcpv6client')
			if len(dhcpv6_client) > 0:
				print "STARTING DHCPV6 CLIENT FOR %s."%devicegroup_name
				count=int(ixNet.getAttribute(each_devicegroup, '-multiplier'))
				print count
				ixNet.execute('start', dhcpv6_client)
				if count <=10 :
					print "sleeping for 10 seconds"
					time.sleep(10)
				elif count <=50 :
					print "sleeping for 10 seconds"
					time.sleep(10)
				elif count  100 :
					print "sleeping for 20 seconds"
					time.sleep(20)
			if len(dhcpv4_client) > 0:
				print "STARTING DHCPV4 CLIENT FOR %s."%devicegroup_name
				count=int(ixNet.getAttribute(each_devicegroup, '-multiplier'))
				print count
				ixNet.execute('start', dhcpv4_client)
				if count <=10 :
					print "sleeping for 10 seconds"
					time.sleep(10)
				elif count <=50 :
					print "sleeping for 20 seconds"
					time.sleep(20)
				elif count 100 :
					print "sleeping for 60 seconds"
					time.sleep(60)
			#when a device-group has either static ipv4/ipv6 or ethernet only then dhcpv4_client and dhcpv6_client returns an empty list
			if len(dhcpv6_client) == 0:
				print "Starting IPv4,IPv6 and Ethernet clients for %s"%devicegroup_name
				ixNet.execute('start',each_devicegroup)
				print "Sleeping for 5 seconds"
				time.sleep(5)
#print "Total number of devices is {0}".format(device_count)
endtime=str(datetime.now())
print "program started at {0}".format(starttime)
print "program ended at {0}".format(endtime)
print "Ixia program completed"
ixNet.disconnect()

VI/VIM tips

August 8, 2016 Leave a comment

Following are some random tips which I found to be useful. All of them has been collected from different sites and I am just putting them together for my reference.

Most of the examples mentioned here uses the below methodology

if there is a column prefix “:”  then that indicate its the vi command mode. To do this, open the file, press “ESC” key and type “:”

If you want these changes to be permanent, then you can put these commands in a special file called “.vimrc” which is present in your home directory(/users/<username> in Linux & Mac). Create this file, if it doesnt exist.

Indentation Tips

  1.  Enabling/Disabling auto indent
    :set ai ==> To enable
    :set noai ==> to disable
  2. Disabling auto indentation while pasting a code
    :set paste        ==>To disable autoindenting while pasting
    :set nopaste   ==>To enable it back
  3. How to indent a line which you are newly pasting to the existing code block’s indentation
    use ]p instead of just p. This aligns the pasted block with the surrounding text.
  4. Code block indentation tips
    These commands will fix the indents:

    • =i{ reindents “inner block” (inside the braces).
    • =a{ reindents “a block” (including the braces).
    • =2a{ reindents 2 blocks (this block and containing block).

    Instead of “{“, you can use “}” or “B”, for example, =aB indents a block.

    These commands will decrease or increase indents:

    • >i{ increase indent for inner block.
    • . repeat last change (increase indent of block again).
    • <i{ decrease indent for inner block.

    With the cursor on { or }:

    • =% indents the block (including matching brace).
    • >% or <% indents or unindents the block.

Commenting/uncommenting multiple lines in a file
Open the file in VI and in command mode, press “ctrl+v”, now it will go in to visual mode, now move the cursor using the movement keys (arrow keys up/down), move the up/down arrow till you reach the last line you want to comment. Now press “Shift+i” and now enter the character used for commenting “#”

In Nutshell
Commenting: CTRL+v ==> SHIFT+i ==> # ==> Will insert # on the selected column
Uncommenting: CTRL+v ==> x ==> Will delete the #’s in the selected column

Categories: Linux, MAC, Technical

Rainbow Children’s Speciality hospital Bangalore Review

August 8, 2016 Leave a comment

I have divided the review in to two as I had mixed experience. In the first part I will cover the “Birthright” by Rainbow hospitals which is their maternity specific department and in the second part I will review the Post-Natal Babys treatment.

Date of Delivery: 01-01-2016

Date of Admission: 01-01-2016 12 AM

Date of Discharge for Mother: 03-01-2016

Insurance: United Health care Insurance

Delivery Specific Review

Pros

  • Cost. (I opted for a twin sharing room package and generally they dont advertise this package. But I came to know about this package from my wife’s gynaec Dr.Teena Thomas. Not sure why they are not advertising this package.50K INR was the package cost(3 days for c-section, but 5 to 6K additional cost was expected if there are no complication. Final bill came around 59K for me which is surprisingly low as their single room packages starts from 75K and goes till 1 lakh )
  • Good Nursing care. (Nurses in Rainbow hospital were quite helpful and very approachable.)
  • Good quality food for the patient.

Cons

  • Cashless hospitalisation is not available for twin sharing rooms.
  • Twin-sharing rooms are very congested and there are no chairs in twin sharing rooms. Fortunately for us, the other bed was free and hence it was ok. If two patients are there then its quite cramped unlike other traditional hospitals which offer twin/three sharing rooms.
  • Cafeteria doesn’t offer food round the clock, only biscuits/coffee are available post 10:00 PM. Breakfast/Lunch/Snacks/Dinner are served only during stipulated time.
  • No food-items are allowed (Exceptions are biscuits. Fruits are also not allowed). This is quite bad, if you have another elder kid or if the patient always needs a bystander for help as the bystander has to go to cafeteria to have food and hence have to leave the patient unattended.
  • Bathroom doors are very heavy so that its really difficult for a patient who just underwent C-section to open the door.
  • Room windows(glass panels) have small gaps through which cold air comes in the night (specific to winter season), I have complained this twice and they were not able to fix and later we filled the gaps with newspaper.
  • Theres a lot of communication gap between different teams in the hospital. Marketing says one thing and the billing will say another. (few such examples are 1)Marketting said they will process the reimbursement from the hospital side for insurance, but when i checked with billing they said its not possible after a call with the marketing finally billing team agreed to process. 2) When I informed customer feedback team about the food not provided for bystander being a difficulty for me as i have to leave the patient unattended for a while to take food, they said you can make a request and they will allow it, but when I asked the guy who serves food, he said its not possible.

New Born Baby Treatment review

Here I was not that much happy because of the below reasons

  1. The bilirubin count for my baby was on the higher side after delivery, generally in other hospitals, they will start phototherapy immediately if the bilurubin count is above 15. But here since the Paedeatriations follow UK style, they did only for one day and then stopped it next day citing it is fine(it was still above 15). Then they asked us to come daily and do a Bilirubin check. It was a difficult one as daily they will prick the new born baby for blood to do the test and considering my wife underwent C-section it was little difficult to travel. This point may be a +ve for some people as the hospital is not insisting on phototherapy to get money, but considering the tension and commute difficulties we faced for the next few days, I would have preferred doing phototherapy for one more day. Eventually I took my baby to another hospital and did the phototherapy there.
  2. Doctors and one nursing staffs were forcing us to take up the New born blood screening even though we said we dont want to do it.

Concluding Remarks

Despite hearing lot of negative feedback in social media, I went ahead with rainbow due to three main reasons.

  1. Doctor: The gynecologist(Dr. Teena Thomas) we were consulting was ready to do the delivery here even though she doesn’t practice here. Infact she was the one who told me that Rainbow has this 50K package, otherwise I was not at all considering this. A big thanks to her as she helped us multiple times with the hospital.(Again she helped for the phototherapy to be done in another hospital)
  2. Proximity: I stay very near to Rainbow hospital. Its just 2km away from my home. So its one of the biggest motivator
  3. Cost: I don’t think that I can get a better nursing care and facilities for 60K in and around Outer ring road bangalore.(Narayana Whitefield do have a package like this, but their rooms and facilities are no match for rainbow’s as rainbow is more modern and new)

For delivery I will definitely recommend this place considering you cant get better nursing care and facilities for this price. But for paedeatrics department, I wouldn’t recommend it as it caused lot of tension for us due to multiple visits to the hospital even after discharge (This is just my personal opinion as I prefer my elder sons pediatrician(Dr. Rani Davis) than the ones in rainbow as we felt she is good very good in handling babies/kids and we are more comfortable and confident in her).

Categories: General, Health/Healthcare

Enabling mouse scrolling in GNU screen when connecting from MAC


GNU Scren is a great tool for system administrators, as it allows to do anything on a remote server and then continue from exactly where you left later by reconnecting to the session.

But one of the most annoying issues with screen is that if you connect to a screen session and if you want to see the scrollback history, then you need to press the screen keyboard shortcut CTRL+A+]. This is annoying as most people are used to scroll up via mouse.

This is a repost from this site and it helps in overcoming the above issue in MAC’s default terminal Application. All the credits goes to the Original poster and I am just reposting that  for my own reference incase if the original site goes down/removes the content.

Typical use case of GNU Screen for me

MAC Book Pro: My Office Laptop which is connected to my corporate lan only when I am in office/VPN
Linux Server: My office server which is 24X7 up and has GNU screen running.
Network Devices: I need to have a always on telnet session to my Nexus 7000 devices, so that I can monitor whats going on with the device.

So what I normally do is from my Macbook pro, I ssh to the “Linux Server” and then start a GNU screen session by “screen -S devices”. Now from that  screen session I create multiple Tabs and connect to my network devices. So whenever I turnoff my laptop, these sessions will still be alive as the Linux server is always up. So when I reach home, I can just connect to my VPN and then again connect back to the screen session by typing “screen -x devices”.

This is exactly like you run a vnc on the Linux server and then open xterms to the network devices from the vnc session. The advantage of screen over vnc is that screen is really fast and is very good in low speed internet connections.

GNU screen takes all its setting from a .screenrc file which is in your home directory of the Linux server. To enable this tip add the below lines to your .screenrc file

defscrollback 5000
termcapinfo xterm* ti@:te@

Once done, save the file and connect to the screen session from Terminal app and now you can use your mouse scroll up gesture to see the scrollback history.

Note: This trick works only if you are using the default “Terminal” App in the Mac. If you use another app like “iTerm2”, then this tip doesnt work. There is an open bug with iterm2 for this and you need to wait for that to get resolved. Click on this link to see the bug.

 

Categories: MAC