Tuesday, December 15, 2015

Linux Commands

Completely remove an application

  • dpkg --purge --force-depends 
  • sudo apt-get purge --auto-remove 
  • sudo apt-get remove 
  • sudo apt-get remove --purge 
  • dpkg --remove --force-remove-reinstreq 
remove-reinstreq: Remove a package, even if it's broken

Tuesday, December 1, 2015

Open Source Softwares (OSS)

Open Source Softwares (OSS)



  • can be user free of charge
  • is subject to license terms
  • may be modifed and passed to anyone
  • Is type of software whose source is made freely available
  • There are upto 200 different license(divided in to 5 groups) in existence.

  1. Strong Copyleft: ex. GPL, CPL [Licenses with a strong copyleft clause stipulate that all modified versions (where these are distributed and made available to the general public) must be subject to the original license.]
  2. Restricted Copyleft: LGPL (Lesser GPL), MPL(mozill public lic) [where the original license must be imposed on all modified versions of the software if they are distributed]
  3. No Copyleft: BSD, Apache [do not carry any obligation to make the newly added or modified code likewise subject to an OSS license.]
  4. OSS with options: Perl Artistic, Clarified Artistic [This group is a "catch-all term" for any licenses that cannot be assigned to any other group.]
  5. OSS with Privileges: e.g., software companies such as Netscape. [whose exploitation rights are reserved by the authors. e.g., by allowing them to use versions modified by external programmers as if they were their own property.]
  • GPL v2 : OSS licenses within this group contain different license obligations.
  • If no derivative work is created, the original GPL component remains subject to the GPL, but the modified proprietary component can be distributed under any license (including a proprietary one).
  • Different licenses cannot be combined if they contain conflicting license terms.
  • OSS officer has to scan the software purchasing/sales/distribution. (OSS Management)

Additional Info


  • Copyleft "Copyleft" means that a piece of software that is subject to certain OSS license conditions can only be distributed under the same or compatible OSS license terms as the case may be.
  • Derivative work The term "derivative work" or "derivative" refers to software based on an OSS and constituting an extension, development, modification or other processing thereof.

Thursday, September 17, 2015

PermGen setup

Memory Setup

Jvm

> java -Xmx2g -Xms512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

Maven

Windows

> set MAVEN_OPTS=-Xmx2g -Xms512M -XX:MaxPermSize=3g -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError

Linux

> export MAVEN_OPTS=-Xmx2g -Xms512M -XX:MaxPermSize=3g -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError

 Tomcat

Windows

> set JAVA_OPTS=-Xmx2g -Xms512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

Linux

> export JAVA_OPTS=-Xmx2g -Xms512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

Kill Windows Service

Kill Windows Service

Open command prompt in windows. Windows > Run > cmd > [Enter]
> sc queryex
SERVICE_NAME:
        TYPE               : 110  WIN32_OWN_PROCESS  (interactive)        STATE              : 4  RUNNING                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)        WIN32_EXIT_CODE    : 0  (0x0)        SERVICE_EXIT_CODE  : 0  (0x0)        CHECKPOINT         : 0x0        WAIT_HINT          : 0x0        PID                :
        FLAGS              :
> taskkill /f /pid 

Or If you know the image name
> taskkill /f /im <image_name>

Monday, September 14, 2015

Log Viewer for WAS 6.1

Web-based log viewer for IBM Websphere 6.x

Advantages:

- Very helpful for test & development environments to view the log files on the browser
- Log viewer would scan through all available profiles and display the log files
Available at http://hostname:port/logview/

Screenshots:

1) Welcome page
2) Profile display page: Displays the list of server profiles. Please contact the admin team to know the actual profile used for the particular application

3) Log folder view: Displays the log folders available
4) Log file viewer: Either view the log online or download the log file.

Wednesday, September 2, 2015

Continuous Integration Tool


Following tools used for CI

Open Source
  1. Jenkins
  2. CruiseControl
Commercial
  1. ThoughtWorks’ Go
  2. Urbancode’s Anthill Pro
  3. Jetbrains’ Team City
  4. Microsoft’s Team Foundation Server
There are not much difference in these tools (including open source tools). Depends on the organization, which one to use.

Friday, July 3, 2015

Mysql / Sonar Data Migration



  • Take mysql dump and copy the sql file to the other machine

> mysqldump -u root -p --opt [database name] > [database name].sql


  • Drop and create clean database

> mysql -u root -p
> DROP DATABASE [database name];
> CREATE DATABASE [database name];


  • Create the data

> mysql -u root -p [database name] < /path/to/[database name].sql